[Bf-blender-cvs] [94fa941] soc-2016-cycles_denoising: Cycles: Fix progress bar not appearing for denoising after rendering
Lukas Stockner
noreply at git.blender.org
Sat Nov 26 04:21:39 CET 2016
Commit: 94fa941f7f65b32e6c0a598ccb5f82e1e660d92a
Author: Lukas Stockner
Date: Fri Nov 25 00:48:55 2016 +0100
Branches: soc-2016-cycles_denoising
https://developer.blender.org/rB94fa941f7f65b32e6c0a598ccb5f82e1e660d92a
Cycles: Fix progress bar not appearing for denoising after rendering
===================================================================
M source/blender/editors/interface/interface_templates.c
M source/blender/editors/space_image/image_ops.c
===================================================================
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index bdad667..b8b46d0 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -3489,7 +3489,8 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
Scene *scene;
/* another scene can be rendering too, for example via compositor */
for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next) {
- if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER)) {
+ if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER) ||
+ WM_jobs_test(wm, scene, WM_JOB_TYPE_POSTPROCESS)) {
handle_event = B_STOPRENDER;
icon = ICON_SCENE;
break;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 64085bd..e62b805 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -4049,7 +4049,7 @@ static int postprocess_invoke(bContext *C, wmOperator *op, const wmEvent *event)
RenderResult *rr = BKE_image_acquire_renderresult(scene, ima);
Render *re = RE_NewRender(scene->id.name);
- if (WM_jobs_test(CTX_wm_manager(C), rr, WM_JOB_TYPE_POSTPROCESS))
+ if (WM_jobs_test(CTX_wm_manager(C), scene, WM_JOB_TYPE_POSTPROCESS))
return OPERATOR_CANCELLED;
WM_jobs_kill_all_except(CTX_wm_manager(C), CTX_wm_screen(C));
@@ -4065,7 +4065,7 @@ static int postprocess_invoke(bContext *C, wmOperator *op, const wmEvent *event)
job->last_layer = 0;
job->sa = render_view_open(C, event->x, event->y, op->reports);
- wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), rr, "Postprocess", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_POSTPROCESS);
+ wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Postprocess", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_POSTPROCESS);
WM_jobs_customdata_set(wm_job, job, postprocess_freejob);
WM_jobs_timer(wm_job, 0.2, NC_SCENE | ND_RENDER_RESULT, 0);
WM_jobs_callbacks(wm_job, postprocess_startjob, NULL, NULL, postprocess_endjob);
@@ -4075,7 +4075,7 @@ static int postprocess_invoke(bContext *C, wmOperator *op, const wmEvent *event)
RE_display_update_cb(re, job, postprocess_image_rect_update);
RE_progress_cb(re, job, postprocess_progress_update);
- op->customdata = rr;
+ op->customdata = scene;
G.is_break = false;
WM_jobs_start(CTX_wm_manager(C), wm_job);
@@ -4088,9 +4088,9 @@ static int postprocess_invoke(bContext *C, wmOperator *op, const wmEvent *event)
}
static int postprocess_modal(bContext *C, wmOperator *op, const wmEvent *event) {
- RenderResult *rr = (RenderResult*) op->customdata;
+ Scene *scene = (Scene*) op->customdata;
- if (0 == WM_jobs_test(CTX_wm_manager(C), rr, WM_JOB_TYPE_POSTPROCESS)) {
+ if (0 == WM_jobs_test(CTX_wm_manager(C), scene, WM_JOB_TYPE_POSTPROCESS)) {
return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
}
@@ -4104,9 +4104,9 @@ static int postprocess_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void postprocess_cancel(bContext *C, wmOperator *op)
{
wmWindowManager *wm = CTX_wm_manager(C);
- RenderResult *rr = (RenderResult*) op->customdata;
+ Scene *scene = (Scene*) op->customdata;
- WM_jobs_kill_type(wm, rr, WM_JOB_TYPE_POSTPROCESS);
+ WM_jobs_kill_type(wm, scene, WM_JOB_TYPE_POSTPROCESS);
}
void IMAGE_OT_postprocess(wmOperatorType *ot)
More information about the Bf-blender-cvs
mailing list