[Bf-blender-cvs] [839c796321c] geometry-nodes-curve-support: Geometry Nodes Curves: Fix profile radius transform

Hans Goudey noreply at git.blender.org
Mon Apr 12 01:54:13 CEST 2021


Commit: 839c796321c25181adc013902cf85efc24c023f6
Author: Hans Goudey
Date:   Sun Apr 11 18:54:05 2021 -0500
Branches: geometry-nodes-curve-support
https://developer.blender.org/rB839c796321c25181adc013902cf85efc24c023f6

Geometry Nodes Curves: Fix profile radius transform

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

M	source/blender/blenlib/BLI_float4x4.hh
M	source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc

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

diff --git a/source/blender/blenlib/BLI_float4x4.hh b/source/blender/blenlib/BLI_float4x4.hh
index a72627cde7c..396b0b1bd21 100644
--- a/source/blender/blenlib/BLI_float4x4.hh
+++ b/source/blender/blenlib/BLI_float4x4.hh
@@ -150,7 +150,13 @@ struct float4x4 {
   void apply_scale(const float scale)
   {
     values[0][0] *= scale;
+    values[0][1] *= scale;
+    values[0][2] *= scale;
+    values[1][0] *= scale;
     values[1][1] *= scale;
+    values[1][2] *= scale;
+    values[2][0] *= scale;
+    values[2][1] *= scale;
     values[2][2] *= scale;
   }
 
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
index d8a1ac0e9dc..90efaaaa48d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
@@ -184,7 +184,7 @@ static void spline_extrude_to_mesh_data(const Spline &spline,
         positions[i_ring], tangents[i_ring], normals[i_ring]);
 
     const float radius = spline.get_evaluated_point_radius(i_ring);
-    point_matrix.apply_scale(2.0f * radius);
+    point_matrix.apply_scale(radius);
 
     for (const int i_profile : IndexRange(profile_vert_len)) {
       MVert &vert = verts[vert_offset++];



More information about the Bf-blender-cvs mailing list