From e43fa248bdae7bb02af3111208872fdb1e2bd810 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 9 Oct 2020 21:52:55 +0200 Subject: [PATCH] Remove spaces from constellation images (closes #1219) --- .../milkyway/constellations/constellation_art.asset | 7 ++++--- .../constellations/constellation_keybinds.asset | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/data/assets/scene/milkyway/constellations/constellation_art.asset b/data/assets/scene/milkyway/constellations/constellation_art.asset index c013b982f6..00f47c0b8a 100644 --- a/data/assets/scene/milkyway/constellations/constellation_art.asset +++ b/data/assets/scene/milkyway/constellations/constellation_art.asset @@ -9,7 +9,7 @@ local images = asset.syncedResource({ }) --function that reads the file -local createConstellations = function (guiPath, constellationfile) +local createConstellations = function (baseIdentifier, guiPath, constellationfile) local genConstellations = {}; --skip the first line local notFirstLine = false; @@ -33,7 +33,8 @@ local createConstellations = function (guiPath, constellationfile) group = (group == '' and globe or group) local aconstellation = { - Identifier = guiPath .. '-' .. name, + -- Identifier = guiPath .. '-' .. name, + Identifier = baseIdentifier .. '-' .. abbreviation, Parent = transforms.SolarSystemBarycenter.Identifier, Transform = { Translation = { @@ -83,7 +84,7 @@ local nodes = {} asset.onInitialize(function () local constellationsCSV = images .. "/constellation_data.csv" - nodes = createConstellations('Constellation Art', constellationsCSV) + nodes = createConstellations('ConstellationArt', 'Constellation Art', constellationsCSV) for _, n in ipairs(nodes) do openspace.addSceneGraphNode(n); end diff --git a/data/assets/scene/milkyway/constellations/constellation_keybinds.asset b/data/assets/scene/milkyway/constellations/constellation_keybinds.asset index f527e59fb4..5fc1a1f5af 100644 --- a/data/assets/scene/milkyway/constellations/constellation_keybinds.asset +++ b/data/assets/scene/milkyway/constellations/constellation_keybinds.asset @@ -4,9 +4,9 @@ local Keybindings = { { Key = "c", Name = "Show Constellation Art", - Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0);" .. - "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', true);" .. - "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0.1, 2);", + Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0);" .. + "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Enabled', true);" .. + "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0.1, 2);", Documentation = "Enables and fades up constellation art work", GuiPath = "/Rendering", Local = false @@ -14,7 +14,7 @@ local Keybindings = { { Key = "SHIFT+c", Name = "Hide Constellation Art", - Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0, 2);", + Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Opacity', 0, 2);", Documentation = "Fades out constellation artwork", GuiPath = "/Rendering", Local = false @@ -22,7 +22,7 @@ local Keybindings = { { Key = "CTRL+c", Name = "Disable Constellation Art", - Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', false);", + Command = "openspace.setPropertyValue('Scene.ConstellationArt*.Renderable.Enabled', false);", Documentation = "Disable constellation artwork", GuiPath = "/Rendering", Local = false