AddXformOpCommand#
- class omni.kit.property.transform.AddXformOpCommand(
- payload,
- precision,
- rotation_order,
- add_translate_op,
- add_orient_op,
- add_scale_op,
- add_transform_op,
- add_pivot_op,
- add_rotateXYZ_op=None,
- add_rotate_xyz_op=None,
Bases:
Command
A class that encapsulates a command to add various transformation operations (xformOps) to a USD prim’s xformOpOrder.
This command allows for adding translation, rotation, scaling, orientation, transformation matrix, and pivot operations. The precision for these operations can be specified. It also handles the proper ordering of these operations within the xformOpOrder attribute of the prim.
- Args:
payload: The payload containing information about the stage and prims to modify. precision (UsdGeom.XformOp.Precision): The precision of the xformOps to be added. rotation_order (str): The order of rotation components (e.g., ‘XYZ’). add_translate_op (bool): Whether to add a translate operation. add_orient_op (bool): Whether to add an orientation operation. add_scale_op (bool): Whether to add a scale operation. add_transform_op (bool): Whether to add a transform operation (4x4 matrix). add_pivot_op (bool): Whether to add a pivot operation. add_rotateXYZ_op (bool, optional): Whether to add a rotate operation in XYZ order. Deprecated in favor of add_rotate_xyz_op. add_rotate_xyz_op (bool, optional): Whether to add a rotate operation in specified order.
Methods
__init__
(payload, precision, rotation_order, ...)Initializes the command to add a transformation operation.
do
()Executes the command to add the specified transformation operation.
undo
()Reverts the addition of the transformation operation.
- __init__(
- payload,
- precision,
- rotation_order,
- add_translate_op,
- add_orient_op,
- add_scale_op,
- add_transform_op,
- add_pivot_op,
- add_rotateXYZ_op=None,
- add_rotate_xyz_op=None,
Initializes the command to add a transformation operation.
- do()#
Executes the command to add the specified transformation operation.
- undo()#
Reverts the addition of the transformation operation.