MoveSublayerCommand#
- class omni.kit.usd.layers.MoveSublayerCommand(
- from_parent_layer_identifier: str,
- from_sublayer_position: int,
- to_parent_layer_identifier: str,
- to_sublayer_position: int,
- remove_source: bool = False,
- usd_context: str | UsdContext = '',
Bases:
AbstractLayerCommandMoves sublayer from one location to the other.
Methods
__init__(from_parent_layer_identifier, ...)Constructor.
do_impl()Abstract do function to be implemented.
Abstract undo function to be implemented.
- __init__(
- from_parent_layer_identifier: str,
- from_sublayer_position: int,
- to_parent_layer_identifier: str,
- to_sublayer_position: int,
- remove_source: bool = False,
- usd_context: str | UsdContext = '',
Constructor.
- Keyword Arguments:
from_parent_layer_identifier (str) – The identifier of source parent layer.
from_sublayer_position (int) – The sublayer position in source parent layer to move.
to_parent_layer_identifier (str) – The identifier of target parent layer.
to_sublayer_position (int) – The sublayer position in target parent layer that layers moves to. If this position is -1, it means the last position of sublayer array. If this position is beyond the end of sublayer array. It means to move this layer to the end of that array. Otherwise, it’s invalid if it’s below 0.
remove_source (bool) – Remove source sublayer after moving to target or not.
usd_context (Union[str, omni.usd.UsdContext]) – Usd context name or instance. It uses default context if it’s empty.
- do_impl()#
Abstract do function to be implemented.
- undo_impl()#
Abstract undo function to be implemented.