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/object/object_transform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/object/object_transform.c') diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 1cd16b1b0bf..b534e1b9683 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1715,8 +1715,9 @@ static void object_transform_axis_target_cancel(bContext *C, wmOperator *op) static int object_transform_axis_target_invoke(bContext *C, wmOperator *op, const wmEvent *event) { + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); ViewContext vc; - ED_view3d_viewcontext_init(C, &vc); + ED_view3d_viewcontext_init(C, &vc, depsgraph); if (vc.obact == NULL || !object_is_target_compat(vc.obact)) { /* Falls back to texture space transform. */ -- cgit v1.2.3