MSceneRender components doesn’t work

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Display Modes
  05 May 2018
MSceneRender components doesn’t work

Hello. I’m trying to achieve selective (components) Render Override with MRenderOverride and MSceneRender from official example
There is an interesting part from 836 line of the code from the link - # Turn this on to query the active list and only use that for drawing:


if self.mFilterDrawSelected:
    selList = om.MGlobal.getActiveSelectionList():
    if selList.length() > 0:
        iter = om.MItSelectionList(selList)
        while not iter.isDone():
            comp = iter.getComponent()
            self.mSelectionList.add( comp[0], comp[1] )
            iter.next()
    if self.mSelectionList.length() > 0:
        print "\t" + self.name() + " : Filtering render with active object list"
        return self.mSelectionList

But unfortunately MSceneRender (def objectSetOverride) doesn’t want to work with specified polygon components and Override works not on the part of the mesh but on entire mesh. Could you help me to solve this?
Even though I pass to the code polygons or sets it assign shader only to the whole mesh - https://c2n.me/3UwklPY - here is the example of selected components, that I want to draw override, but override with green color somehow assigned to the whole mesh
Thanks in advance.
__________________
My personal site: fabis.xyz
Key Assistant: youtube demo
Anim Assistant: youtube demo

Last edited by fabis : 05 May 2018 at 01:11 PM.
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:02 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.