Function set for operating on DAG nodes.
__init__()
Initializes a new, empty MFnDagNode functionset.
__init__(MObject)
Initializes a new MFnDagNode functionset and attaches it to a
DAG node.
__init__(MDagPath)
Initializes a new MFnDagNode functionset and attaches it to a
DAG path.
Method resolution order:
- MFnDagNode
- MFnDependencyNode
- MFnBase
- __builtin__.object
node - MObject
index - int
keepExistingParents - bool
Returns:
Reference to self.
Description:
Parent's node under this node, making it the index'th child and moving other children down to make room, if necessary. If index is kNextPos then it is added to the end of the list of children. If keepExistingParents is False the child node will be removed from its existing parents, otherwise they will be retained.
OpenMaya.MFnDagNode.child
(
)
child(index) -> MObject
Returns the specified child of this node.
Returns the number of nodes which are parented under this one.
OpenMaya.MFnDagNode.create
(
)
create(type, name=None, parent=MObject.kNullObj) -> MObject
Creates a new DAG node of the specified type, with the given name.
The type may be either a type name or a type ID. If no name is given
then a unique name will be generated by combining the type name with
an integer.
If a parent is given then the new node will be parented under it and
the functionset will be attached to the newly-created node. The
newly-created node will be returned.
If no parent is given and the new node is a transform, it will be
parented under the world and the functionset will be attached to the
newly-created transform. The newly-created transform will be returned.
If no parent is given and the new node is not a transform then a
transform node will be created under the world, the new node will be
parented under it, and the functionset will be attached to the
transform. The transform will be returned.
Creates a new DAG node of the specified type, with the given name. type may be either a type name or a type ID. If no name is given then a unique name will be generated by combining the type name with an integer.
If a parent is given then the new node will be parented under it and the functionset will be attached to the newly-created node. The newly-created node will be returned.
If no parent is given and the new node is a transform, it will be parented under the world and the functionset will be attached to the newly-created transform. The newly-created transform will bereturned.
If no parent is given and the new node is not a transform then a transform node will be created under the world, the new node will be parented under it, and the functionset will be attached to the transform. The transform will be returned.
OpenMaya.MFnDagNode.dagPath
(
)
dagPath() -> MDagPath
Returns the DAG path to which this function set is attached. Raises a TypeError if the function set is attached to an MObject rather than a path.
Returns the DAG path to which this function set is attached. Raises a TypeError if the function set is not attached to a path (e.g. it was initialized with an MObject).
OpenMaya.MFnDagNode.dagRoot
(
)
dagRoot() -> MObject
Returns the root node of the first path leading to this node.
Duplicates the DAG hierarchy rooted at the current node. The copy will have the same parent, if any, as the original node. If instance is false then a true copy will be made, otherwise a new node will be created which instances the child nodes of the original node. If instance is false then instanceLeaf is ignored. If instance is true and instanceLeaf is false then the child nodes of the original node are instanced. If instanceLeaf is true, then the results are similar to a copy, but the leaf level objects are instanced. Returns the new node at the top of the duplicated hierarchy.
OpenMaya.MFnDagNode.fullPathName
(
)
fullPathName() -> string
Returns the full path of the attached object, from the root of the DAG on down.
Returns all of the DAG paths which lead to the object to which this function set is attached.
OpenMaya.MFnDagNode.getConnectedSetsAndMembers
(
)
getConnectedSetsAndMembers(instance, renderableSetsOnly) -> (MObjectArray, MObjectArray)
Returns a tuple containing an array of sets and an array of the
components of the DAG object which are in those sets. If the entire object is in a set, then the corresponding entry in the comps array will have no elements in it.
OpenMaya.MFnDagNode.getPath
(
)
getPath() -> MDagPath
Returns the DAG path to which this function set is attached, or the first path to the node if the function set is attached to an MObject.
Returns the DAG path to which this function set is attached. If the function set is attached to an MObject rather tha a DAG path then the first path to the object will be returned.
OpenMaya.MFnDagNode.hasChild
(
)
hasChild(node) -> bool
Returns True if the specified node is a child of this one.
instanceCount(indirect) -> int
Returns the number of instances for this node.
Signature:
instanceCount(indirect)
Parameters:
indirect - bool
Returns:
int
Description:
Returns the number of instances for this node. If indirect is True then the instancing of ancestor nodes further up the DAG path is included, otherwise only the immediate instancing of this node is counted.
OpenMaya.MFnDagNode.isChildOf
(
)
isChildOf(node) -> bool
Returns True if the specified node is a parent of this one.
isInstanced(indirect=True) -> bool
Returns True if this node is instanced.
Signature:
isInstanced(indirect=True)
Parameters:
indirect - bool
Returns:
bool
Description:
Returns True if this node is instanced (i.e. has multiple parents). If indirect is True then the instancing of ancestor nodes further up the DAG path is included, otherwise not.
OpenMaya.MFnDagNode.isInstancedAttribute
(
)
isInstancedAttribute(attr) -> bool
Returns True if the specified attribute is an instanced attribute of this node.
Returns the object space transformation matrix for this DAG node. In general, only transform nodes have matrices associated with them. Nodes such as shapes (geometry nodes) do not have transform matrices. The identity matrix will be returned if this node does not have a transformation matrix.
Member Data Documentation
OpenMaya.MFnDagNode.kNextPos = 255
static
Name:
kNextPos
Type:
int
Description:
Used by addChild() to indicate the next empty position in the list.
True if this node is in the underworld of another node (e.g. a curve on surface is in the underworld of the surface).
Name:
inUnderWorld
Type:
bool
Access:
R
Description:
OpenMaya.MFnDagNode.isInstanceable
static
True if instancing is allowed for this node.
Name:
isInstanceable
Type:
bool
Access:
RW
Description:
OpenMaya.MFnDagNode.isIntermediateObject
static
True if this node is just an intermediate in part of a larger calculation (e.g. input to a deformer).
Name:
isIntermediateObject
Type:
bool
Access:
RW
Description:
OpenMaya.MFnDagNode.objectColor
static
Index from 0 to 7 indicating the color in which the node is to be drawn when inactive, assuming that it is drawable.
Name:
objectColor
Type:
int
Access:
RW
Description:
OpenMaya.MFnDagNode.objectColorRGB
static
RGB value indicating the color in which the node is to be drawn when inactive, assuming that it is drawable.
OpenMaya.MFnDagNode.objectColorType
static
Determines whether the default color, indexed object color, orRGB object color is used for this object.
OpenMaya.MFnDagNode.useObjectColor
static
If True then the node will be drawn using its 'objectColor', otherwise it will be drawn using Maya's default color. Thismethod is deprecated, use objectColorType instead.
Name:
useObjectColor
Type:
bool
Access:
RW
Description:
The documentation for this class was generated from the following files: