Python API 2.0 Reference
OpenMayaRender.MSubSceneContainer Class Reference
+ Inheritance diagram for OpenMayaRender.MSubSceneContainer:

Public Member Functions

def __init__ ()
 
def __len__ ()
 
def add ()
 
def clear ()
 
def count ()
 
def find ()
 
def getIterator ()
 
def remove ()
 

Static Public Member Functions

def __new__ ()
 

Detailed Description

Container for render items generated by MPxSubSceneOverride.

Constructor & Destructor Documentation

def OpenMayaRender.MSubSceneContainer.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMayaRender.MSubSceneContainer.__len__ ( )
Return len(self).
def OpenMayaRender.MSubSceneContainer.__new__ ( )
static
Create and return a new object.  See help(type) for accurate signature.
def OpenMayaRender.MSubSceneContainer.add ( )
add(item) -> bool

Add a render item to the set of render items that will be used to draw the DAG object associated with the override that owns this container. Each item in the container must have a unique name and the same render item may not be used in the container more than once. When Viewport 2.0 draws the associated DAG object, it will process all render items in this container.
Any items that have valid geometry and a valid shader will be drawn as long as they pass all filtering tests for the active viewport.

On successful add, Maya assumes ownership of the render item and the caller should not call MRenderItem.destroy() on the item. Callers are free to hold the render item for easy access. Note that any MRenderItem objects added to MSubSceneContainer become invalid after the render item is removed from the container. Attempts to use such object will result in instability. Further note that it is invalid to modify any render item owned by this container outside of MPxSubSceneOverride.update().
Attempts to do so will result in unpredictable behavior.

* item (MRenderItem) - The item to add.
def OpenMayaRender.MSubSceneContainer.clear ( )
clear() -> self

Remove all render items from this container. After calling, any render items owned by this container will be invalid.
def OpenMayaRender.MSubSceneContainer.count ( )
count() -> int

Get the number of render items in the container.
def OpenMayaRender.MSubSceneContainer.find ( )
find(name) -> MRenderItem

Get a render item by name from the container. The ownership of the render item remains with the container and callers should not call MRenderItem.destroy() on it. The render items may be cached and will remain valid until removed from the container.

* name (string) - The name of the render item to retrieve.
def OpenMayaRender.MSubSceneContainer.getIterator ( )
getIterator() -> MSubSceneContainerIterator

Get an iterator for the container.
Caller is responsible for deleting the iterator when it is no longer needed.
def OpenMayaRender.MSubSceneContainer.remove ( )
remove(name) -> bool

Remove a render item by name from the set of render items used to draw the object associated with the override that owns this container. Note that on successful removal any render item that was removed become invalid and any attempts to use such items will result in instability.

* name (string) - The name of the render item to remove.