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/physics/particle_edit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 59973d9ee8a..549c51d0d82 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -473,7 +473,8 @@ static void PE_set_view3d_data(bContext *C, PEData *data) { PE_set_data(C, data); - ED_view3d_viewcontext_init(C, &data->vc); + Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); + ED_view3d_viewcontext_init(C, &data->vc, depsgraph); if (!XRAY_ENABLED(data->vc.v3d)) { if (data->vc.v3d->flag & V3D_INVALID_BACKBUF) { -- cgit v1.2.3