# Conflicts:
#	data/assets/scene/solarsystem/missions/jwst/jwst.asset
This commit is contained in:
Ylva Selling
2023-05-10 16:58:12 -04:00
20 changed files with 233 additions and 134 deletions

View File

@@ -12,6 +12,13 @@ local speck = asset.syncedResource({
Version = 2
})
local transformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local object = {
Identifier = "Abell",
Renderable = {
@@ -23,7 +30,8 @@ local object = {
Color = { 0.0, 0.8, 0.0 },
Size = 22,
MinMaxSize = { 10, 12 },
Unit = "Mpc"
Unit = "Mpc",
TransformationMatrix = transformMatrix
},
Color = { 1.0, 0.4, 0.2 },
Opacity = 1.0,
@@ -31,12 +39,7 @@ local object = {
File = speck .. "abell.speck",
Texture = textures .. "point3A.png",
Unit = "Mpc",
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
TransformationMatrix = transformMatrix,
ScaleFactor = 520.0,
BillboardMinMaxSize = { 0.0, 7.0 },
EnablePixelSizeControl = true

View File

@@ -5,6 +5,13 @@ local speck = asset.syncedResource({
Version = 2
})
local transformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local object = {
Identifier = "GalaxyClusterLabels",
Renderable = {
@@ -16,17 +23,13 @@ local object = {
Color = { 1.0, 0.44, 0.0 },
Size = 22,
MinMaxSize = { 8, 20 },
Unit = "Mpc"
Unit = "Mpc",
TransformationMatrix = transformMatrix
},
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
Unit = "Mpc",
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
TransformationMatrix = transformMatrix
},
GUI = {
Name = "Galaxy Cluster Labels",

View File

@@ -5,6 +5,13 @@ local speck = asset.syncedResource({
Version = 1
})
local transformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local object = {
Identifier = "NearbyGalaxyGroups",
Renderable = {
@@ -16,18 +23,14 @@ local object = {
Color = { 0.1, 0.6, 0.2 },
Size = 21.5,
MinMaxSize = { 8, 20 },
Unit = "Mpc"
Unit = "Mpc",
TransformationMatrix = transformMatrix
},
Color = { 1.0, 1.0, 1.0 },
Opacity = 0.65,
--ScaleFactor = 10.0,
Unit = "Mpc",
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
TransformationMatrix = transformMatrix
},
GUI = {
Name = "Galaxy Group Labels",

View File

@@ -5,6 +5,13 @@ local homespeck = asset.syncedResource({
Version = 1
})
local transformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local homeLabel = {
Identifier = "HomeLabel",
Renderable = {
@@ -16,18 +23,14 @@ local homeLabel = {
Color = { 0.8, 0.8, 0.8 },
Size = 20.50,
MinMaxSize = { 16, 20 },
Unit = "Mpc"
Unit = "Mpc",
TransformationMatrix = transformMatrix
},
Color = { 1.0, 0.4, 0.2 },
Opacity = 0.99,
ScaleFactor = 500.0,
Unit = "Mpc",
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
TransformationMatrix = transformMatrix,
FadeInDistances = { 0.05, 1.0 },
BillboardMinMaxSize = { 0.0, 8.22 },
EnablePixelSizeControl = true

View File

@@ -17,7 +17,7 @@ local sunOrbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-Sun.speck",
MeshColor = {{ 1.0, 0.65, 0.0 }},
MeshColor = { { 1.0, 0.65, 0.0 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextMinMaxSize = { 0, 30 },
@@ -38,7 +38,7 @@ local barnardsOrbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-BarnardsStar.speck",
MeshColor = {{0.39, 0.58, 0.93}},
MeshColor = { { 0.39, 0.58, 0.93 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextSize = 10.3,
@@ -60,7 +60,7 @@ local kapteynsOrbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-KapteynsStar.speck",
MeshColor = {{0.6, 0.6, 0.6}},
MeshColor = { { 0.6, 0.6, 0.6 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextSize = 10.3,
@@ -82,7 +82,7 @@ local lacaille9352Orbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-Lacaille9352.speck",
MeshColor = {{0.58, 0.0, 0.83}},
MeshColor = { { 0.58, 0.0, 0.83 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextSize = 10.3,
@@ -104,7 +104,7 @@ local lSR1826Orbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-LSR1826+3014.speck",
MeshColor = {{0.0, 0.39, 0.0}},
MeshColor = { { 0.0, 0.39, 0.0 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextSize = 10.3,
@@ -126,7 +126,7 @@ local lSRJ0822Orbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-LSRJ0822+1700.speck",
MeshColor = {{0.5, 1.0, 0.0}},
MeshColor = { { 0.5, 1.0, 0.0 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextSize = 10.3,
@@ -148,7 +148,7 @@ local pM_J13420Orbit = {
Enabled = false,
Opacity = 1.0,
File = speck .. "starorbits-PM_J13420-3415.speck",
MeshColor = {{0.70, 0.13, 0.13}},
MeshColor = { { 0.70, 0.13, 0.13 } },
--LabelFile = speck .. "1ld.label",
-- TextColor = { 0.0, 0.2, 0.5 },
-- TextSize = 10.3,

View File

@@ -12,6 +12,13 @@ local speck = asset.syncedResource({
Version = 2
})
local transformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local tullyPoints = {
Identifier = "TullyGalaxies",
Renderable = {
@@ -22,7 +29,8 @@ local tullyPoints = {
Color = { 0.7, 0.7, 0.7 },
Size = 19.36,
MinMaxSize = { 8, 20 },
Unit = "Mpc"
Unit = "Mpc",
TransformationMatrix = transformMatrix
},
Color = { 1.0, 0.4, 0.2 },
Opacity = 0.99,
@@ -35,12 +43,7 @@ local tullyPoints = {
ColorOption = { "prox5Mpc" },
ColorRange = { { 1.0, 30.0 } },
Unit = "Mpc",
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
TransformationMatrix = transformMatrix,
FadeInDistances = { 0.001, 1.0 }, -- Fade in value in the same unit as "Unit"
BillboardMinMaxSize = { 0.0, 7.0 }, -- in pixels
--CorrectionSizeEndDistance = 22.0,
@@ -81,12 +84,7 @@ local tullyImages = {
TexturePath = textures,
Luminosity = "diamkpc",
ScaleLuminosity = 0.001,
TransformationMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
},
TransformationMatrix = transformMatrix,
Unit = "Mpc",
-- Fade in value in the same unit as "Unit"
FadeInDistances = {0.0005, 0.003},

View File

@@ -51,7 +51,25 @@ local densityVolume = {
local toggle_volume = {
Identifier = "os.events.bastilleday.densityvolume.togglevolume",
Name = "Toggle volume",
Command = propertyHelper.invert("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled"),
Command = [[
if openspace.getPropertyValue("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled") then
openspace.setPropertyValueSingle(
"Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled", false)'
)
else
openspace.setPropertyValueSingle("Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Enabled", true)
openspace.setPropertyValueSingle(
"Scene.MAS-MHD-Density-bastille-day-2000.Renderable.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Toggle volume rendering of CME",
GuiPath = "/Bastille-Day 2000",
IsLocal = false

View File

@@ -50,7 +50,25 @@ local fieldlines = {
local toggle_fieldlines = {
Identifier = "os.events.bastilleday.fieldlines.togglefieldlines",
Name = "Toggle fieldlines",
Command = propertyHelper.invert("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled"),
Command = [[
if openspace.getPropertyValue("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled") then
openspace.setPropertyValueSingle(
"Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled", false)'
)
else
openspace.setPropertyValueSingle("Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Enabled", true)
openspace.setPropertyValueSingle(
"Scene.MAS-MHD-Fieldlines-bastille-day-2000.Renderable.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Toggle fieldline rendering of CME",
GuiPath = "/Bastille-Day 2000",
IsLocal = false

View File

@@ -35,7 +35,25 @@ local fluxNodes = {
local toggle_fluxnodes = {
Identifier = "os.events.bastilleday.fluxnodes.togglefluxnodes",
Name = "Toggle flux nodes",
Command = propertyHelper.invert("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled"),
Command = [[
if openspace.getPropertyValue("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled") then
openspace.setPropertyValueSingle(
"Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled", false)'
)
else
openspace.setPropertyValueSingle("Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Enabled", true)
openspace.setPropertyValueSingle(
"Scene.MAS-MHD-FluxNodes-bastille-day-2000.Renderable.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Toggle flux node rendering of CME",
GuiPath = "/Bastille-Day 2000",
IsLocal = false

View File

@@ -72,7 +72,25 @@ local MeridialCutplane = {
local toggle_equatorial = {
Identifier = "os.events.bastilleday.fluxnodescutplane.toggleequatorial",
Name = "Toggle equatorial cutplane",
Command = propertyHelper.invert("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled"),
Command = [[
if openspace.getPropertyValue("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled") then
openspace.setPropertyValueSingle(
"Scene.EquatorialCutplane-bastille-day-2000.Renderable.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled", false)'
)
else
openspace.setPropertyValueSingle("Scene.EquatorialCutplane-bastille-day-2000.Renderable.Enabled", true)
openspace.setPropertyValueSingle(
"Scene.EquatorialCutplane-bastille-day-2000.Renderable.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Toggle equatorial cutplane of CME",
GuiPath = "/Bastille-Day 2000",
IsLocal = false
@@ -80,7 +98,25 @@ local toggle_equatorial = {
local toggle_meridial = {
Identifier = "os.events.bastilleday.fluxnodescutplane.togglemeridial",
Name = "Toggle meridial cutplane",
Command = propertyHelper.invert("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled"),
Command = [[
if openspace.getPropertyValue("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled") then
openspace.setPropertyValueSingle(
"Scene.MeridialCutplane-bastille-day-2000.Renderable.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled", false)'
)
else
openspace.setPropertyValueSingle("Scene.MeridialCutplane-bastille-day-2000.Renderable.Enabled", true)
openspace.setPropertyValueSingle(
"Scene.MeridialCutplane-bastille-day-2000.Renderable.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Toggle meridial cutplane of CME",
GuiPath = "/Bastille-Day 2000",
IsLocal = false

View File

@@ -15,23 +15,37 @@ local legend = {
CartesianPosition = { 0.677970, 0.0, -1.049180 }
}
local show_legend = {
Identifier = "os.events.bastilleday.fluxnodelegend.showlegend",
Name = "Show the legend image",
local toggle_legend = {
Identifier = "os.events.bastilleday.fluxnodelegend.togglelegend",
Name = "Toggle the legend image",
Command = [[
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 0.0);
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", true);
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 1.0, 4);
if openspace.getPropertyValue("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled") then
openspace.setPropertyValueSingle(
"ScreenSpace.LegendFluxNodes-bastille-day-2000.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", false)'
)
else
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", true)
openspace.setPropertyValueSingle(
"ScreenSpace.LegendFluxNodes-bastille-day-2000.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Show the legend image",
Documentation = "Toggle the legend image",
GuiPath = "/Bastille-Day 2000",
IsLocal = false
IsLocal = false
}
local hide_legend = {
Identifier = "os.events.bastilleday.fluxnodelegend.hidelegend",
Name = "Hides the legend image",
Command = [[openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Opacity", 0.0, 2)]],
Command = [[openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Fade", 0.0, openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"), "Linear", 'openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Enabled", false)')]],
Documentation = "Hides the legend image",
GuiPath = "/Bastille-Day 2000",
IsLocal = false
@@ -41,14 +55,12 @@ asset.onInitialize(function()
openspace.addScreenSpaceRenderable(legend)
-- These numbers are there to put the legend on the side of the screen.
openspace.setPropertyValueSingle("ScreenSpace.LegendFluxNodes-bastille-day-2000.Rotation", { 0.0, 0.0, 0.56652 });
openspace.action.registerAction(show_legend)
openspace.action.registerAction(hide_legend)
openspace.action.registerAction(toggle_legend)
end)
asset.onDeinitialize(function ()
openspace.removeScreenSpaceRenderable(legend)
openspace.action.removeAction(show_legend)
openspace.action.removeAction(hide_legend)
openspace.action.removeAction(toggle_legend)
end)
asset.meta = {

View File

@@ -1,9 +1,6 @@
asset.require("spice/base")
asset.require("./actions")
asset.require("./mission")
asset.require("scene/solarsystem/planets/earth/layers/colorlayers/terra_modis_temporal")
asset.require("scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo")
local sun = asset.require("scene/solarsystem/sun/sun")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local transforms = asset.require("./transforms")
@@ -151,52 +148,6 @@ local JWSTLabel = {
}
asset.onInitialize(function()
-- Start of data outage, use Terra instead as replacement
openspace.scriptScheduler.loadScheduledScript(
"2021 DEC 19 00:00:00",
[[openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.Terra_Modis_Temporal.Enabled",
true
)
openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.ESRI_VIIRS_Combo.Enabled",
false
)]],
[[openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.Terra_Modis_Temporal.Enabled",
false
)
openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.ESRI_VIIRS_Combo.Enabled",
true
)]],
"",
2 -- Not default group, never clear this script
)
-- End of data outage, Go back to VIIRS ESRI combo
openspace.scriptScheduler.loadScheduledScript(
"2021 DEC 30 00:00:00",
[[openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.Terra_Modis_Temporal.Enabled",
false
)
openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.ESRI_VIIRS_Combo.Enabled",
true
)]],
[[openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.Terra_Modis_Temporal.Enabled",
true
)
openspace.setPropertyValueSingle(
"Scene.Earth.Renderable.Layers.ColorLayers.ESRI_VIIRS_Combo.Enabled",
false
)]],
"",
2 -- Not default group, never clear this script
)
openspace.addSceneGraphNode(JWSTBand)
openspace.addSceneGraphNode(JWSTModel)
openspace.addSceneGraphNode(JWSTFov)

View File

@@ -1,5 +1,4 @@
asset.require("spice/base") -- openspace.time.advancedTime depends on SPICE
asset.require("scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_2012")
asset.require("scene/solarsystem/planets/earth/atmosphere")
-- Function to advance a time stamp in the given number of days, hours, minutes and

View File

@@ -33,7 +33,25 @@ local EUVLayer = {
local toggle_EUV_layer = {
Identifier = "os.solarsystem.sun.toggleeuv",
Name = "Toggle EUV layer",
Command = propertyHelper.invert("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled"),
Command = [[
if openspace.getPropertyValue("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled") then
openspace.setPropertyValueSingle(
"Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
0.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear",
'openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", false)'
)
else
openspace.setPropertyValueSingle("Scene.EUV-Layer-bastille-day-2000.Renderable.Enabled", true)
openspace.setPropertyValueSingle(
"Scene.EUV-Layer-bastille-day-2000.Renderable.Fade",
1.0,
openspace.getPropertyValue("OpenSpaceEngine.FadeDuration"),
"Linear"
)
end
]],
Documentation = "Toggle EUV layer of sun",
GuiPath = "/Bastille-Day 2000",
IsLocal = false

View File

@@ -6,6 +6,7 @@
"base",
"base_keybindings",
"scene/solarsystem/planets/earth/earth",
"scene/solarsystem/planets/earth/layers/colorlayers/viirs_noaa20_temporal.asset",
"scene/solarsystem/planets/earth/satellites/satellites",
"scene/solarsystem/planets/earth/satellites/misc/hubble_trail",
"scene/solarsystem/planets/earth/lagrange_points/lagrange_points",
@@ -248,11 +249,6 @@
"type": "setPropertyValueSingle",
"value": "false"
},
{
"name": "",
"type": "setPropertyValueSingle",
"value": ""
},
{
"name": "Scene.Earth.Renderable.Layers.ColorLayers.VIIRS_NOAA20_Temporal.Enabled",
"type": "setPropertyValueSingle",
@@ -268,4 +264,4 @@
"major": 1,
"minor": 2
}
}
}

View File

@@ -798,15 +798,33 @@ Asset* AssetManager::retrieveAsset(const std::filesystem::path& path,
if (it != _assets.end()) {
Asset* a = it->get();
// We should warn if an asset is requested twice with different enable settings or
// else the resulting status will depend on the order of asset loading
// else the resulting status will depend on the order of asset loading.
if (a->explicitEnabled() != explicitEnable) {
ghoul_assert(a->firstParent(), "Asset must have a parent at this point");
LWARNING(fmt::format(
"Loading asset {0} from {1} with enable state {3} different from initial "
"loading from {2} with state {4}. Only {4} will have an effect",
path, retriever, a->firstParent()->path(), explicitEnable,
a->explicitEnabled()
));
if (a->firstParent()) {
// The first request came from another asset, so we can mention it in the
// error message
LWARNING(fmt::format(
"Loading asset {0} from {1} with enable state {3} different from "
"initial loading from {2} with state {4}. Only {4} will have an "
"effect",
path, retriever, a->firstParent()->path(), explicitEnable,
a->explicitEnabled()
));
}
else {
// This can only happen if the asset was loaded from the profile directly,
// in which case we don't have to warn the user since it won't depend on
// the load order as it is always guaranteed that the profile assets are
// loaded first
ghoul_assert(
std::find(
_rootAssets.begin(),
_rootAssets.end(),
a
) != _rootAssets.end(),
"Asset not loaded from profile"
);
}
}
return it->get();
}

View File

@@ -574,6 +574,10 @@ void Scene::setPropertiesFromProfile(const Profile& p) {
ghoul::lua::LuaState L(ghoul::lua::LuaState::IncludeStandardLibrary::Yes);
for (const Profile::Property& prop : p.properties) {
if (prop.name.empty()) {
LWARNING("Property name in profile was empty");
continue;
}
std::string uriOrRegex = prop.name;
std::string groupName;
if (doesUriContainGroupTag(uriOrRegex, groupName)) {

View File

@@ -227,7 +227,8 @@ std::vector<std::string> ScriptScheduler::progressTo(double newTime) {
_currentTime = newTime;
// Construct result
auto start = _scripts.begin() + prevIndex - 1;
const size_t startOffset = prevIndex == 0 ? prevIndex : prevIndex - 1;
auto start = _scripts.begin() + startOffset;
auto end = it;
for (auto iter = start; iter != _scripts.end() && iter >= end; --iter) {
std::string script = iter->universalScript.empty() ?