maya.core.dagnode

DAG (Directed Acyclic Graph) node wrapper for Maya.

Classes

DagNode

DAG-capable node wrapper with parent/children queries.

Module Contents

class DagNode(*args, **kwargs)

Bases: maya.core.node.Node

DAG-capable node wrapper with parent/children queries.

classmethod create(cmd, name=None, parent=None)

Create a node using a maya.cmds command name.

Example: ‘joint’, ‘polySphere’.

get_color(as_color=False)

Get the display color of the controller shapes.

Args:
as_color (bool, optional): If True, and if its RGB colors,

return a tik.core.color.Color obj.

get_parent()

Return the parent as a wrapped node (or None if no parent).

is_deformable()

Check if this node is a deformable geometry type.

rename(new_name)

Rename the node.

select()

Select this node in the Maya scene.

set_color(color)

Set the display color of the controller shapes.

Args:
color (int | tuple | list | Color):
  • int: Maya index color (0-31)

  • tuple/list: RGB values (0.0 - 1.0)

  • tik.core.Color: Color object

  • None: Disable color override

set_parent(new_parent: Any, relative: bool = False) None

Set a new parent for this node.

Args:

new_parent: New parent node (str, Node wrapper, or None for world). relative: If True, keep local transforms (no world-space compensation).

If False (default), preserve world-space placement by compensating transforms after parenting (similar to cmds.parent(relative=False)).

property bounding_box

Return the world axis-aligned bounding box of this node.

Returns:

OpenMaya.MBoundingBox: The bounding box in world space.

property children

Return children as wrapped nodes.

Returns:

list: List of child node wrappers.

property color

Get or set the display color of the node.

Can be set to:
  • int: Maya index color (0-31)

  • tuple/list: RGB values (0.0-1.0)

  • Color: tik.core.Color object

  • None: Disable color override

property dag_path

Return the MDagPath for this node.

Returns:

OpenMaya.MDagPath: The DAG path of this node.

is_dag = True
property parent

Return the parent as a wrapped node (or None if no parent).

Returns:

Node wrapper or None: The parent node, or None if this is a world-level node.

property visibility

Get or set the visibility of this transform node.