diff --git a/modules/softwareintegration/softwareintegrationmodule.cpp b/modules/softwareintegration/softwareintegrationmodule.cpp index ef7c02a591..1b76c1c497 100644 --- a/modules/softwareintegration/softwareintegrationmodule.cpp +++ b/modules/softwareintegration/softwareintegrationmodule.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -217,7 +218,7 @@ namespace openspace { bool hasLuminosityData = !luminosityData.empty(); bool hasVelocityData = !velocityData.empty(); - if (hasLuminosityData && hasVelocityData) { + /*if (hasLuminosityData && hasVelocityData) { ghoul::Dictionary renderable = { { "Type", "RenderablePointsCloud"s }, { "Color", static_cast(color)}, @@ -248,7 +249,7 @@ namespace openspace { { "Velocity", velocityData } }; } - else { + else {*/ ghoul::Dictionary renderable = { { "Type", "RenderablePointsCloud"s }, { "Color", static_cast(color)}, @@ -256,7 +257,7 @@ namespace openspace { { "Opacity", static_cast(opacity) }, { "Size", static_cast(size)}, }; - } + ghoul::Dictionary gui = { { "Name", guiName }, @@ -273,8 +274,12 @@ namespace openspace { SceneGraphNode* sgn = global::renderEngine.scene()->loadNode(node); if (!sgn) { LERROR("Scene", "Could not load scene graph node"); + break; } global::renderEngine.scene()->initializeNode(sgn); + global::navigationHandler.orbitalNavigator().setFocusNode(sgn); + global::navigationHandler.orbitalNavigator().startRetargetAnchor(); + global::navigationHandler.orbitalNavigator().startRetargetAim(); } catch (const documentation::SpecificationError& e) { return LERROR(fmt::format("Documentation SpecificationError: Error loading scene graph node {}", @@ -293,6 +298,8 @@ namespace openspace { case SoftwareConnection::MessageType::RemoveSceneGraphNode: { std::string identifier(message.begin(), message.end()); + global::navigationHandler.orbitalNavigator().setFocusNode("Earth"); + openspace::global::scriptEngine.queueScript( "openspace.removeSceneGraphNode('" + identifier + "');", scripting::ScriptEngine::RemoteScripting::Yes diff --git a/unistd.h b/unistd.h new file mode 100644 index 0000000000..e69de29bb2