Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2019-08-01 22:40:57 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-08-01 22:42:01 +0300
commit2c4dfbb00246ff59cac424392588d55363aa2400 (patch)
tree58a6054218306e6dbcbdb5a3244eff9538d9b4c3 /source/blender/editors/interface/interface_templates.c
parentaa0322524ea6f59068dc4ea9cef5e6f3e2a7979a (diff)
Fix T66028: Move sequence, movieclip and text editor progressbars to status bar
Reviewed By: brecht Differential Revision: https://developer.blender.org/D5219
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r--source/blender/editors/interface/interface_templates.c156
1 files changed, 86 insertions, 70 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 1fc1af9815f..654483c2182 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -6057,13 +6057,13 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
WM_jobs_stop(CTX_wm_manager(C), CTX_data_scene(C), NULL);
break;
case B_STOPSEQ:
- WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
+ WM_jobs_stop(CTX_wm_manager(C), CTX_data_scene(C), NULL);
break;
case B_STOPCLIP:
- WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
+ WM_jobs_stop(CTX_wm_manager(C), CTX_data_scene(C), NULL);
break;
case B_STOPFILE:
- WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
+ WM_jobs_stop(CTX_wm_manager(C), CTX_data_scene(C), NULL);
break;
case B_STOPOTHER:
G.is_break = true;
@@ -6116,80 +6116,96 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
UI_block_func_handle_set(block, do_running_jobs, NULL);
- if (sa->spacetype == SPACE_SEQ) {
- if (WM_jobs_test(wm, sa, WM_JOB_TYPE_ANY)) {
- owner = sa;
+ Scene *scene;
+ /* another scene can be rendering too, for example via compositor */
+ for (scene = CTX_data_main(C)->scenes.first; scene; scene = scene->id.next) {
+ if (WM_jobs_test(wm, scene, WM_JOB_TYPE_ANY)) {
+ handle_event = B_STOPOTHER;
+ icon = ICON_NONE;
+ owner = scene;
}
- handle_event = B_STOPSEQ;
- icon = ICON_SEQUENCE;
- }
- else if (sa->spacetype == SPACE_CLIP) {
- if (WM_jobs_test(wm, sa, WM_JOB_TYPE_ANY)) {
- owner = sa;
+ else {
+ continue;
}
- handle_event = B_STOPCLIP;
- icon = ICON_TRACKER;
- }
- else if (sa->spacetype == SPACE_FILE) {
- if (WM_jobs_test(wm, sa, WM_JOB_TYPE_FILESEL_READDIR)) {
- owner = sa;
+
+ if (WM_jobs_test(wm, scene, WM_JOB_TYPE_SEQ_BUILD_PROXY)) {
+ handle_event = B_STOPSEQ;
+ icon = ICON_SEQUENCE;
+ owner = scene;
+ break;
}
- handle_event = B_STOPFILE;
- icon = ICON_FILEBROWSER;
- }
- else {
- Scene *scene;
- /* another scene can be rendering too, for example via compositor */
- for (scene = CTX_data_main(C)->scenes.first; scene; scene = scene->id.next) {
- if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER)) {
- handle_event = B_STOPRENDER;
- icon = ICON_SCENE;
- break;
- }
- else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE)) {
- handle_event = B_STOPCOMPO;
- icon = ICON_RENDERLAYERS;
- break;
- }
- 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.
- */
- if (sa->spacetype != SPACE_NODE) {
- handle_event = B_STOPOTHER;
- icon = ICON_IMAGE;
- break;
- }
- }
- else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_DPAINT_BAKE)) {
- handle_event = B_STOPOTHER;
- icon = ICON_MOD_DYNAMICPAINT;
- break;
- }
- else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_POINTCACHE)) {
- handle_event = B_STOPOTHER;
- icon = ICON_PHYSICS;
- break;
- }
- else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_SIM_FLUID)) {
- handle_event = B_STOPOTHER;
- icon = ICON_MOD_FLUIDSIM;
- break;
- }
- else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_SIM_OCEAN)) {
- handle_event = B_STOPOTHER;
- icon = ICON_MOD_OCEAN;
- break;
- }
- else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_ANY)) {
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_SEQ_BUILD_PREVIEW)) {
+ handle_event = B_STOPSEQ;
+ icon = ICON_SEQUENCE;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_CLIP_BUILD_PROXY)) {
+ handle_event = B_STOPCLIP;
+ icon = ICON_TRACKER;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_CLIP_PREFETCH)) {
+ handle_event = B_STOPCLIP;
+ icon = ICON_TRACKER;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_CLIP_TRACK_MARKERS)) {
+ handle_event = B_STOPCLIP;
+ icon = ICON_TRACKER;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_CLIP_SOLVE_CAMERA)) {
+ handle_event = B_STOPCLIP;
+ icon = ICON_TRACKER;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_FILESEL_READDIR)) {
+ handle_event = B_STOPFILE;
+ icon = ICON_FILEBROWSER;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER)) {
+ handle_event = B_STOPRENDER;
+ icon = ICON_SCENE;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE)) {
+ handle_event = B_STOPCOMPO;
+ icon = ICON_RENDERLAYERS;
+ break;
+ }
+ 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.
+ */
+ if (sa->spacetype != SPACE_NODE) {
handle_event = B_STOPOTHER;
- icon = ICON_NONE;
+ icon = ICON_IMAGE;
break;
}
}
- owner = scene;
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_DPAINT_BAKE)) {
+ handle_event = B_STOPOTHER;
+ icon = ICON_MOD_DYNAMICPAINT;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_POINTCACHE)) {
+ handle_event = B_STOPOTHER;
+ icon = ICON_PHYSICS;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_SIM_FLUID)) {
+ handle_event = B_STOPOTHER;
+ icon = ICON_MOD_FLUIDSIM;
+ break;
+ }
+ else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_OBJECT_SIM_OCEAN)) {
+ handle_event = B_STOPOTHER;
+ icon = ICON_MOD_OCEAN;
+ break;
+ }
}
if (owner) {