On 22/05/2014 at 08:14, xxxxxxxx wrote:
The MP gui is a tree gui gizmo similar to the OM gui.
You can traverse through it the same way you traverse through the OM tree. And get one of the children.
Then you can edit or delete that specific child object.
#This is how to delete a specific Object Buffer
import c4d
def main() :
rd = doc.GetActiveRenderData() #Get the render settings
mp = rd.GetFirstMultipass() #Get the first Multi-Pass item
#The Multi-Pass option is a tree gui type gizmo like the OM tree
#Use GetNext() to step down to get each child object in the tree
#Either one at a time...or with a loop
if mp.GetTypeName() == "Object Buffer": #<---The topmost object in the tree gizmo
firstBuffer = mp
secondBuffer = mp.GetNext()
thirdBuffer = secondBuffer.GetNext()
if secondBuffer is not None: secondBuffer.Remove()
rd.Message(c4d.MSG_UPDATE) #Tell c4d you changed the render settings
c4d.EventAdd()
if __name__=='__main__':
main()
-ScottA