CopyFabricPrimsCommand

class omni.fabric.commands.scripts.commands.CopyFabricPrimsCommand(paths_from: list[str], paths_to: Optional[list[str]] = None)

Bases: Command

A command for copying and pasting Fabric prims within a stage.

This command duplicates one or more Fabric prims to new locations within the same Fabric stage, preserving their properties and relationships. It supports undo and redo capabilities.

Parameters
  • paths_from (list[str]) – The source paths of the prims to copy.

  • paths_to (list[str], optional) – The destination paths for the copied prims. If `None` or length smaller than paths_from, then the next free path is generated for missing paths.

Methods

__init__(paths_from[, paths_to])

Creates a command for copying multiple Fabric prims to new locations.

do()

Executes the command to copy multiple Fabric prims to the specified new locations.

undo()

Undoes the copy operation, effectively removing the copied prims.

__init__(paths_from: list[str], paths_to: Optional[list[str]] = None)

Creates a command for copying multiple Fabric prims to new locations.

do()

Executes the command to copy multiple Fabric prims to the specified new locations.

undo()

Undoes the copy operation, effectively removing the copied prims.