DeletePrimsCommand

class omni.usd.commands.DeletePrimsCommand(paths: List[Union[str, Path]], destructive=True, stage: Optional[Stage] = None, context_name: Optional[str] = None)

Bases: Command, UsdStageHelper

Delete primitives undoable Command.

Parameters
  • paths (List[str]) – Paths to prims to delete.

  • destructive

    If it’s false, the delete will only happen in the current target, and follows: 1. If the prim spec is a def, it will remove the prim spec. 2. If the prim spec is a over, it will only deactivate this prim. 3. If the prim spec is not existed, it will create over prim and deactivate it. 4. If there is an overridden in a stronger layer, it will report errors.

    If it’s true, it will remove all prim specs in all local layers.

    By default, it’s True and means the delete operation is destructive for back-compatibility.

  • stage (Usd.Stage) – Stage to operate. Optional.

  • context_name (str) – The usd context to operate. Optional.

Methods

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

do()

undo()

__init__(paths: List[Union[str, Path]], destructive=True, stage: Optional[Stage] = None, context_name: Optional[str] = None)