forked from bartvdbraak/blender
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.
This commit is contained in:
parent
689c6133ea
commit
6a6bcea817
@ -452,10 +452,12 @@ static void render_drawlock(void *UNUSED(rjv), int lock)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* catch esc */
|
/* 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 */
|
/* 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;
|
return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,6 +586,12 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
|||||||
rj->re = re;
|
rj->re = re;
|
||||||
G.afbreek = 0;
|
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_jobs_start(CTX_wm_manager(C), steve);
|
||||||
|
|
||||||
WM_cursor_wait(0);
|
WM_cursor_wait(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user