[Bf-blender-cvs] [2d19038c6c2] blender-v3.3-release: Sculpt: Fix T100379: Anchored brush tags all nodes for update

Joseph Eagar noreply at git.blender.org
Tue Aug 16 02:21:41 CEST 2022


Commit: 2d19038c6c2817fff4d8278adfa9d14020c9eea6
Author: Joseph Eagar
Date:   Mon Aug 15 17:17:27 2022 -0700
Branches: blender-v3.3-release
https://developer.blender.org/rB2d19038c6c2817fff4d8278adfa9d14020c9eea6

Sculpt: Fix T100379: Anchored brush tags all nodes for update

Node tagging needed to happen after the undo node's null check.

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

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 aa151b2e678..b25cabc9ab4 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -1367,16 +1367,13 @@ static void paint_mesh_restore_co_task_cb(void *__restrict userdata,
   switch (data->brush->sculpt_tool) {
     case SCULPT_TOOL_MASK:
       type = SCULPT_UNDO_MASK;
-      BKE_pbvh_node_mark_update_mask(data->nodes[n]);
       break;
     case SCULPT_TOOL_PAINT:
     case SCULPT_TOOL_SMEAR:
       type = SCULPT_UNDO_COLOR;
-      BKE_pbvh_node_mark_update_color(data->nodes[n]);
       break;
     default:
       type = SCULPT_UNDO_COORDS;
-      BKE_pbvh_node_mark_update(data->nodes[n]);
       break;
   }
 
@@ -1391,6 +1388,20 @@ static void paint_mesh_restore_co_task_cb(void *__restrict userdata,
     return;
   }
 
+  switch (type) {
+    case SCULPT_UNDO_MASK:
+      BKE_pbvh_node_mark_update_mask(data->nodes[n]);
+      break;
+    case SCULPT_UNDO_COLOR:
+      BKE_pbvh_node_mark_update_color(data->nodes[n]);
+      break;
+    case SCULPT_UNDO_COORDS:
+      BKE_pbvh_node_mark_update(data->nodes[n]);
+      break;
+    default:
+      break;
+  }
+
   PBVHVertexIter vd;
   SculptOrigVertData orig_data;



More information about the Bf-blender-cvs mailing list