From 16d329da284c20e9dcfc0a60dcfc9b6e213ad3e0 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 31 May 2022 10:22:43 +0200 Subject: Compositor: add pre/post/cancel handlers and background job info Main motivation is from T54314 where there was no way to read from a Viewer image datablock after the compositor has run. The only solution there was to do a full rerender (which obviously takes much longer). Adding a handler avoids having to rerender. This uses new syntax from rBf4456a4d3c97 and also adds "COMPOSITE" as a job type that can be queried by `bpy.app.is_job_running`. NOTE: there is another issue when multiple viewers are used and these get active via RNA (compo execution is not triggered there yet -- unlike when a viewer is selected in the Editor -- this is an issue of `ED_node_set_active` vs. only `nodeSetActive`, but this will be tackled separately) Maniphest Tasks: T54314 Differential Revision: https://developer.blender.org/D15078 --- source/blender/makesrna/intern/rna_wm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 1482c25fb9c..3ff9e6be3ce 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -137,6 +137,7 @@ const EnumPropertyItem rna_enum_wm_job_type_items[] = { {WM_JOB_TYPE_RENDER, "RENDER", 0, "Regular rendering", ""}, {WM_JOB_TYPE_RENDER_PREVIEW, "RENDER_PREVIEW", 0, "Rendering previews", ""}, {WM_JOB_TYPE_OBJECT_BAKE, "OBJECT_BAKE", 0, "Object Baking", ""}, + {WM_JOB_TYPE_COMPOSITE, "COMPOSITE", 0, "Compositing", ""}, {0, NULL, 0, NULL, NULL}, }; -- cgit v1.2.3