maya.core.node¶
Base Node wrapper around Maya dependency nodes.
This module is also a fallback for all unregistered node types.
Attributes¶
Classes¶
Base wrapper around a Maya dependency node or DAG node. |
Module Contents¶
- class Node(long_name, **kwargs)¶
Base wrapper around a Maya dependency node or DAG node.
- add_attr(attr_name, **kwargs)¶
Add a new attribute to the node.
- Args:
attr_name (str): The name of the attribute to add. **kwargs: Additional keyword arguments to pass to cmds.addAttr.
- Returns:
Plug: A Plug instance representing the newly added attribute.
- classmethod create(cmd, name=None, parent=None)¶
Create a node using a maya.cmds command name.
Example: ‘joint’, ‘polySphere’.
- delete()¶
Delete the node from the scene.
- delete_attr(attr_name)¶
Delete an attribute from the node.
- Args:
attr_name (str): The name of the attribute to delete.
- delete_history()¶
Delete the construction history of the node.
- duplicate(**kwargs)¶
Duplicate the node in the scene.
- Returns:
Node: A new Node instance representing the duplicated node.
- exists() bool¶
Return True if the wrapped node still exists in the scene.
- has_attr(attr_name)¶
Check if the node has the given attribute.
- Args:
attr_name (str): The name of the attribute to check.
- Returns:
bool: True if the attribute exists, False otherwise.
- rename(new_name)¶
Rename the node.
- is_dag = False¶
- property long_name¶
The full DAG path of the node.
- property m_obj¶
Return valid MObject, re-resolving from UUID if stale.
- property name¶
The name of the node.
- property type¶
The type of the node.
- property uuid¶
The UUID of the node.
- LOG¶