[Bf-blender-cvs] [edcb2ad7b3a] master: Fix: Handle handles reset when realizing with other curve types

Hans Goudey noreply at git.blender.org
Thu Mar 10 22:42:44 CET 2022


Commit: edcb2ad7b3a07f9cd09243cc5fbf5e563e853964
Author: Hans Goudey
Date:   Thu Mar 10 15:42:22 2022 -0600
Branches: master
https://developer.blender.org/rBedcb2ad7b3a07f9cd09243cc5fbf5e563e853964

Fix: Handle handles reset when realizing with other curve types

The result handle attributes for non-bezier types are zeroed.
By mistake though, the entire array was zeroed, not just the
area corresponding to that curves source.

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

M	source/blender/geometry/intern/realize_instances.cc

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

diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc
index 100146bbf0c..32bad07de4f 100644
--- a/source/blender/geometry/intern/realize_instances.cc
+++ b/source/blender/geometry/intern/realize_instances.cc
@@ -1155,14 +1155,14 @@ static void execute_realize_curve_task(const RealizeInstancesOptions &options,
   /* Copy and transform handle positions if necessary. */
   if (all_curves_info.create_handle_postion_attributes) {
     if (curves_info.handle_left.is_empty()) {
-      all_handle_left.fill(float3(0));
+      all_handle_left.slice(dst_point_range).fill(float3(0));
     }
     else {
       copy_transformed_positions(
           curves_info.handle_left, task.transform, all_handle_left.slice(dst_point_range));
     }
     if (curves_info.handle_right.is_empty()) {
-      all_handle_right.fill(float3(0));
+      all_handle_right.slice(dst_point_range).fill(float3(0));
     }
     else {
       copy_transformed_positions(



More information about the Bf-blender-cvs mailing list