[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49478] trunk/blender/source/blender/ editors/render/render_internal.c: Fix #31800: Blender crash by rendering in connection with linked groups

Sergey Sharybin sergey.vfx at gmail.com
Wed Aug 1 21:22:04 CEST 2012


Revision: 49478
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49478
Author:   nazgul
Date:     2012-08-01 19:22:04 +0000 (Wed, 01 Aug 2012)
Log Message:
-----------
Fix #31800: Blender crash by rendering in connection with linked groups

Seems the issue was caused by render layer node overwritng active scene
when render button is clicked. It lead t situations when job was adding
with owner of rendering scene, but modal callback was checking for render
jobs existing for current active scene. There was no such jobs so operator
used to finish at this point and free report list used by render pipeline.

Solved by storing operator owner in operator's custom data. Probably
there's nicer way to do fix this issue but currently can't think of it.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/render/render_internal.c

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_internal.c	2012-08-01 19:21:15 UTC (rev 49477)
+++ trunk/blender/source/blender/editors/render/render_internal.c	2012-08-01 19:22:04 UTC (rev 49478)
@@ -452,10 +452,12 @@
 }
 
 /* catch esc */
-static int screen_render_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+static int screen_render_modal(bContext *C, wmOperator *op, wmEvent *event)
 {
+	Scene *scene = (Scene *) op->customdata;
+
 	/* no running blender, remove handler and pass through */
-	if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) {
+	if (0 == WM_jobs_test(CTX_wm_manager(C), scene)) {
 		return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
 	}
 
@@ -584,6 +586,12 @@
 	rj->re = re;
 	G.afbreek = 0;
 
+	/* store actual owner of job, so modal operator could check for it,
+	 * the reason of this is that active scene could change when rendering
+	 * several layers from composistor [#31800]
+	 */
+	op->customdata = scene;
+
 	WM_jobs_start(CTX_wm_manager(C), steve);
 
 	WM_cursor_wait(0);




More information about the Bf-blender-cvs mailing list