From 240ee2fccb8f53b41966dce9d1cb3187ac80ef47 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 26 Nov 2012 09:46:15 +0000 Subject: Fix #33312: cycles render crash with motion blur / vector pass rendering. It's actually the render threading issue and not a full fix, but this avoids the 3D viewport getting redrawn when changing frames to get motion vectors. --- source/blender/makesrna/intern/rna_scene_api.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source/blender/makesrna/intern/rna_scene_api.c') diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 63253153699..7857aca2aa6 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -62,12 +62,16 @@ static void rna_Scene_frame_set(Scene *scene, int frame, float subframe) BKE_scene_update_for_newframe(G.main, scene, (1 << 20) - 1); BKE_scene_camera_switch_update(scene); - /* cant use NC_SCENE|ND_FRAME because this causes wm_event_do_notifiers to call - * BKE_scene_update_for_newframe which will loose any un-keyed changes [#24690] */ - /* WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); */ - - /* instead just redraw the views */ - WM_main_add_notifier(NC_WINDOW, NULL); + /* don't do notifier when we're rendering, avoid some viewport crashes + * redrawing while the data is being modified for render */ + if(!G.is_rendering) { + /* cant use NC_SCENE|ND_FRAME because this causes wm_event_do_notifiers to call + * BKE_scene_update_for_newframe which will loose any un-keyed changes [#24690] */ + /* WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); */ + + /* instead just redraw the views */ + WM_main_add_notifier(NC_WINDOW, NULL); + } } static void rna_Scene_update_tagged(Scene *scene) -- cgit v1.2.3