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

Node tagging needed to happen after the undo node's null check.
This commit is contained in:
Joseph Eagar 2022-08-15 17:13:45 -07:00
parent 7f3eb055dd
commit f80f600b8e
Notes: blender-bot 2023-02-14 07:25:51 +01:00
Referenced by issue #100379, Regression: Sculpting using alpha brushes is slower in 3.2 than 3.1
1 changed files with 13 additions and 3 deletions

View File

@ -1406,16 +1406,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;
}
@ -1430,6 +1427,19 @@ 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;