class
CreateSceneObjectUndoableOperation
Inherits:
UndoableOperation
Creates a scene object and allows you to undo the operation.
Public
Constructors
CreateSceneObjectUndoableOperation
CreateSceneObjectUndoableOperation(PrivatelyConstruct, const String &description, const String &name, u32 flags)
CreateSceneObjectUndoableOperation
CreateSceneObjectUndoableOperation(PrivatelyConstruct, const String &description, const String &name, const Vector<u32> &componentTypeIds, u32 flags)
Methods
staticExecute
static HSceneObject Execute(const SPtr<UndoRedo> &undoRedo, const String &name, u32 flags, const String &description = StringUtility::kBlank)
Creates a new scene object.
Automatically registers the operation with undo/redo system.
- undoRedo
- Undo/redo system to register the operation with.
- name
- Name of the scene object.
- flags
- Optional creation flags for the scene object.
- description
- Optional description of what exactly the operation does.
Returns: Newly created scene object.
staticExecuteWithComponents
static HSceneObject ExecuteWithComponents(const SPtr<UndoRedo> &undoRedo, const String &name, u32 flags, const Vector<u32> &componentTypeIds, const String &description = StringUtility::kBlank)
Creates a new scene object with an initial set of components.
Automatically registers the operation with undo/redo system.
- undoRedo
- Undo/redo system to register the operation with.
- name
- Name of the scene object.
- flags
- Optional creation flags for the scene object.
- componentTypeIds
- A list of type ID's of the components to add to the scene object.
- description
- Optional description of what exactly the operation does.
Returns: Newly created scene object.
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
mName
String mName
mFlags
u32 mFlags
mSceneObject
HSceneObject mSceneObject
mComponentTypeIds
Vector<u32> mComponentTypeIds