DeleteFabricPrimsCommand

class omni.fabric.commands.scripts.extension.DeleteFabricPrimsCommand(paths: list[Union[str, usdrt.Sdf._Sdf.Path]], delete_descendents: bool = True, stage: Optional[Stage] = None, context_name: Optional[str] = None)

Bases: Command, FabricStageHelper

A command for deleting prims from a Fabric stage.

The command removes the specified prims and their descendants from the stage, if allowed by the current stage settings. It supports undo and redo operations.

Parameters
  • paths – List[Union[str, usdrt.Sdf.Path]] The Fabric paths of the prims to be deleted.

  • delete_descendents – bool Whether to delete descendants of the specified prims.

  • stage – Optional[usdrt.Usd.Stage] The stage from which the prims will be deleted.

  • context_name – Optional[str] The name of the context to use for the operation.

Methods

__init__(paths[, delete_descendents, stage, ...])

Creates a command to delete the specified Fabric prims.

do()

Executes the deletion of the specified Fabric prims.

undo()

Undoes the deletion of the specified Fabric prims, restoring them to the stage.

__init__(paths: list[Union[str, usdrt.Sdf._Sdf.Path]], delete_descendents: bool = True, stage: Optional[Stage] = None, context_name: Optional[str] = None)

Creates a command to delete the specified Fabric prims.

do()

Executes the deletion of the specified Fabric prims.

undo()

Undoes the deletion of the specified Fabric prims, restoring them to the stage.