diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-01 23:22:04 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-01 23:22:04 +0400 |
commit | 6a6bcea81765976e902a4bac99ff9cbcd0faed55 (patch) | |
tree | 64a213ab11d54c038d4f62b98905ff6a268fde2c /source | |
parent | 689c6133ea7f659fc61679c83ca216338533f98d (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/render/render_internal.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 8fa3c6f992f..b1776894959 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -452,10 +452,12 @@ static void render_drawlock(void *UNUSED(rjv), int lock) } /* 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 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) 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); |