maya.types.transform¶
Transform node type wrapper.
Classes¶
Wrapper for transform nodes. |
Module Contents¶
- class Transform(*args, **kwargs)¶
Bases:
maya.core.dagnode.DagNodeWrapper for transform nodes.
- collect_hierarchy(node_types=None, include_self=False, max_depth=-1)¶
Collect nodes in the hierarchy under this transform.
- Args:
- node_types (list[str], optional): List of node types to include.
If None, includes all types. Defaults to None.
- include_self (bool, optional): Whether to include this node.
Defaults to False.
- max_depth (int, optional): Maximum depth to traverse.
-1 for unlimited. Defaults to -1.
- Returns:
list[DagNode]: List of collected nodes.
- collect_shape_transforms(shape_types=None)¶
Get transforms of shapes under hierarchy of given node.
- classmethod create(**kwargs)¶
Create a transform node.
- create_offset_group(name: str = None) Transform¶
Create an offset transform above this transform in the hierarchy.
- Args:
- name (str, optional): Name for the offset transform.
If None, defaults to “<this_node_name>_OFFSET”. Defaults to None.
- Returns:
Transform: The created offset transform node.
- freeze(translate=True, rotate=True, scale=True)¶
Freeze the transformations on this transform node.
- snap_to(target, position=True, rotation=True, scale=False)¶
Snap this transform to another transform’s position, rotation, and/or scale.
- property matrix¶
Return the local matrix of this transform node.
- Returns:
OpenMaya.MMatrix: Local transformation matrix.
- property parent_matrix¶
Return the local matrix of this transform node’s parent.
- Returns:
OpenMaya.MMatrix: Parent’s local transformation matrix.
- property rotate¶
Get or set the rotation of this transform node.
- property rotate_x¶
Get or set the X rotation of this transform node.
- property rotate_y¶
Get or set the Y rotation of this transform node.
- property rotate_z¶
Get or set the Z rotation of this transform node.
- property scale¶
Get or set the scale of this transform node.
- property scale_x¶
Get or set the X scale of this transform node.
- property scale_y¶
Get or set the Y scale of this transform node.
- property scale_z¶
Get or set the Z scale of this transform node.
- property translate¶
Get or set the translation of this transform node.
- property translate_x¶
Get or set the X translation of this transform node.
- property translate_y¶
Get or set the Y translation of this transform node.
- property translate_z¶
Get or set the Z translation of this transform node.
- property world_matrix¶
Return the world matrix of this transform node.
- Returns:
OpenMaya.MMatrix: World transformation matrix.
- property world_translation¶
Return the world translation of this transform’s rotate pivot.
- Returns:
OpenMaya.MVector: World translation of the rotate pivot.