mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-18 09:51:18 -06:00
Merge branch 'develop' into feature/remote_redesign
* develop: Renamed getLua, setLua, getString, and setString methods to add "Value" to the end of the method name Added documentation for getString/setString methods Enable Properties to be set by strings Add a button to the SyncWidget to allow it to be closed Updated to new Ghoul version Make multithreaded download a toggle Correctly Set the CMAKE_PREFIX_PATH for Qt on Mac Add commandline argument to OpenSpaceEngine to override scene file Make scene file selectable in Launcher, using the configurationfile value as default Non-Windows compile fix Include stylesheet in main file Add stylesheets and general improvements
This commit is contained in:
@@ -92,6 +92,7 @@ namespace {
|
||||
struct {
|
||||
std::string configurationName;
|
||||
std::string sgctConfigurationName;
|
||||
std::string sceneName;
|
||||
} commandlineArgumentPlaceholders;
|
||||
}
|
||||
|
||||
@@ -358,11 +359,14 @@ bool OpenSpaceEngine::initialize() {
|
||||
_renderEngine->initialize();
|
||||
sceneGraph->initialize();
|
||||
|
||||
std::string sceneDescriptionPath;
|
||||
success = configurationManager()->getValue(
|
||||
ConfigurationManager::KeyConfigScene, sceneDescriptionPath);
|
||||
if (success)
|
||||
sceneGraph->scheduleLoadSceneFile(sceneDescriptionPath);
|
||||
std::string sceneDescriptionPath = "";
|
||||
if (commandlineArgumentPlaceholders.sceneName.empty()) {
|
||||
success = configurationManager()->getValue(
|
||||
ConfigurationManager::KeyConfigScene, sceneDescriptionPath);
|
||||
}
|
||||
else
|
||||
sceneDescriptionPath = commandlineArgumentPlaceholders.sceneName;
|
||||
sceneGraph->scheduleLoadSceneFile(sceneDescriptionPath);
|
||||
|
||||
_interactionHandler->setKeyboardController(new interaction::KeyboardControllerFixed);
|
||||
_interactionHandler->setMouseController(new interaction::OrbitalMouseController);
|
||||
@@ -413,6 +417,13 @@ bool OpenSpaceEngine::gatherCommandlineArguments() {
|
||||
"the OpenSpace configuration file");
|
||||
_commandlineParser->addCommand(sgctConfigFileCommand);
|
||||
|
||||
commandlineArgumentPlaceholders.sceneName = "";
|
||||
CommandlineCommand* sceneFileCommand = new SingleCommand<std::string>(
|
||||
&commandlineArgumentPlaceholders.sceneName, "-scene", "",
|
||||
"Provides the path to the scene file, overriding the value set in the OpenSpace"
|
||||
" configuration file");
|
||||
_commandlineParser->addCommand(sceneFileCommand);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user