|
|
@@ -27,6 +27,7 @@
|
|
|
#include <ToolCore/Assets/Asset.h>
|
|
|
|
|
|
#include "SceneEditor3D.h"
|
|
|
+#include "SceneEditor3DEvents.h"
|
|
|
|
|
|
using namespace ToolCore;
|
|
|
|
|
|
@@ -81,6 +82,8 @@ SceneEditor3D ::SceneEditor3D(Context* context, const String &fullpath, UITabCon
|
|
|
SubscribeToEvent(E_UPDATE, HANDLER(SceneEditor3D, HandleUpdate));
|
|
|
SubscribeToEvent(E_EDITORACTIVENODECHANGE, HANDLER(SceneEditor3D, HandleEditorActiveNodeChange));
|
|
|
|
|
|
+ SubscribeToEvent(E_GIZMOEDITMODECHANGED, HANDLER(SceneEditor3D, HandleGizmoEditModeChanged));
|
|
|
+
|
|
|
// FIXME: Set the size at the end of setup, so all children are updated accordingly
|
|
|
// future size changes will be handled automatically
|
|
|
IntRect rect = container_->GetContentRoot()->GetRect();
|
|
|
@@ -182,6 +185,12 @@ void SceneEditor3D::HandlePlayStopped(StringHash eventType, VariantMap& eventDat
|
|
|
sceneView_->Enable();
|
|
|
}
|
|
|
|
|
|
+void SceneEditor3D::HandleGizmoEditModeChanged(StringHash eventType, VariantMap& eventData)
|
|
|
+{
|
|
|
+ EditMode mode = (EditMode) eventData[GizmoEditModeChanged::P_MODE].GetFloat();
|
|
|
+ gizmo3D_->SetEditMode(mode);
|
|
|
+}
|
|
|
+
|
|
|
bool SceneEditor3D::Save()
|
|
|
{
|
|
|
File file(context_);
|