[Bf-blender-cvs] [20c90ea] master: Bake API: renaming WM_JOB_RENDER_BAKE to WM_JOB_OBJECT_BAKE and use it consistently

Dalai Felinto noreply at git.blender.org
Fri May 9 03:57:13 CEST 2014


Commit: 20c90eae147f359b84a51a47846588e9b28cbc6f
Author: Dalai Felinto
Date:   Thu May 8 21:46:51 2014 -0300
https://developer.blender.org/rB20c90eae147f359b84a51a47846588e9b28cbc6f

Bake API: renaming WM_JOB_RENDER_BAKE to WM_JOB_OBJECT_BAKE and use it consistently

Note: that doesnt change much. It definitively doesnt change the random crash OSX is experiencing sometimes.

===================================================================

M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/object/object_bake_api.c
M	source/blender/windowmanager/WM_api.h

===================================================================

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 961c2d0..907e208 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -3290,7 +3290,8 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
 				handle_event = B_STOPCOMPO;
 				break;
 			}
-			else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE)) {
+			else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE) ||
+			         WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_BAKE)) {
 				/* Skip bake jobs in compositor to avoid compo header displaying
 				 * progress bar which is not being updated (bake jobs only need
 				 * to update NC_IMAGE context.
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 72adc6c..4477534 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -77,7 +77,7 @@
 static int bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
 {
 	/* no running blender, remove handler and pass through */
-	if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_RENDER_BAKE))
+	if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_BAKE))
 		return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
 
 	/* running render */
@@ -1036,7 +1036,7 @@ static int bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
 	bake_set_props(op, scene);
 
 	/* only one render job at a time */
-	if (WM_jobs_test(CTX_wm_manager(C), scene, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE))
+	if (WM_jobs_test(CTX_wm_manager(C), scene, WM_JOB_TYPE_OBJECT_BAKE))
 		return OPERATOR_CANCELLED;
 
 	bkr = MEM_callocN(sizeof(BakeAPIRender), "render bake");
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index ba54357..64cada9 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -374,11 +374,11 @@ enum {
 	WM_JOB_TYPE_COMPOSITE,
 	WM_JOB_TYPE_RENDER,
 	WM_JOB_TYPE_RENDER_PREVIEW,  /* UI preview */
-	WM_JOB_TYPE_RENDER_BAKE,
 	WM_JOB_TYPE_SCREENCAST,
 	WM_JOB_TYPE_OBJECT_SIM_OCEAN,
 	WM_JOB_TYPE_OBJECT_SIM_FLUID,
 	WM_JOB_TYPE_OBJECT_BAKE_TEXTURE,
+	WM_JOB_TYPE_OBJECT_BAKE,
 	WM_JOB_TYPE_FILESEL_THUMBNAIL,
 	WM_JOB_TYPE_CLIP_BUILD_PROXY,
 	WM_JOB_TYPE_CLIP_TRACK_MARKERS,




More information about the Bf-blender-cvs mailing list