diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-05-30 13:22:31 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-05-30 13:22:31 +0300 |
commit | ce1dd44c6848142e5192c3f30e98e285f04f8461 (patch) | |
tree | 8ee129b91b33ac49a4ee76369705b23a6d4c7592 /source/blender/editors/sculpt_paint | |
parent | 878a805ae8a1e541b2c227e7d51395a22ac68772 (diff) | |
parent | f1c29b9bd3c8241b212d7d50b2d538b980a7d62e (diff) |
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 5bb4eb7cebf..2c6c4c82676 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1354,8 +1354,23 @@ static void paint_mesh_restore_co_task_cb(void *__restrict userdata, SculptSession *ss = data->ob->sculpt; SculptUndoNode *unode; - SculptUndoType type = (data->brush->sculpt_tool == SCULPT_TOOL_MASK ? SCULPT_UNDO_MASK : - SCULPT_UNDO_COORDS); + SculptUndoType type; + + 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; + } if (ss->bm) { unode = SCULPT_undo_push_node(data->ob, data->nodes[n], type); @@ -1397,8 +1412,6 @@ static void paint_mesh_restore_co_task_cb(void *__restrict userdata, } } BKE_pbvh_vertex_iter_end; - - BKE_pbvh_node_mark_update(data->nodes[n]); } static void paint_mesh_restore_co(Sculpt *sd, Object *ob) |