From 7e3efac9a85743dbe6a3646170a4f4475bf91e6c Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Thu, 18 Mar 2021 17:00:47 -0400 Subject: 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 --- source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc | 2 +- .../blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/nodes') 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), -- cgit v1.2.3