ParentPrimsCommand

class omni.usd.commands.ParentPrimsCommand(parent_path: str, child_paths: List[str], on_move_fn: Optional[callable] = None, keep_world_transform: bool = True, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)

Bases: Command

Methods

__init__(parent_path, child_paths[, ...])

Move prims into children of "parent" primitives undoable Command.

do()

undo()

__init__(parent_path: str, child_paths: List[str], on_move_fn: Optional[callable] = None, keep_world_transform: bool = True, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)

Move prims into children of “parent” primitives undoable Command.

Parameters
  • parent_path – prim path to become parent of child_paths

  • child_paths – prim paths to become children of parent_prim

  • keep_world_transform – If it needs to keep the world transform after parenting.

  • stage_or_context (Union[str, Usd.Stage, omni.usd.UsdContext]) – Stage or UsdContext applies the changes to. It can be instance of Usd.Stage or omni.usd.UsdContext, or context name. By default, it will apply the changes to the stage in default UsdContext.