Fix #33330: Proxies are not built in Sequencer if preview is visible
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 28 Nov 2012 09:36:23 +0000 (09:36 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 28 Nov 2012 09:36:23 +0000 (09:36 +0000)
Was own regression when was solving conflict between sequencer preview
and compositor jobs. Made it so now only compositor jobs are being
killed from sequencer preview.

source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_jobs.c

index 5fefafaa54a8826625e4f590b4830ead9bacfe3b..1a84efa0b5078abe37a15f3c32afa38c8ddf0ae9 100644 (file)
@@ -926,7 +926,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
                /* stop all running jobs, except screen one. currently previews frustrate Render
                 * needed to make so sequencer's rendering doesn't conflict with compositor
                 */
-               WM_jobs_kill_all_except(CTX_wm_manager(C), CTX_wm_screen(C));
+               WM_jobs_kill_type(CTX_wm_manager(C), WM_JOB_TYPE_COMPOSITE);
        }
 
        render_size = sseq->render_size;
index e35e3edfa33e43a531ed8bfe628b561c694064bc..1037542759fa344e0585aaff2d9b9355ce5649be 100644 (file)
@@ -360,8 +360,9 @@ void                WM_jobs_start(struct wmWindowManager *wm, struct wmJob *);
 void           WM_jobs_stop(struct wmWindowManager *wm, void *owner, void *startjob);
 void           WM_jobs_kill(struct wmWindowManager *wm, void *owner, void (*)(void *, short int *, short int *, float *));
 void           WM_jobs_kill_all(struct wmWindowManager *wm);
-       void            WM_jobs_kill_all_except(struct wmWindowManager *wm, void *owner);
-       
+void           WM_jobs_kill_all_except(struct wmWindowManager *wm, void *owner);
+void           WM_jobs_kill_type(struct wmWindowManager *wm, int job_type);
+
 int                    WM_jobs_has_running(struct wmWindowManager *wm);
 
                        /* clipboard */
index 7481c01d72b0644190e6db0135e0ea6f7d0bea07..3c3e2c0feaad7b530b7d76f163ebaef3813ac6b8 100644 (file)
@@ -416,6 +416,18 @@ void WM_jobs_kill_all_except(wmWindowManager *wm, void *owner)
 }
 
 
+void WM_jobs_kill_type(struct wmWindowManager *wm, int job_type)
+{
+       wmJob *wm_job, *next_job;
+       
+       for (wm_job = wm->jobs.first; wm_job; wm_job = next_job) {
+               next_job = wm_job->next;
+
+               if (wm_job->job_type == job_type)
+                       wm_jobs_kill_job(wm, wm_job);
+       }
+}
+
 /* signal job(s) from this owner or callback to stop, timer is required to get handled */
 void WM_jobs_stop(wmWindowManager *wm, void *owner, void *startjob)
 {