mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-24 13:09:22 -06:00
Finished support for modules and markInterestingNodes
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <openspace/documentation/documentation.h>
|
||||
#include <openspace/moduleregistration.h>
|
||||
#include <openspace/scripting/lualibrary.h>
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <openspace/util/openspacemodule.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/misc/profiling.h>
|
||||
@@ -163,6 +164,29 @@ ghoul::systemcapabilities::Version ModuleEngine::requiredOpenGLVersion() const {
|
||||
return version;
|
||||
}
|
||||
|
||||
void ModuleEngine::setFromProfile_modules(const Profile& p)
|
||||
{
|
||||
for (Profile::Module mod : p.modules) {
|
||||
const std::vector<OpenSpaceModule*>& m = modules();
|
||||
if (std::find(m.begin(), m.end(), mod.name) != m.end()) {
|
||||
if (mod.loadedInstruction.has_value()) {
|
||||
global::scriptEngine->queueScript(
|
||||
mod.loadedInstruction.value(),
|
||||
scripting::ScriptEngine::RemoteScripting::Yes
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (mod.notLoadedInstruction.has_value()) {
|
||||
global::scriptEngine->queueScript(
|
||||
mod.notLoadedInstruction.value(),
|
||||
scripting::ScriptEngine::RemoteScripting::Yes
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scripting::LuaLibrary ModuleEngine::luaLibrary() {
|
||||
return {
|
||||
"modules",
|
||||
|
||||
Reference in New Issue
Block a user