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
17 lines
588 B
Lua
17 lines
588 B
Lua
local propertyHelper = asset.require("./property_helper")
|
|
|
|
|
|
|
|
-- Function that returns the string that enables/disables the renderable 'renderable'
|
|
function toggle(renderable)
|
|
return propertyHelper.invert(renderable .. ".Renderable.Enabled")
|
|
end
|
|
|
|
-- Function that returns the string that sets the enabled property of <renderable> to <enabled>
|
|
function setEnabled(renderable, enabled)
|
|
return [[openspace.setPropertyValue("]] .. renderable .. [[.Renderable.Enabled", ]] .. (enabled and "true" or "false") .. ")"
|
|
end
|
|
|
|
asset.export("toggle", toggle)
|
|
asset.export("setEnabled", setEnabled)
|