[Bf-blender-cvs] [61efeb6df98] master: Fix PBVH search callback in pose and elastic deform

Pablo Dobarro noreply at git.blender.org
Mon Sep 30 14:56:46 CEST 2019


Commit: 61efeb6df986075713745d585bbfd881a2fbfda7
Author: Pablo Dobarro
Date:   Mon Sep 30 14:56:04 2019 +0200
Branches: master
https://developer.blender.org/rB61efeb6df986075713745d585bbfd881a2fbfda7

Fix PBVH search callback in pose and elastic deform

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5947

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

M	source/blender/editors/sculpt_paint/sculpt.c

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

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 493b6925b4c..d841d65ea62 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5185,13 +5185,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
 
   /* These brushes need to update all nodes as they are not constrained by the brush radius */
   if (brush->sculpt_tool == SCULPT_TOOL_ELASTIC_DEFORM) {
-    SculptSearchSphereData data = {
-        .ss = ss,
-        .sd = sd,
-        .radius_squared = FLT_MAX,
-        .original = true,
-    };
-    BKE_pbvh_search_gather(ss->pbvh, NULL, &data, &nodes, &totnode);
+    BKE_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
   }
   else if (brush->sculpt_tool == SCULPT_TOOL_POSE) {
     float final_radius = ss->cache->radius * (1 + brush->pose_offset);
@@ -5201,7 +5195,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
         .radius_squared = final_radius * final_radius,
         .original = true,
     };
-    BKE_pbvh_search_gather(ss->pbvh, NULL, &data, &nodes, &totnode);
+    BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode);
   }
   else {
     const bool use_original = sculpt_tool_needs_original(brush->sculpt_tool) ? true :



More information about the Bf-blender-cvs mailing list