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.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user