ModifyLayerMetadataCommand

class omni.kit.property.layer.commands.ModifyLayerMetadataCommand(layer_identifier, parent_layer_identifier, meta_index, value)

Bases: Command

A command for modifying layer metadata in an undoable manner.

This command allows for the modification of various metadata fields of a layer within a stage. It captures the current state of the metadata so that it can be restored on undo.

Parameters
  • layer_identifier (str) – The unique identifier of the layer to modify.

  • parent_layer_identifier (str) – The unique identifier of the parent layer, if the target layer is a sublayer. None if the layer is a root layer.

  • meta_index (LayerMetaType) – The type of metadata to modify.

  • value – The new value to set for the specified metadata field.

Methods

__init__(layer_identifier, ...)

Initializes the ModifyLayerMetadataCommand with the provided metadata information.

do()

Executes the command to modify layer metadata.

undo()

Reverts the changes made by the 'do' method.

__init__(layer_identifier, parent_layer_identifier, meta_index, value)

Initializes the ModifyLayerMetadataCommand with the provided metadata information.

do()

Executes the command to modify layer metadata.

undo()

Reverts the changes made by the ‘do’ method.