mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 04:49:12 -06:00
Add new action to toggle dwarf planet visibility (closes #2674)
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
local ToggleDwarfPlanetTrails = {
|
||||
Identifier = "os.ToggleDwarfPlanetTrails",
|
||||
Name = "Toggle dwarf planet trails",
|
||||
Command = [[
|
||||
local list = openspace.getProperty("{planetTrail_dwarf}.Renderable.Enabled")
|
||||
for _,v in pairs(list) do
|
||||
openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v))
|
||||
end
|
||||
]],
|
||||
Documentation = "Toggle on/off trails for all dwarf planets in the solar system",
|
||||
GuiPath = "/Trails",
|
||||
IsLocal = true
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(ToggleDwarfPlanetTrails)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(ToggleDwarfPlanetTrails)
|
||||
end)
|
||||
|
||||
asset.export("ToggleDwarfPlanetTrails", ToggleDwarfPlanetTrails.Identifier)
|
||||
|
||||
|
||||
|
||||
asset.meta = {
|
||||
Name = "Actions - Toggle Dwarf Planet Trails",
|
||||
Version = "1.0",
|
||||
Description = "Asset providing actions to toggle all dwarf planet trails on and off",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -28,7 +28,6 @@ local PlutoKeplerianTrail = {
|
||||
Resolution = 1000,
|
||||
Enabled = false
|
||||
},
|
||||
Tag = { "planetTrail_dwarf" },
|
||||
GUI = {
|
||||
Name = "Pluto Keplerian Trail",
|
||||
Path = "/Solar System/Dwarf Planets/Pluto",
|
||||
|
||||
Reference in New Issue
Block a user