From 383c4ba3d83fa706319888c39731a52b3f319ffd Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 18 Sep 2019 17:19:07 +0200 Subject: Fix excessive dependency graph evaluation while painting strokes Particularly noticeable when vertex painting with a subsurf modifier. In some cases every sculpt or paint stroke step would evaluate the dependency graph. This should only happen for redraws. Now more selectively choose if the dependency graph should be evaluated to initialize the view context. Doing it in the view context evaluation is somewhat hidden, now it's more explicit. Differential Revision: https://developer.blender.org/D5844 --- source/blender/editors/curve/editfont.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/curve/editfont.c') diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 781eb2634fb..612c9b5a21d 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -2201,6 +2201,7 @@ void FONT_OT_unlink(wmOperatorType *ot) bool ED_curve_editfont_select_pick( bContext *C, const int mval[2], bool extend, bool deselect, bool toggle) { + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Object *obedit = CTX_data_edit_object(C); Curve *cu = obedit->data; ViewContext vc; @@ -2212,7 +2213,7 @@ bool ED_curve_editfont_select_pick( const float dist = ED_view3d_select_dist_px(); float dist_sq_best = dist * dist; - ED_view3d_viewcontext_init(C, &vc); + ED_view3d_viewcontext_init(C, &vc, depsgraph); ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d); -- cgit v1.2.3