maya.core.node ============== .. py:module:: maya.core.node .. autoapi-nested-parse:: Base Node wrapper around Maya dependency nodes. This module is also a fallback for all unregistered node types. Attributes ---------- .. autoapisummary:: maya.core.node.LOG Classes ------- .. autoapisummary:: maya.core.node.Node Module Contents --------------- .. py:class:: Node(long_name, **kwargs) Base wrapper around a Maya dependency node or DAG node. .. py:method:: 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. .. py:method:: create(cmd, name=None, parent=None) :classmethod: Create a node using a maya.cmds command name. Example: 'joint', 'polySphere'. .. py:method:: delete() Delete the node from the scene. .. py:method:: delete_attr(attr_name) Delete an attribute from the node. Args: attr_name (str): The name of the attribute to delete. .. py:method:: delete_history() Delete the construction history of the node. .. py:method:: duplicate(**kwargs) Duplicate the node in the scene. Returns: Node: A new Node instance representing the duplicated node. .. py:method:: exists() -> bool Return True if the wrapped node still exists in the scene. .. py:method:: 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. .. py:method:: rename(new_name) Rename the node. .. py:attribute:: is_dag :value: False .. py:property:: long_name The full DAG path of the node. .. py:property:: m_obj Return valid MObject, re-resolving from UUID if stale. .. py:property:: name The name of the node. .. py:property:: type The type of the node. .. py:property:: uuid The UUID of the node. .. py:data:: LOG