diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 15:40:48 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-01 15:40:48 +0300 |
commit | 02a4fc139597cae8c7002fd5a6e4b16171314cc5 (patch) | |
tree | 6d913e20b415a3e7e1f655dec4f700d41cb55b42 /source/blender/editors/sculpt_paint/paint_utils.c | |
parent | ee8a2edb967627370ba70c31d7e900dcd4746482 (diff) |
Texture Paint: implement efficient face selection updates.
Fix the old code that propagates selection changes to the
evaluated mesh directly without rebuilding, and avoid tagging
DEG_TAG_COPY_ON_WRITE if it succeeds.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 45200924790..923fc097f43 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -655,8 +655,7 @@ void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) static int face_select_all_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); - paintface_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), true); - paintface_tag_select_update(C, ob); + paintface_deselect_all_visible(C, ob, RNA_enum_get(op->ptr, "action"), true); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } @@ -739,8 +738,7 @@ static int face_select_hide_exec(bContext *C, wmOperator *op) { const bool unselected = RNA_boolean_get(op->ptr, "unselected"); Object *ob = CTX_data_active_object(C); - paintface_hide(ob, unselected); - paintface_tag_select_update(C, ob); + paintface_hide(C, ob, unselected); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } @@ -763,8 +761,7 @@ static int face_select_reveal_exec(bContext *C, wmOperator *op) { const bool select = RNA_boolean_get(op->ptr, "select"); Object *ob = CTX_data_active_object(C); - paintface_reveal(ob, select); - paintface_tag_select_update(C, ob); + paintface_reveal(C, ob, select); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } |