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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-29 00:37:16 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-29 16:27:37 +0300
commit1ca105ebdccc386aa0a49e5d323be65123881243 (patch)
tree8ee8995f06630328e4db9c72af515db8ff123644 /source/blender/editors/sculpt_paint/paint_stroke.c
parentc31a849a1474ef1d96805b67ad12c9be2173e003 (diff)
Sculpt: disable workbench anti-aliasing during stroke painting
This mostly happens automatically anyway since there is usually not enough time left over for it. But when it does it happen it breaks partial redraw, and may also have a negative impact on responsiveness. Ref T70295
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 137d7bd9d6c..d8be345cc84 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -862,6 +862,7 @@ PaintStroke *paint_stroke_new(bContext *C,
UnifiedPaintSettings *ups = &toolsettings->unified_paint_settings;
Paint *p = BKE_paint_get_active_from_context(C);
Brush *br = stroke->brush = BKE_paint_brush(p);
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
float zoomx, zoomy;
ED_view3d_viewcontext_init(C, &stroke->vc, depsgraph);
@@ -887,6 +888,10 @@ PaintStroke *paint_stroke_new(bContext *C,
ups->overlap_factor = 1.0;
ups->stroke_active = true;
+ if (rv3d) {
+ rv3d->rflag |= RV3D_PAINTING;
+ }
+
zero_v3(ups->average_stroke_accum);
ups->average_stroke_counter = 0;
@@ -903,12 +908,17 @@ PaintStroke *paint_stroke_new(bContext *C,
void paint_stroke_free(bContext *C, wmOperator *op)
{
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
PaintStroke *stroke = op->customdata;
UnifiedPaintSettings *ups = stroke->ups;
ups->draw_anchored = false;
ups->stroke_active = false;
+ if (rv3d) {
+ rv3d->rflag &= ~RV3D_PAINTING;
+ }
+
if (stroke->timer) {
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), stroke->timer);
}