Hello. Im 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, comp ) iter.next() if self.mSelectionList.length() > 0: print " " + self.name() + " : Filtering render with active object list" return self.mSelectionList
But unfortunately MSceneRender (def objectSetOverride) doesnt 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.