From abbc8333ac1ea150fd89d6b32f548ad2da5ae686 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 4 Jul 2022 16:08:29 +0200 Subject: [PATCH] Fix curves sculpting Selection Paint missing refresh This was reported as part of D15219 but it is a problem in master, not in the patch. EEVEE is drawing with a cheap sampling when navigating or painting, but we need to clear the painting flag when we are done painting. For a rainy day: DRW_state_is_navigating() should be renamed to indicate that it also checks for the painting flag. --- source/blender/editors/sculpt_paint/curves_sculpt_intern.hh | 2 +- .../editors/sculpt_paint/curves_sculpt_selection_paint.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh index b26649e746b..4cfaf7ebfc9 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/curves_sculpt_intern.hh @@ -111,7 +111,7 @@ class CurvesSculptCommonContext { const Scene *scene = nullptr; ARegion *region = nullptr; const View3D *v3d = nullptr; - const RegionView3D *rv3d = nullptr; + RegionView3D *rv3d = nullptr; CurvesSculptCommonContext(const bContext &C); }; diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc b/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc index b40aebcaaf1..353b84236a3 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_selection_paint.cc @@ -140,6 +140,7 @@ struct SelectionPaintOperationExecutor { * selection is handled as a generic attribute for now. */ DEG_id_tag_update(&curves_id_->id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, &curves_id_->id); + ctx_.rv3d->rflag &= ~RV3D_PAINTING; ED_region_tag_redraw(ctx_.region); }