ModifyStageAxisCommand

class omni.kit.property.layer.commands.ModifyStageAxisCommand(stage, axis)

Bases: Command

Modify stage up axis undoable Command.

This command changes the up axis of a given USD stage to a specified axis. It keeps track of the original axis to allow undo operations.

Parameters
  • stage – A weak reference to the USD stage that will be modified.

  • axis (str) – The new up axis to be set on the stage (‘X’, ‘Y’, or ‘Z’).

Methods

__init__(stage, axis)

Initialize the ModifyStageAxisCommand.

do()

Executes the command to modify the stage up axis.

undo()

Reverts the stage up axis to its previous state.

__init__(stage, axis)

Initialize the ModifyStageAxisCommand.

do()

Executes the command to modify the stage up axis.

undo()

Reverts the stage up axis to its previous state.