From 05942fb2846b65a950e136a3f66ab3343cd3ede5 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 30 Apr 2021 14:53:11 +0200 Subject: [PATCH] Remove property names and dictionary keys from FixedRotation that are unfriendly to Lua syntax --- .../planets/earth/satellites/misc/iss.asset | 2 +- modules/base/rotation/fixedrotation.cpp | 36 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset index 54defe6c21..78a6d1d949 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -141,7 +141,7 @@ asset.onInitialize(function () for _, node in ipairs(nodes) do openspace.addSceneGraphNode(node) end - openspace.setPropertyValueSingle("Scene.ISSparentNode.Rotation.yAxis-InvertObject", true) + openspace.setPropertyValueSingle("Scene.ISSparentNode.Rotation.yAxisInvertObject", true) end) diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index c89e4dc489..11324d7305 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -46,7 +46,7 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo XAxisTypeInfo = { - "xAxis-Type", + "xAxisType", "xAxis: Specification Type", "This value specifies how this axis is being specified, that is whether it is " "referencing another object, specifying an absolute vector, or whether it is " @@ -55,7 +55,7 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo YAxisTypeInfo = { - "yAxis-Type", + "yAxisType", "yAxis: Specification Type", "This value specifies how this axis is being specified, that is whether it is " "referencing another object, specifying an absolute vector, or whether it is " @@ -64,7 +64,7 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo ZAxisTypeInfo = { - "zAxis-Type", + "zAxisType", "zAxis: Specification Type", "This value specifies how this axis is being specified, that is whether it is " "referencing another object, specifying an absolute vector, or whether it is " @@ -73,7 +73,7 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo XAxisObjectInfo = { - "xAxis-Object", + "xAxisObject", "xAxis: Focus Object", "This is the object that the axis will focus on. This object must name an " "existing scene graph node in the currently loaded scene and the rotation will " @@ -81,7 +81,7 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo YAxisObjectInfo = { - "yAxis-Object", + "yAxisObject", "yAxis: Focus Object", "This is the object that the axis will focus on. This object must name an " "existing scene graph node in the currently loaded scene and the rotation will " @@ -89,7 +89,7 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo ZAxisObjectInfo = { - "zAxis-Object", + "zAxisObject", "zAxis: Focus Object", "This is the object that the axis will focus on. This object must name an " "existing scene graph node in the currently loaded scene and the rotation will " @@ -98,7 +98,7 @@ namespace { constexpr const openspace::properties::Property::PropertyInfo XAxisInvertObjectInfo = { - "xAxis-InvertObject", + "xAxisInvertObject", "xAxis: Invert Object Point Direction", "If this value is set to 'true', and the type is set to 'Object', the inverse of " "the pointing direction is used, causing the object to point away from the " @@ -107,7 +107,7 @@ namespace { constexpr const openspace::properties::Property::PropertyInfo YAxisInvertObjectInfo = { - "yAxis-InvertObject", + "yAxisInvertObject", "yAxis: Invert Object Point Direction", "If this value is set to 'true', and the type is set to 'Object', the inverse of " "the pointing direction is used, causing the object to point away from the " @@ -116,7 +116,7 @@ namespace { constexpr const openspace::properties::Property::PropertyInfo ZAxisInvertObjectInfo = { - "zAxis-InvertObject", + "zAxisInvertObject", "zAxis: Invert Object Point Direction", "If this value is set to 'true', and the type is set to 'Object', the inverse of " "the pointing direction is used, causing the object to point away from the " @@ -124,21 +124,21 @@ namespace { }; constexpr const openspace::properties::Property::PropertyInfo XAxisVectorInfo = { - "xAxis-Vector", + "xAxisVector", "xAxis: Direction vector", "This value specifies a static direction vector that is used for a fixed " "rotation." }; constexpr const openspace::properties::Property::PropertyInfo YAxisVectorInfo = { - "yAxis-Vector", + "yAxisVector", "yAxis: Direction vector", "This value specifies a static direction vector that is used for a fixed " "rotation." }; constexpr const openspace::properties::Property::PropertyInfo ZAxisVectorInfo = { - "zAxis-Vector", + "zAxisVector", "zAxis: Direction vector", "This value specifies a static direction vector that is used for a fixed " "rotation." @@ -147,7 +147,7 @@ namespace { constexpr const openspace::properties::Property::PropertyInfo XAxisOrthogonalVectorInfo = { - "xAxis-Orthogonal", + "xAxisOrthogonal", "xAxis: Vector is orthogonal", "This value determines whether the vector specified is used directly, or whether " "it is used together with another non-coordinate system completion vector to " @@ -157,7 +157,7 @@ namespace { constexpr const openspace::properties::Property::PropertyInfo YAxisOrthogonalVectorInfo = { - "yAxis-Orthogonal", + "yAxisOrthogonal", "yAxis: Vector is orthogonal", "This value determines whether the vector specified is used directly, or whether " "it is used together with another non-coordinate system completion vector to " @@ -167,7 +167,7 @@ namespace { constexpr const openspace::properties::Property::PropertyInfo ZAxisOrthogonalVectorInfo = { - "zAxis-Orthogonal", + "zAxisOrthogonal", "zAxis: Vector is orthogonal", "This value determines whether the vector specified is used directly, or whether " "it is used together with another non-coordinate system completion vector to " @@ -194,7 +194,7 @@ namespace { std::optional xAxisOrthogonal; // [[codegen::verbatim(XAxisInvertObjectInfo.description)]] - std::optional xAxisInvert [[codegen::key("xAxis - InvertObject")]]; + std::optional xAxisInvert; // This value specifies the direction of the new Y axis. If this value is not // specified, it will be computed by completing a right handed coordinate system @@ -207,7 +207,7 @@ namespace { std::optional yAxisOrthogonal; // [[codegen::verbatim(YAxisInvertObjectInfo.description)]] - std::optional yAxisInvert [[codegen::key("yAxis - InvertObject")]]; + std::optional yAxisInvert; // This value specifies the direction of the new Z axis. If this value is not // specified, it will be computed by completing a right handed coordinate system @@ -220,7 +220,7 @@ namespace { std::optional zAxisOrthogonal; // [[codegen::verbatim(ZAxisInvertObjectInfo.description)]] - std::optional zAxisInvert [[codegen::key("zAxis - InvertObject")]]; + std::optional zAxisInvert; // [[codegen::verbatim(AttachedInfo.description)]] std::optional attached;