mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
705c898ccd
* Updating all assets to new coding style * Cleaning up asset files * Moving default_actions and default_keybindings files * Changing procedural globes to explicitly specified globes * Move Spice loading explicitly to the initialize part and also deinitialize * Removing unused asset files * Removing asset_helper * Removing scale_model_helper asset * Removing script_scheduler_helper * Removing testing_keybindings * Remove procedural_globe
22 lines
1.1 KiB
Lua
22 lines
1.1 KiB
Lua
asset.onInitialize(function()
|
|
-- Disable the server, add production gui endpoint, and restart server.
|
|
-- The temporary disabling avoids restarting the server on each property change.
|
|
-- TODO: Add a trigger property to the module to restart the server "manually" and
|
|
-- remove automatic restart on each property change, since frequent restarting seems to
|
|
-- be unstable on MacOS.
|
|
|
|
local enabled = openspace.getPropertyValue("Modules.WebGui.ServerProcessEnabled")
|
|
openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", false)
|
|
|
|
local directories = openspace.getPropertyValue("Modules.WebGui.Directories")
|
|
directories[#directories + 1] = "screenshots"
|
|
directories[#directories + 1] = "${SCREENSHOTS}"
|
|
openspace.setPropertyValueSingle("Modules.WebGui.Directories", directories)
|
|
openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", enabled)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
-- TODO: Remove endpoints. As of 2019-10-29, OpenSpace sometimes
|
|
-- crashes when endpoints are removed while the application is closing.
|
|
end)
|