GroupPrimsCommand

class omni.usd.commands.GroupPrimsCommand(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None, destructive=True)

Bases: Command, UsdStageHelper

Group primitives to the same parent.

Methods

__init__(prim_paths[, stage, context_name, ...])

Constructor.

do()

undo()

__init__(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None, destructive=True)

Constructor.

Parameters
  • prim_paths (List[str]) – Prim paths that will be grouped.

  • stage (Usd.Stage, optional) – Stage to operate. Default is None, which means the stage in the default UsdContext is used.

  • context_name (str, optional) – The usd context to operate. Default is None, which means the default UsdContext is used. Param `stage`, to some extent, is duplicate to this param. They are both kept for back-compatibility.

  • destructive (bool, optional) – If it’s true, it will group all prims and remove original prims, which may edit other layers that are not edit target currently. If it’s false, all changes will be made only to the current edit target without touching other layers. By default, it’s true for back compatibility.