diff --git a/assets/scenes/default.asset b/assets/scenes/default.asset index 006ae04a71..7790889fce 100644 --- a/assets/scenes/default.asset +++ b/assets/scenes/default.asset @@ -9,7 +9,6 @@ solarSystemDep.onInitialize = function () openspace.time.setTime(openspace.time.currentWallTime()) dofile(openspace.absPath('${SCRIPTS}/bind_common_keys.lua')) - openspace.resetCameraDirection() openspace.addVirtualProperty("BoolProperty", "Show Trails", "*Trail.renderable.enabled", true, nil, nil) end diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 0f5a8c2c24..33c4e4451f 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -134,6 +134,7 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { { "addLayer", &globebrowsing::luascriptfunctions::addLayer, + {}, "string, string, table", "Adds a layer to the specified globe. The first argument specifies the " "name of the scene graph node of which to add the layer. The renderable " @@ -145,6 +146,7 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { { "deleteLayer", &globebrowsing::luascriptfunctions::deleteLayer, + {}, "string, string", "Removes a layer from the specified globe. The first argument specifies " "the name of the scene graph node of which to remove the layer. " @@ -156,12 +158,14 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { { "goToChunk", &globebrowsing::luascriptfunctions::goToChunk, + {}, "void", "Go to chunk with given index x, y, level" }, { "goToGeo", &globebrowsing::luascriptfunctions::goToGeo, + {}, "void", "Go to geographic coordinates latitude and longitude" } diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 233bf856a1..2d09aa3be6 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -570,7 +570,7 @@ void OpenSpaceEngine::loadScene(const std::string& scenePath) { _syncEngine->removeSyncables(_renderEngine->getSyncables()); _renderEngine->setScene(nullptr); _renderEngine->setCamera(nullptr); - _interactionHandler->setCamera(nullptr); + _navigationHandler->setCamera(nullptr); _scene->clear(); } @@ -610,11 +610,11 @@ void OpenSpaceEngine::loadScene(const std::string& scenePath) { if (_scene) { _renderEngine->setCamera(_scene->camera()); _navigationHandler->setCamera(_scene->camera()); - _navigationHandler->setFocusNode(scene->camera()->parent()); + _navigationHandler->setFocusNode(_scene->camera()->parent()); // Write keyboard documentation. if (configurationManager().hasKey(ConfigurationManager::KeyKeyboardShortcuts)) { - interactionHandler().writeDocumentation( + keyBindingManager().writeDocumentation( absPath(configurationManager().value( ConfigurationManager::KeyKeyboardShortcuts )) @@ -1059,15 +1059,12 @@ void OpenSpaceEngine::preSynchronization() { ); } - _interactionHandler->updateInputStates(dt); - _renderEngine->updateScene(); - _renderEngine->updateScene(); _navigationHandler->updateCamera(dt); Camera* camera = _renderEngine->camera(); if (camera) { - _interactionHandler->updateCamera(dt); + _navigationHandler->updateCamera(dt); _renderEngine->camera()->invalidateCache(); } _parallelConnection->preSynchronization(); diff --git a/src/interaction/keybindingmanager.cpp b/src/interaction/keybindingmanager.cpp index 2f3db8e2bc..e2b15bccb5 100644 --- a/src/interaction/keybindingmanager.cpp +++ b/src/interaction/keybindingmanager.cpp @@ -148,12 +148,14 @@ scripting::LuaLibrary KeyBindingManager::luaLibrary() { { "clearKeys", &luascriptfunctions::clearKeys, + {}, "", "Clear all key bindings" }, { "bindKey", &luascriptfunctions::bindKey, + {}, "string, string [,string]", "Binds a key by name to a lua string command to execute both locally " "and to broadcast to clients if this is the host of a parallel session. " @@ -164,6 +166,7 @@ scripting::LuaLibrary KeyBindingManager::luaLibrary() { { "bindKeyLocal", &luascriptfunctions::bindKeyLocal, + {}, "string, string [,string]", "Binds a key by name to a lua string command to execute only locally. " "The first argument is the key, the second argument is the Lua command " diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index 43218accc1..f5b436634b 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -276,18 +276,21 @@ scripting::LuaLibrary NavigationHandler::luaLibrary() { { "saveCameraStateToFile", &luascriptfunctions::saveCameraStateToFile, + {}, "string", "Save the current camera state to file" }, { "restoreCameraStateFromFile", &luascriptfunctions::restoreCameraStateFromFile, + {}, "string", "Restore the camera state from file" }, { "resetCameraDirection", &luascriptfunctions::resetCameraDirection, + {}, "void", "Reset the camera direction to point at the focus node" }