[Bf-blender-cvs] [2c4dfbb0024] master: Fix T66028: Move sequence, movieclip and text editor progressbars to status bar

Richard Antalik noreply at git.blender.org
Thu Aug 1 22:37:33 CEST 2019


Commit: 2c4dfbb00246ff59cac424392588d55363aa2400
Author: Richard Antalik
Date:   Thu Aug 1 12:40:57 2019 -0700
Branches: master
https://developer.blender.org/rB2c4dfbb00246ff59cac424392588d55363aa2400

Fix T66028: Move sequence, movieclip and text editor progressbars to status bar

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5219

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

M	release/scripts/startup/bl_ui/space_clip.py
M	source/blender/editors/interface/interface_templates.c
M	source/blender/editors/space_clip/clip_editor.c
M	source/blender/editors/space_clip/clip_ops.c
M	source/blender/editors/space_clip/tracking_ops_solve.c
M	source/blender/editors/space_clip/tracking_ops_track.c
M	source/blender/editors/space_file/filelist.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/space_sequencer/sequencer_preview.c

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

diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index b0fc5716f89..ff2dfca6cf8 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -180,8 +180,6 @@ class CLIP_HT_header(Header):
             active_object = tracking.objects.active
 
             if sc.view == 'CLIP':
-                layout.template_running_jobs()
-
                 r = active_object.reconstruction
 
                 if r.is_valid and sc.view == 'CLIP':
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) {
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index b0b6aa47df1..fbefc884589 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -1153,7 +1153,7 @@ void clip_start_prefetch_job(const bContext *C)
 
   wm_job = WM_jobs_get(CTX_wm_manager(C),
                        CTX_wm_window(C),
-                       CTX_wm_area(C),
+                       CTX_data_scene(C),
                        "Prefetching",
                        WM_JOB_PROGRESS,
                        WM_JOB_TYPE_CLIP_PREFETCH);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 5f04d0863a7..af998fda6f9 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -1458,7 +1458,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
 
   wm_job = WM_jobs_get(CTX_wm_manager(C),
                        CTX_wm_window(C),
-                       sa,
+                       scene,
                        "Building Proxies",
                        WM_JOB_PROGRESS,
                        WM_JOB_TYPE_CLIP_BUILD_PROXY);
diff --git a/source/blender/editors/space_clip/tracking_ops_solve.c b/source/blender/editors/space_clip/tracking_ops_solve.c
index 806df4dbaff..96b00ec5463 100644
--- a/source/blender/editors/space_clip/tracking_ops_solve.c
+++ b/source/blender/editors/space_clip/tracking_ops_solve.c
@@ -191,7 +191,6 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
 static int solve_camera_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 {
   SolveCameraJob *scj;
-  ScrArea *sa = CTX_wm_area(C);
   SpaceClip *sc = CTX_wm_space_clip(C);
   MovieClip *clip = ED_space_clip_get_clip(sc);
   MovieTracking *tracking = &clip->tracking;
@@ -199,7 +198,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
   wmJob *wm_job;
   char error_msg[256] = "\0";
 
-  if (WM_jobs_test(CTX_wm_manager(C), sa, WM_JOB_TYPE_ANY)) {
+  if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_CLIP_SOLVE_CAMERA)) {
     /* only one solve is allowed at a time */
     return OPERATOR_CANCELLED;
   }
@@ -224,7 +223,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
   /* Setup job. */
   wm_job = WM_jobs_get(CTX_wm_manager(C),
                        CTX_wm_window(C),
-                       sa,
+                       CTX_data_scene(C),
                        "Solve Camera",
                        WM_JOB_PROGRESS,
                        WM_JOB_TYPE_CLIP_SOLVE_CAMERA);
@@ -246,7 +245,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
 static int solve_camera_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
 {
   /* No running solver, remove handler and pass through. */
-  if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C), WM_JOB_TYPE_ANY)) {
+  if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C), WM_JOB_TYPE_CLIP_SOLVE_CAMERA)) {
     return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
   }
 
diff --git a/source/blender/editors/space_clip/tracking_ops_track.c b/source/blender/editors/space_clip/tracking_ops_track.c
index e9a685f9e21..9536c64c415 100644
--- a/source/blender/editors/space_

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list