ReplaceSublayerCommand#

class omni.kit.usd.layers.ReplaceSublayerCommand(
layer_identifier: str,
sublayer_position: int,
new_layer_path: str,
usd_context: str | UsdContext = '',
)#

Bases: AbstractLayerCommand

Replaces sublayer with a new layer.

Methods

__init__(layer_identifier, ...[, usd_context])

Constructor.

do_impl()

Abstract do function to be implemented.

undo_impl()

Abstract undo function to be implemented.

__init__(
layer_identifier: str,
sublayer_position: int,
new_layer_path: str,
usd_context: str | UsdContext = '',
)#

Constructor.

Keyword Arguments:
  • layer_identifier (str) – The identifier of layer to replace sublayer.

  • sublayer_position (int) – The sublayer position to be replaced.

  • new_layer_path (str) – The path of new layer.

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