Issue/2768 (#2872)

* Rename remote scripting property to reflect better what it does

* Change the remote scripting name in all modules

* Update all scripts and action calls to use the new property for sync

* Simplify code that decides whether to send actions to nodes and peers

* Move Lua console hint text to be right top aligned

* Update Lua script topic

* Added new JSON key whether or not the script should be synced to other
  nodes and peers

* Per default all scripts sync to everyone
  In the next full release, we should have two separate keys that
  decides whether to sync and send to nodes and peers separately

* Add some comments that explain why there is no sync for some scripts

* Make sync argument in trigger action function BooleanType
This commit is contained in:
Malin E
2023-09-07 13:21:29 +02:00
committed by GitHub
parent b49a8704dc
commit 4447de87f5
43 changed files with 449 additions and 165 deletions

View File

@@ -66,7 +66,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
global::scriptEngine->queueScript(
addParentScript,
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
// Get the poses along the path
@@ -98,7 +99,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
global::scriptEngine->queueScript(
fmt::format("openspace.addSceneGraphNode({})", pointNode),
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
};
@@ -120,7 +122,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
global::scriptEngine->queueScript(
fmt::format("openspace.addSceneGraphNode({})", lineNode),
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
};
@@ -157,7 +160,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
using namespace openspace;
global::scriptEngine->queueScript(
fmt::format("openspace.removeSceneGraphNode('{}');", RenderedPathIdentifier),
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
}
@@ -189,7 +193,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
global::scriptEngine->queueScript(
addParentScript,
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
const std::vector<glm::dvec3> points = currentPath->controlPoints();
@@ -226,7 +231,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
global::scriptEngine->queueScript(
fmt::format("openspace.addSceneGraphNode({})", node),
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
}
}
@@ -236,7 +242,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
using namespace openspace;
global::scriptEngine->queueScript(
fmt::format("openspace.removeSceneGraphNode('{}');", RenderedPointsIdentifier),
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
}
@@ -291,7 +298,8 @@ constexpr glm::vec3 OrientationLineColor = glm::vec3(0.0, 1.0, 1.0);
global::scriptEngine->queueScript(
fmt::format("openspace.addSceneGraphNode({});", axes),
scripting::ScriptEngine::RemoteScripting::Yes
scripting::ScriptEngine::ShouldBeSynchronized::Yes,
scripting::ScriptEngine::ShouldSendToRemote::Yes
);
}