[Bf-blender-cvs] [7e3efac9a85] master: Fix T86701: Geometry nodes Cube and UV Sphere mesh size

Pratik Borhade noreply at git.blender.org
Thu Mar 18 22:01:40 CET 2021


Commit: 7e3efac9a85743dbe6a3646170a4f4475bf91e6c
Author: Pratik Borhade
Date:   Thu Mar 18 17:00:47 2021 -0400
Branches: master
https://developer.blender.org/rB7e3efac9a85743dbe6a3646170a4f4475bf91e6c

Fix T86701: Geometry nodes Cube and UV Sphere mesh size

The size in the transform matrices was extra, since it is also
passed as an argument to the BMesh operators.

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

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

M	source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc
M	source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_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 5c32ff6b687..1ef84c7d070 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
@@ -40,7 +40,7 @@ namespace blender::nodes {
 static Mesh *create_cube_mesh(const float3 location, const float3 rotation, const float size)
 {
   float4x4 transform;
-  loc_eul_size_to_mat4(transform.values, location, rotation, float3(size));
+  loc_eul_size_to_mat4(transform.values, location, rotation, float3(1));
 
   const BMeshCreateParams bmcp = {true};
   const BMAllocTemplate allocsize = {8, 12, 24, 6};
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
index e164ad247a3..7b07722fd5a 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc
@@ -74,7 +74,7 @@ static Mesh *create_uv_sphere_mesh_bmesh(const float3 location,
                                          const int rings)
 {
   float4x4 transform;
-  loc_eul_size_to_mat4(transform.values, location, rotation, float3(radius));
+  loc_eul_size_to_mat4(transform.values, location, rotation, float3(1.0f));
 
   const BMeshCreateParams bmcp = {true};
   const BMAllocTemplate allocsize = {sphere_vert_total(segments, rings),



More information about the Bf-blender-cvs mailing list