OpenMaya.MFnDagNode Class Reference
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
Base Class
MFnDependencyNode
Constructors
| Signature | Parameters | Description |
| MFnDagNode() | | Default constructor. Returns a new MFnDagNode function set with no Maya object attached.
|
| MFnDagNode(object) | object - MObject | Returns a new MFnDagNode function set, attached to the specified Maya object.
|
| MFnDagNode(path) | path - MDagPath | Returns a new MFnDagNode function set, attached to the object at the end of the specified DAG path.
|
| OpenMaya.MFnDagNode.__init__ |
( |
| ) |
|
x.__init__(...) initializes x; see help(type(x)) for signature
| OpenMaya.MFnDagNode.addChild |
( |
| ) |
|
addChild(node, index=kNextPos, keepExistingParents=False) -> self
Makes a node a child of this one.
| Signature: | addChild(node, index=kNextPos, keepExistingParents=False) |
| Parameters: | 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.
| Signature: | child(index) |
| Parameters: | index - int |
| Returns: | MObject |
| Description: | Returns the node's index'th child. |
| OpenMaya.MFnDagNode.childCount |
( |
| ) |
|
childCount() -> int
Returns the number of nodes which are children of this one.
| Signature: | childCount() |
| Parameters: | |
| Returns: | int |
| Description: | 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.
| Signature: | create(type, name=None, parent=MObject.kNullObj) |
| Parameters: | type - string or MTypeId
name - string
parent - MObject |
| Returns: | MObject<span>
|
| Description: | 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.
| Signature: | dagPath() |
| Parameters: | |
| Returns: | MDagPath |
| Description: | 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.
| Signature: | dagRoot() |
| Parameters: | |
| Returns: | MObject |
| Description: | Returns the root node of the first path leading to this node. |
| OpenMaya.MFnDagNode.duplicate |
( |
| ) |
|
duplicate(instance=False, instanceLeaf=False) -> MObject
Duplicates the DAG hierarchy rooted at the current node.
| Signature: | duplicate(instance=False, instanceLeaf=False) |
| Parameters: | instance - bool
instanceLeaf - bool |
| Returns: | MObject |
| Description: | 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.
| Signature: | fullPathName() |
| Parameters: | |
| Returns: | string |
| Description: | Returns the full path of the attached object, from the root of the DAG on down. |
| OpenMaya.MFnDagNode.getAllPaths |
( |
| ) |
|
getAllPaths() -> MDagPathArray
Returns all of the DAG paths which lead to the object to which this function set is attached.
| Signature: | getAllPaths() |
| Parameters: | |
| Returns: | MDagPathArray |
| Description: | 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.
| Signature: | getPath() |
| Parameters: | |
| Returns: | MDagPath |
| Description: | 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.
| Signature: | hasChild(node) |
| Parameters: | node - MObject |
| Returns: | bool |
| Description: | Returns True if node is a child of this node. |
| OpenMaya.MFnDagNode.hasParent |
( |
| ) |
|
hasParent(node) -> bool
Returns True if the specified node is a parent of this one.
| Signature: | hasParent(node) |
| Parameters: | node - MObject |
| Returns: | bool |
| Description: | Returns True if node is a parent of this node. |
| OpenMaya.MFnDagNode.instanceCount |
( |
| ) |
|
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.
| Signature: | isChildOf(node) |
| Parameters: | node - MObject |
| Returns: | bool |
| Description: | Alias for hasParent(). |
| OpenMaya.MFnDagNode.isInstanced |
( |
| ) |
|
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.
| Signature: | isInstancedAttribute(attr) |
| Parameters: | attr - MObject |
| Returns: | bool |
| Description: | Returns True if attr is an instanced attribute of this node. |
| OpenMaya.MFnDagNode.isParentOf |
( |
| ) |
|
isParentOf(node) -> bool
Returns True if the specified node is a child of this one.
| Signature: | isParentOf(node) |
| Parameters: | node - MObject |
| Returns: | bool |
| Description: | Alias for hasChild(). |
| OpenMaya.MFnDagNode.parent |
( |
| ) |
|
parent(index) -> MObject
Returns the specified parent of this node.
| Signature: | parent(index) |
| Parameters: | index - int |
| Returns: | MObject |
| Description: | Returns the node's index'th parent. |
| OpenMaya.MFnDagNode.parentCount |
( |
| ) |
|
parentCount() -> int
Returns the number of parents this node has.
| Signature: | parentCount() |
| Parameters: | |
| Returns: | int |
| Description: | Returns the number of different nodes under which this one is parented. |
| OpenMaya.MFnDagNode.partialPathName |
( |
| ) |
|
partialPathName() -> string
Returns the minimum path string necessary to uniquely identify the attached object.
| Signature: | partialPathName() |
| Parameters: | |
| Returns: | string |
| Description: | Returns the minimum path necessary to uniquely identify the attached object. |
| OpenMaya.MFnDagNode.removeChild |
( |
| ) |
|
removeChild(node) -> self
Removes the child, specified by MObject, reparenting it under the world.
| Signature: | removeChild(node) |
| Parameters: | node - MObject |
| Returns: | Reference to self. |
| Description: | Removes node as a child of this node. |
| OpenMaya.MFnDagNode.removeChildAt |
( |
| ) |
|
removeChildAt(index) -> self
Removes the child, specified by index, reparenting it under the world.
| Signature: | removeChildAt(index) |
| Parameters: | index - int |
| Returns: | Reference to self. |
| Description: | Removes the index'th child from this node. |
| OpenMaya.MFnDagNode.setObject |
( |
| ) |
|
setObject(MObject or MDagPath) -> self
Attaches the function set to the specified node or DAG path.
| Signature: | setObject(object) |
| Parameters: | object - MObject |
| Returns: | Reference to self. |
| Description: | Attaches the function set to the specified object. |
| Signature: | setObject(path) |
| Parameters: | object - MDagPath |
| Returns: | Reference to self. |
| Description: | Attaches the function set to the specified DAG path. |
| OpenMaya.MFnDagNode.transformationMatrix |
( |
| ) |
|
transformationMatrix() -> MMatrix
Returns the object space transformation matrix for this DAG node.
| Signature: | transformationMatrix() |
| Parameters: | |
| Returns: | MMatrix |
| Description: | 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. |
| OpenMaya.MFnDagNode.kNextPos = 255 |
|
static |
| Name: | kNextPos |
| Type: | int |
| Description: | Used by addChild() to indicate the next empty position in the list. |
| OpenMaya.MFnDagNode.boundingBox |
|
static |
Node's bounding box, in object space.
| OpenMaya.MFnDagNode.inModel |
|
static |
True if the node has been added to the model.
| Name: | inModel |
| Type: | bool |
| Access: | R |
| Description: | |
| OpenMaya.MFnDagNode.inUnderWorld |
|
static |
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: | |