ToggleActivePrimsCommand

class omni.usd.commands.ToggleActivePrimsCommand(prim_paths: List[Path], stage_or_context: Optional[Union[str, Stage, UsdContext]] = None, active: Optional[bool] = None)

Bases: Command

Undoable command to toggle the active state of prims.

Methods

__init__(prim_paths[, stage_or_context, active])

Constructor.

do()

undo()

__init__(prim_paths: List[Path], stage_or_context: Optional[Union[str, Stage, UsdContext]] = None, active: Optional[bool] = None)

Constructor.

Parameters
  • prim_paths (List[Sdf.Path]) – A list of prim paths.

  • 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.

  • active (Union[bool, None]) – If active flag is not None, it will set the active states to the value specified by it. Otherwise, it will revert the active states of prims.