CopyFabricPrimCommand#
- class omni.fabric.commands.scripts.CopyFabricPrimCommand(
- path_from: str,
- path_to: str | None = None,
- exclusive_select: bool = True,
- usd_context_name: str = '',
Bases:
Command
A command to copy a Fabric prim to a new location.
This command is used to duplicate a specified Fabric prim and place it under a new path within the same stage. It supports undo and redo operations.
- Parameters:
path_from – str The source path of the Fabric prim to copy.
path_to – Optional[str] The destination path for the copied prim. If None, a new unique path is generated.
exclusive_select – bool If True, the copied prim will be exclusively selected; otherwise, it won’t affect the selection.
usd_context_name – str The name of the USD context. Defaults to an empty string, which uses the default context.
Methods
__init__
(path_from[, path_to, ...])Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
do
()Executes the command to copy a Fabric prim to a new location.
undo
()Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.
- __init__(
- path_from: str,
- path_to: str | None = None,
- exclusive_select: bool = True,
- usd_context_name: str = '',
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
- do()#
Executes the command to copy a Fabric prim to a new location.
- undo()#
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.