class CloneSceneObjectUndoableOperation

Inherits: UndoableOperation

Clones one or multiple scene objects and allows you to undo the operation.

Public

Constructors

CloneSceneObjectUndoableOperation

CloneSceneObjectUndoableOperation(PrivatelyConstruct, const String &description, const Vector<HSceneObject> &originals)

Methods

staticExecute

static Vector<HSceneObject> Execute(const SPtr<UndoRedo> &undoRedo, const Vector<HSceneObject> &sceneObjects, const String &description = StringUtility::kBlank)

Creates and executes the operation on the provided scene objects.

Automatically registers the operation with undo/redo system.

undoRedo
Undo/redo system to register the operation with.
sceneObjects
Scene objects to clone.
description
Optional description of what exactly the operation does.

Commit

void Commit() override

Applies the command, committing the change.

Revert

void Revert() override

Reverts the command, reverting the change previously done with commit().

Private

Fields

mOriginals

Vector<HSceneObject> mOriginals

mClones

Vector<HSceneObject> mClones