[Bf-blender-cvs] [a4a6c2a1a41] ui-asset-view-template: Fix T86701: Geometry nodes Cube and UV Sphere mesh size
Pratik Borhade
noreply at git.blender.org
Sun Mar 21 16:11:59 CET 2021
Commit: a4a6c2a1a41933b411418f5e370e5598ca994d27
Author: Pratik Borhade
Date: Thu Mar 18 17:00:47 2021 -0400
Branches: ui-asset-view-template
https://developer.blender.org/rBa4a6c2a1a41933b411418f5e370e5598ca994d27
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