ToggleVisibilitySelectedPrimsCommand#

class omni.usd.commands.ToggleVisibilitySelectedPrimsCommand(
selected_paths: List[str],
stage: Stage | None = None,
visible: bool | None = None,
)#

Bases: Command

Toggles the visiblity of the selected primitives.

This command will invert the visibilities for the specified list of primitives. Therefore, those visible primitives will be invisible after this command, and vice versa for invisible primitives.

Methods

__init__(selected_paths[, stage, visible])

Constructor.

do()

undo()

__init__(
selected_paths: List[str],
stage: Stage | None = None,
visible: bool | None = None,
)#

Constructor.

Parameters:
  • selected_paths (List[str]) – A list of prim paths to toggle visibility.

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

  • visible (Optional[bool]) – By default, it’s None that means to invert the visibility state for each prim. When it’s set as a bool value, it will set all visibilities to the specified value instead of inverting them.