// TEMPORARY COMMON DATA FOR DIFFERENT INTERNAL COMPONENTS #include "objects/datamodel.h" #include "datatypes/variant.h" #include "common.h" #include Camera camera(glm::vec3(0.0, 0.0, 3.0)); //std::vector parts; std::shared_ptr gDataModel = DataModel::New(); std::shared_ptr editModeDataModel = gDataModel; std::optional hierarchyPreUpdateHandler; std::optional hierarchyPostUpdateHandler; Handles editorToolHandles; std::vector> currentSelection; std::vector selectionUpdateListeners; std::vector propertyUpdatelisteners; void setSelection(std::vector> newSelection, bool fromExplorer) { for (SelectionUpdateHandler handler : selectionUpdateListeners) { handler(currentSelection, newSelection, fromExplorer); } currentSelection = newSelection; } const std::vector> getSelection() { return currentSelection; } void addSelectionListener(SelectionUpdateHandler handler) { selectionUpdateListeners.push_back(handler); } void sendPropertyUpdatedSignal(std::shared_ptr instance, std::string property, Variant newValue) { for (PropertyUpdateHandler handler : propertyUpdatelisteners) { handler(instance, property, newValue); } } void addPropertyUpdateListener(PropertyUpdateHandler handler) { propertyUpdatelisteners.push_back(handler); }