Node
Node
¶
A node the file creates, or a default node whose attributes it edits.
Attributes¶
name
¶
name: str
Name, with its namespace (ns:target).
Setting it is rename(value) with its defaults.
parent
¶
parent: Node | None
The parent node, or None for a root node or a parent outside this file.
parent_name
¶
parent_name: str | None
Parent as stored: a short name, or a DAG path when the name is ambiguous.
paths
¶
Every DAG path of the node, path first: one per parent (instancing
adds parents), times the paths of each parent.
Methods:¶
attr
¶
The stored attribute named name, by short or long name (ftn,
fileTextureName, uvst[0].uvsn, uvSet[0].uvSetName).
Attributes missing from Maya's schema, addAttr ones included, match
their stored name only.
rename
¶
Rename the node and rewrite every stored reference to it.
Rewritten: parents, connections, relationships, reference edits and the
externalContentTable (on save). Like maya.cmds.rename, renaming a
transform also renames its shapes whose name starts with the old name
(boxShape > crateShape), unless shapes is False.
in_strings also rewrites node names inside string attribute values
that name a node ("box", "|grp|box.tx") and inside the MEL of
expressions and script nodes (getAttr box.ty). Maya does not, and
a string that only looks like a node name (box.exr) is rewritten too.