Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_face_set.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_face_set.c43
1 files changed, 9 insertions, 34 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index 152d23dfa5b..af6a06caf69 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -303,7 +303,6 @@ static int sculpt_face_set_create_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
- ARegion *region = CTX_wm_region(C);
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
const int mode = RNA_enum_get(op->ptr, "mode");
@@ -406,8 +405,7 @@ static int sculpt_face_set_create_exec(bContext *C, wmOperator *op)
SCULPT_undo_push_end();
- ED_region_tag_redraw(region);
- WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+ SCULPT_tag_update_overlays(C);
return OPERATOR_FINISHED;
}
@@ -664,7 +662,6 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
- ARegion *region = CTX_wm_region(C);
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
const int mode = RNA_enum_get(op->ptr, "mode");
@@ -734,13 +731,7 @@ static int sculpt_face_set_init_exec(bContext *C, wmOperator *op)
BKE_mesh_flush_hidden_from_verts(ob->data);
}
- ED_region_tag_redraw(region);
- DEG_id_tag_update(&ob->id, ID_RECALC_SHADING);
-
- View3D *v3d = CTX_wm_view3d(C);
- if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) {
- DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
- }
+ SCULPT_tag_update_overlays(C);
return OPERATOR_FINISHED;
}
@@ -823,7 +814,6 @@ static int sculpt_face_sets_change_visibility_exec(bContext *C, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
- ARegion *region = CTX_wm_region(C);
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
/* Dyntopo not supported. */
@@ -924,13 +914,12 @@ static int sculpt_face_sets_change_visibility_exec(bContext *C, wmOperator *op)
MEM_SAFE_FREE(nodes);
- ED_region_tag_redraw(region);
- DEG_id_tag_update(&ob->id, ID_RECALC_SHADING);
-
- View3D *v3d = CTX_wm_view3d(C);
- if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) {
- DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
+ if (BKE_pbvh_type(pbvh) == PBVH_FACES) {
+ BKE_mesh_flush_hidden_from_verts(ob->data);
}
+
+ SCULPT_tag_update_overlays(C);
+
return OPERATOR_FINISHED;
}
@@ -980,7 +969,6 @@ static int sculpt_face_sets_randomize_colors_exec(bContext *C, wmOperator *UNUSE
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
- ARegion *region = CTX_wm_region(C);
/* Dyntopo not supported. */
if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) {
@@ -1008,13 +996,7 @@ static int sculpt_face_sets_randomize_colors_exec(bContext *C, wmOperator *UNUSE
MEM_SAFE_FREE(nodes);
- View3D *v3d = CTX_wm_view3d(C);
- if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) {
- DEG_id_tag_update(&ob->id, ID_RECALC_SHADING);
- }
-
- ED_region_tag_redraw(region);
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
+ SCULPT_tag_update_overlays(C);
return OPERATOR_FINISHED;
}
@@ -1139,7 +1121,6 @@ static int sculpt_face_set_edit_invoke(bContext *C, wmOperator *op, const wmEven
{
Object *ob = CTX_data_active_object(C);
SculptSession *ss = ob->sculpt;
- ARegion *region = CTX_wm_region(C);
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
const int mode = RNA_enum_get(op->ptr, "mode");
@@ -1198,13 +1179,7 @@ static int sculpt_face_set_edit_invoke(bContext *C, wmOperator *op, const wmEven
BKE_mesh_flush_hidden_from_verts(ob->data);
}
- ED_region_tag_redraw(region);
- DEG_id_tag_update(&ob->id, ID_RECALC_SHADING);
-
- View3D *v3d = CTX_wm_view3d(C);
- if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) {
- DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
- }
+ SCULPT_tag_update_overlays(C);
return OPERATOR_FINISHED;
}