[Bf-blender-cvs] [41dc5587474] master: Geometry Nodes: Rotate Euler: Use "Local" instead of "Point"

Jarrett Johnson noreply at git.blender.org
Fri Oct 15 23:33:48 CEST 2021


Commit: 41dc55874742e8ee9d1361d729bec25514e1e3ae
Author: Jarrett Johnson
Date:   Fri Oct 15 16:33:27 2021 -0500
Branches: master
https://developer.blender.org/rB41dc55874742e8ee9d1361d729bec25514e1e3ae

Geometry Nodes: Rotate Euler: Use "Local" instead of "Point"

Since points aren't relevant in function nodes, replace all mentions
of it with "local" to illustrate rotations done in local-space instead.

Differential Revision: https://developer.blender.org/D12881

===================================================================

M	source/blender/makesdna/DNA_node_types.h
M	source/blender/makesrna/intern/rna_nodetree.c
M	source/blender/nodes/function/nodes/node_fn_rotate_euler.cc

===================================================================

diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index d4a2b3449e5..dd749a9dc60 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -2090,7 +2090,7 @@ typedef enum GeometryNodeRotatePointsSpace {
 
 typedef enum FunctionNodeRotateEulerSpace {
   FN_NODE_ROTATE_EULER_SPACE_OBJECT = 0,
-  FN_NODE_ROTATE_EULER_SPACE_POINT = 1,
+  FN_NODE_ROTATE_EULER_SPACE_LOCAL = 1,
 } FunctionNodeRotateEulerSpace;
 
 typedef enum GeometryNodeAlignRotationToVectorAxis {
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 3ca5e562a5e..9571d889f6d 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -9902,10 +9902,10 @@ static void def_fn_rotate_euler(StructRNA *srna)
        ICON_NONE,
        "Object",
        "Rotate the input rotation in the local space of the object"},
-      {FN_NODE_ROTATE_EULER_SPACE_POINT,
-       "POINT",
+      {FN_NODE_ROTATE_EULER_SPACE_LOCAL,
+       "LOCAL",
        ICON_NONE,
-       "Point",
+       "Local",
        "Rotate the input rotation in its local space"},
       {0, NULL, 0, NULL, NULL},
   };
@@ -9921,7 +9921,7 @@ static void def_fn_rotate_euler(StructRNA *srna)
   prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);
   RNA_def_property_enum_sdna(prop, NULL, "custom2");
   RNA_def_property_enum_items(prop, space_items);
-  RNA_def_property_ui_text(prop, "Space", "Base orientation of the points");
+  RNA_def_property_ui_text(prop, "Space", "Base orientation for rotation");
   RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 }
 
diff --git a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
index cbae1648663..7db566e96b5 100644
--- a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
+++ b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
@@ -82,8 +82,8 @@ static const fn::MultiFunction *get_multi_function(bNode &bnode)
         mat3_to_eul(result, mat_res);
         return result;
       }};
-  static fn::CustomMF_SI_SI_SO<float3, float3, float3> point_euler_rot{
-      "Rotate Euler by Euler/Point", [](const float3 &input, const float3 &rotation) {
+  static fn::CustomMF_SI_SI_SO<float3, float3, float3> local_euler_rot{
+      "Rotate Euler by Euler/Local", [](const float3 &input, const float3 &rotation) {
         float input_mat[3][3];
         eul_to_mat3(input_mat, input);
         float rot_mat[3][3];
@@ -94,8 +94,8 @@ static const fn::MultiFunction *get_multi_function(bNode &bnode)
         mat3_to_eul(result, mat_res);
         return result;
       }};
-  static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> point_AA_rot{
-      "Rotate Euler by AxisAngle/Point", [](const float3 &input, const float3 &axis, float angle) {
+  static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> local_AA_rot{
+      "Rotate Euler by AxisAngle/Local", [](const float3 &input, const float3 &axis, float angle) {
         float input_mat[3][3];
         eul_to_mat3(input_mat, input);
         float rot_mat[3][3];
@@ -109,10 +109,10 @@ static const fn::MultiFunction *get_multi_function(bNode &bnode)
   short type = bnode.custom1;
   short space = bnode.custom2;
   if (type == FN_NODE_ROTATE_EULER_TYPE_AXIS_ANGLE) {
-    return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_AA_rot : &point_AA_rot;
+    return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_AA_rot : &local_AA_rot;
   }
   if (type == FN_NODE_ROTATE_EULER_TYPE_EULER) {
-    return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_euler_rot : &point_euler_rot;
+    return space == FN_NODE_ROTATE_EULER_SPACE_OBJECT ? &obj_euler_rot : &local_euler_rot;
   }
   BLI_assert_unreachable();
   return nullptr;



More information about the Bf-blender-cvs mailing list