mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 16:59:37 -05:00
Cleanup
This commit is contained in:
@@ -1070,16 +1070,15 @@ void OpenSpaceEngine::writeDocumentation() {
|
||||
sceneGraph["Name"] = "Scene";
|
||||
sceneGraph["Data"] = scene.get();
|
||||
|
||||
nlohmann::json documentation;
|
||||
documentation["documentation"].push_back(sceneGraph);
|
||||
documentation["documentation"].push_back(sceneProperties);
|
||||
documentation["documentation"].push_back(keybindings);
|
||||
documentation["documentation"].push_back(license);
|
||||
documentation["documentation"].push_back(scripting);
|
||||
documentation["documentation"].push_back(factory);
|
||||
nlohmann::json documentation = {
|
||||
sceneGraph, sceneProperties, keybindings, license, scripting, factory
|
||||
};
|
||||
|
||||
nlohmann::json result;
|
||||
result["documentation"] = documentation;
|
||||
|
||||
std::ofstream out(absPath("${DOCUMENTATION}/documentationData.js"));
|
||||
out << "var data = " << documentation.dump();
|
||||
out << "var data = " << result.dump();
|
||||
out.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -99,16 +99,17 @@ namespace {
|
||||
using namespace openspace::scripting;
|
||||
nlohmann::json function;
|
||||
function["Name"] = f.name;
|
||||
function["Arguments"] = nlohmann::json::array();
|
||||
nlohmann::json arguments = nlohmann::json::array();
|
||||
|
||||
for (const LuaLibrary::Function::Argument& arg : f.arguments) {
|
||||
nlohmann::json argument;
|
||||
argument["Name"] = arg.name;
|
||||
argument["Type"] = arg.type;
|
||||
argument["Default Value"] = arg.defaultValue.value_or("");
|
||||
function["Arguments"].push_back(argument);
|
||||
arguments.push_back(argument);
|
||||
}
|
||||
|
||||
function["Arguments"] = arguments;
|
||||
function["Return Type"] = f.returnType;
|
||||
function["Help"] = f.helpText;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user