Abstract class that is base for all pymel nodes classes.
The names of nodes and attributes can be passed to this class, and the appropriate subclass will be determined.
>>> PyNode('persp')
nt.Transform(u'persp')
>>> PyNode('persp.tx')
Attribute(u'persp.translateX')
If the passed node or attribute does not exist an error will be raised.
Returns the object’s name with a prefix added to the beginning of the name
Return type: | other.NameParser |
---|
This command returns a list of all attributes/objects of a specified type that are connected to the given object(s). If no objects are specified then the command lists the connections on selected nodes.
returns an empty list when the result is None
When ‘connections’ flag is True, the attribute pairs are returned in a 2D-array:
[['checker1.outColor', 'lambert1.color'], ['checker1.color1', 'fractal1.outColor']]
the paired list of plugs is returned in (source,destination) order instead of (thisnode,othernode) order. this puts the pairs in the order that disconnectAttr and connectAttr expect.
added ability to pass a list of types
rtype: | PyNode list |
---|
If true, return both attributes involved in the connection. The one on the specified object is given first. Default false.
Give the attributes/objects that are on the destinationside of connection to the given object. Default true.
When set to true, -t/type only considers node of this exact type. Otherwise, derived types are also taken into account.
If true, return the connected attribute names; if false, return the connected object names only. Default false;
Actually return the shape name instead of the transform when the shape is selected. Default false.
If true, skip over unit conversion nodes and return the node connected to the conversion node on the other side. Default false. Flag can have multiple arguments, passed either as a tuple or a list.
Give the attributes/objects that are on the sourceside of connection to the given object. Default true.
If specified, only take objects of a specified type.
Derived from mel command maya.cmds.listConnections
returns an empty list when the result is None
added a much needed ‘type’ filter
added an ‘exactType’ filter (if both ‘exactType’ and ‘type’ are present, ‘type’ is ignored)
rtype: | DependNode list |
---|
This command traverses backwards or forwards in the graph from the specified node and returns all of the nodes whose construction history it passes through. The construction history consists of connections to specific attributes of a node defined as the creators and results of the node’s main data, eg. the curve for a Nurbs Curve node. For information on history connections through specific plugs use the listConnectionscommand first to find where the history begins then use this command on the resulting node.
returns an empty list when the result is None
added a much needed ‘type’ filter
added an ‘exactType’ filter (if both ‘exactType’ and ‘type’ are present, ‘type’ is ignored)
rtype: | DependNode list |
---|
If listing the future, list all of it. Otherwise if a shape has an attribute that represents its output geometry data, and that plug is connected, only list the future history downstream from that connection.
By default, the traversal will remain in the current graph. If this flag is set to true, the traversal will descend into subgraphs, and ascend into parent graphs.
The breadth first traversal will return the closest nodes in the traversal first. The depth first traversal will follow a complete path away from the node, then return to any other paths from the node. Default is depth first.
List the future instead of the history.
This flag allows querying of the local-space future-related attribute(s) on shape nodes. Flag can have multiple arguments, passed either as a tuple or a list.
This flag allows querying of the world-space future-related attribute(s) on shape nodes.
The node names are grouped depending on the level. 1 is the lead, the rest are grouped with it.
This flag allows querying of the attribute where history connects on shape nodes.
If this flag is set, only nodes whose historicallyInteresting attribute value is not less than the value will be listed. The historicallyInteresting attribute is 0 on nodes which are not of interest to non-programmers. 1 for the TDs, 2 for the users.
If transform is selected, show history for its leaf shape. Default is true.
Levels deep to traverse. Setting the number of levels to 0 means do all levels. All levels is the default.
If this flag is set, prune at dag objects.
Derived from mel command maya.cmds.listHistory
This command returns a list of all attributes/objects of a specified type that are connected to the given object(s). If no objects are specified then the command lists the connections on selected nodes.
returns an empty list when the result is None
When ‘connections’ flag is True, the attribute pairs are returned in a 2D-array:
[['checker1.outColor', 'lambert1.color'], ['checker1.color1', 'fractal1.outColor']]
the paired list of plugs is returned in (source,destination) order instead of (thisnode,othernode) order. this puts the pairs in the order that disconnectAttr and connectAttr expect.
added ability to pass a list of types
rtype: | PyNode list |
---|
If true, return both attributes involved in the connection. The one on the specified object is given first. Default false.
Give the attributes/objects that are on the destinationside of connection to the given object. Default true.
When set to true, -t/type only considers node of this exact type. Otherwise, derived types are also taken into account.
If true, return the connected attribute names; if false, return the connected object names only. Default false;
Actually return the shape name instead of the transform when the shape is selected. Default false.
If true, skip over unit conversion nodes and return the node connected to the conversion node on the other side. Default false. Flag can have multiple arguments, passed either as a tuple or a list.
Give the attributes/objects that are on the sourceside of connection to the given object. Default true.
If specified, only take objects of a specified type.
Derived from mel command maya.cmds.listConnections
returns an empty list when the result is None
added a much needed ‘type’ filter
added an ‘exactType’ filter (if both ‘exactType’ and ‘type’ are present, ‘type’ is ignored)
rtype: | DependNode list |
---|
This command traverses backwards or forwards in the graph from the specified node and returns all of the nodes whose construction history it passes through. The construction history consists of connections to specific attributes of a node defined as the creators and results of the node’s main data, eg. the curve for a Nurbs Curve node. For information on history connections through specific plugs use the listConnectionscommand first to find where the history begins then use this command on the resulting node.
returns an empty list when the result is None
added a much needed ‘type’ filter
added an ‘exactType’ filter (if both ‘exactType’ and ‘type’ are present, ‘type’ is ignored)
rtype: | DependNode list |
---|
If listing the future, list all of it. Otherwise if a shape has an attribute that represents its output geometry data, and that plug is connected, only list the future history downstream from that connection.
By default, the traversal will remain in the current graph. If this flag is set to true, the traversal will descend into subgraphs, and ascend into parent graphs.
The breadth first traversal will return the closest nodes in the traversal first. The depth first traversal will follow a complete path away from the node, then return to any other paths from the node. Default is depth first.
List the future instead of the history.
This flag allows querying of the local-space future-related attribute(s) on shape nodes. Flag can have multiple arguments, passed either as a tuple or a list.
This flag allows querying of the world-space future-related attribute(s) on shape nodes.
The node names are grouped depending on the level. 1 is the lead, the rest are grouped with it.
This flag allows querying of the attribute where history connects on shape nodes.
If this flag is set, only nodes whose historicallyInteresting attribute value is not less than the value will be listed. The historicallyInteresting attribute is 0 on nodes which are not of interest to non-programmers. 1 for the TDs, 2 for the users.
If transform is selected, show history for its leaf shape. Default is true.
Levels deep to traverse. Setting the number of levels to 0 means do all levels. All levels is the default.
If this flag is set, prune at dag objects.
Derived from mel command maya.cmds.listHistory
Returns the namespace of the object with trailing colon included. See DependNode.parentNamespace for a variant which does not include the trailing colon.
Return type: | unicode |
---|
Useful for cascading references. Returns all of the namespaces of the calling object as a list
Return type: | unicode list |
---|
Returns the object’s name with its namespace removed. The calling instance is unaffected. The optional levels keyword specifies how many levels of cascading namespaces to strip, starting with the topmost (leftmost). The default is 0 which will remove all namespaces.
Return type: | other.NameParser |
---|
Returns the object’s name with its current namespace replaced with the provided one. The calling instance is unaffected.
Return type: | other.NameParser |
---|