[Bf-blender-cvs] [630a1639985] geometry-nodes-mesh-primitives: Use "Location" consistently

Hans Goudey noreply at git.blender.org
Mon Mar 15 03:57:20 CET 2021


Commit: 630a163998563187d61671e88c2762acf72290f4
Author: Hans Goudey
Date:   Sun Mar 14 22:28:21 2021 -0400
Branches: geometry-nodes-mesh-primitives
https://developer.blender.org/rB630a163998563187d61671e88c2762acf72290f4

Use "Location" consistently

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

M	source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
M	source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
index ba19f0a70fe..36746acd4a5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
@@ -25,7 +25,7 @@
 
 static bNodeSocketTemplate geo_node_mesh_primitive_cube_in[] = {
     {SOCK_FLOAT, N_("Size"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, FLT_MAX, PROP_DISTANCE},
-    {SOCK_VECTOR, N_("Translation"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_TRANSLATION},
+    {SOCK_VECTOR, N_("Location"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_TRANSLATION},
     {SOCK_VECTOR, N_("Rotation"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_EULER},
     {-1, ""},
 };
@@ -63,7 +63,7 @@ static Mesh *create_cube_mesh(const float3 location, const float3 rotation, cons
 static void geo_node_mesh_primitive_cube_exec(GeoNodeExecParams params)
 {
   const float size = params.extract_input<float>("Size");
-  const float3 location = params.extract_input<float3>("Translation");
+  const float3 location = params.extract_input<float3>("Location");
   const float3 rotation = params.extract_input<float3>("Rotation");
 
   Mesh *mesh = create_cube_mesh(location, rotation, size);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
index 048c8ee9069..afd537a4065 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_ico_sphere.cc
@@ -26,7 +26,7 @@
 static bNodeSocketTemplate geo_node_mesh_primitive_ico_sphere_in[] = {
     {SOCK_FLOAT, N_("Radius"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, FLT_MAX, PROP_DISTANCE},
     {SOCK_INT, N_("Subdivisions"), 1, 0, 0, 0, 0, 7},
-    {SOCK_VECTOR, N_("Translation"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_TRANSLATION},
+    {SOCK_VECTOR, N_("Location"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_TRANSLATION},
     {SOCK_VECTOR, N_("Rotation"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_EULER},
     {-1, ""},
 };
@@ -70,7 +70,7 @@ static void geo_node_mesh_primitive_ico_sphere_exec(GeoNodeExecParams params)
   /* Anything above 8 is not likely to be purposeful and will be very slow. */
   const int subdivisions = std::min(params.extract_input<int>("Subdivisions"), 8);
   const float radius = params.extract_input<float>("Radius");
-  const float3 location = params.extract_input<float3>("Translation");
+  const float3 location = params.extract_input<float3>("Location");
   const float3 rotation = params.extract_input<float3>("Rotation");
 
   Mesh *mesh = create_ico_sphere_mesh(location, rotation, subdivisions, radius);



More information about the Bf-blender-cvs mailing list