diff options
author | Pratik Borhade <PratikPB2123> | 2021-03-19 00:00:47 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-03-19 00:00:47 +0300 |
commit | 7e3efac9a85743dbe6a3646170a4f4475bf91e6c (patch) | |
tree | 9a43814bc6dba3da7141d6c95243bb5cb734b3c8 | |
parent | 894e8b18e4266d1784cc98a20ab72dbd9c76e1cc (diff) |
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
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc | 2 | ||||
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc | 2 |
2 files changed, 2 insertions, 2 deletions
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), |