|
Cogs.Core
|
Public Member Functions | |
| RemapMaterialCommand (EditorState *state, EntityId entityId) | |
| void | apply () override |
| Run the command. | |
| void | undo () override |
Public Member Functions inherited from Cogs::Core::EditorCommand | |
| EditorCommand (EditorState *state, Context *context) | |
| virtual void | apply ()=0 |
| Run the command. | |
| virtual void | undo ()=0 |
| virtual void | redo () |
| virtual bool | mergeWith (const EditorCommand *) |
| virtual MeshHandle | applyMesh (MeshHandle) |
| Workaround for having extendable mesh processing available without linking (e.g command -> RR). | |
| virtual void | close () |
| Close command, i.e. prevent merging with another command. | |
| bool | isClosed () const |
| bool | merge (const EditorCommand *command) |
| Merge into this if not this is closed. | |
Private Attributes | |
| EntityId | entityId |
| std::unordered_map< EntityId, MaterialInstanceHandle > | materials |
Additional Inherited Members | |
Public Attributes inherited from Cogs::Core::EditorCommand | |
| std::vector< ParsedValue > | options |
| Options passed to the command when running in batch mode. | |
| bool | permanentUndo = false |
| True if cannot Redo after Undo. | |
Protected Attributes inherited from Cogs::Core::EditorCommand | |
| EditorState * | state = nullptr |
| Context * | context = nullptr |
Definition at line 65 of file ResourceCommands.h.
|
inline |
Definition at line 67 of file ResourceCommands.h.
|
overridevirtual |
Run the command.
In batch scripts this method is called for all type of commands. In interactive mode this method is not called for model commands (subclasses of ModalEditorCommand)
Implements Cogs::Core::EditorCommand.
Definition at line 66 of file ResourceCommands.cpp.
References Cogs::StringView::empty(), Cogs::ComponentModel::Entity::getComponent(), Cogs::Core::ResourceBase::getName(), Cogs::Core::LinearColorSpace, Cogs::Core::MeshRenderComponent::material, Cogs::Core::None, Cogs::StringView::NoPosition, Cogs::StringView::substr(), and Cogs::StringView::to_string().
|
overridevirtual |
Implements Cogs::Core::EditorCommand.
Definition at line 176 of file ResourceCommands.cpp.
|
private |
Definition at line 73 of file ResourceCommands.h.
|
private |
Definition at line 75 of file ResourceCommands.h.