3#include "../EditorExtension.h"
4#include "../EditorState.h"
6#include "Editor/EditorCommand.h"
8#include "Utilities/Parsing.h"
10#include "CommandParseHelpers.h"
12#include "Serialization/JsonParser.h"
14#include "Services/PropertiesManager.h"
24 void RemoveEntitiesWithAncestors(Context* context,
const EntityIds& entityIds, EntityIds& output);
33 virtual void applyPost() = 0;
57 void apply()
override;
61 EditingMode newMode = EditingMode::None;
62 EditingMode previousMode = EditingMode::None;
69 void apply()
override;
77 EntityId entityId = NoEntity;
78 EntityId parentId = NoEntity;
80 EntityIds previousSelection;
87 void apply()
override;
93 EntityIds previousSelection;
100 RemoveEntitiesWithAncestors(context, entityIds, this->entityIds);
103 void apply()
override;
104 void undo()
override;
110 rapidjson::Document copied;
116 SelectCommand(
EditorState * state,
const EntityIds& selectedIds, SelectMode mode = SelectMode::Exclusive,
int pickId = -1)
117 :
EditorCommand(state, state->context), pickId(pickId), selectedIds(selectedIds), mode(mode)
121 SelectCommand(
EditorState * state,
const EntityId& selectedId, SelectMode mode = SelectMode::Exclusive,
int pickId = -1)
122 :
SelectCommand(state, EntityIds{ selectedId }, mode, pickId)
126 void apply()
override;
127 void undo()
override;
132 EntityIds selectedIds;
133 SelectMode mode = SelectMode::Exclusive;
135 EntityIds previousSelection;
142 void apply()
override;
143 void undo()
override;
146 EntityId entityId = NoEntity;
154 void apply()
override;
155 void undo()
override;
161 glm::vec3 translation;
163 std::vector<glm::vec3> previousTranslations;
170 void apply()
override;
171 void undo()
override;
179 std::vector<glm::quat> previousRotations;
186 void apply()
override;
187 void undo()
override;
195 std::vector<glm::vec3> previousScales;
202 void apply()
override;
203 void undo()
override;
208 glm::vec3 previousScale;
209 glm::vec3 previousPosition;
216 RemoveEntitiesWithAncestors(context, entityIds, this->entityIds);
219 void apply()
override;
220 void undo()
override;
224 EntityId groupId = NoEntity;
Provides a weakly referenced view over the contents of a string.
std::string to_string() const
String conversion method.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
void apply() override
Run the command.
void apply() override
Run the command.
void apply() override
Run the command.
Base class for Cogs Editor commands.
void apply() override
Run the command.
Abstract base class for all editor commands showing GUI in interactive mode.
virtual void beginModal()=0
Called when the command is initiated.
virtual void showGui()=0
Display custom ImGUI.
virtual bool continueModal()=0
Shall return true while the GUI should still be shown. False when.
void apply() override
Run the command.
Abstract base class for all editor batch Post commands.
void apply() override
Run the command.
bool mergeWith(const EditorCommand *command) override
bool mergeWith(const EditorCommand *command) override
void apply() override
Run the command.
void apply() override
Run the command.
bool mergeWith(const EditorCommand *command) override
void apply() override
Run the command.