rendering now stops the composite job first, then renders.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 15 Aug 2012 10:31:52 +0000 (10:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 15 Aug 2012 10:31:52 +0000 (10:31 +0000)
source/blender/editors/interface/interface_templates.c

index 9c35c1919a34dc17fe6e142c4c2a185ff7a2f157..0c69a1888d08a5afe60815faa11e7caf8ce5eca8 100644 (file)
@@ -2571,7 +2571,7 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
                        WM_operator_name_call(C, "SCREEN_OT_animation_play", WM_OP_INVOKE_SCREEN, NULL);
                        break;
                case B_STOPCOMPO:
-                       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_STOPSEQ:
                        WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
@@ -2596,12 +2596,7 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
 
        uiBlockSetHandleFunc(block, do_running_jobs, NULL);
 
-       if (sa->spacetype == SPACE_NODE) {
-               if (WM_jobs_test(wm, sa, WM_JOB_TYPE_ANY))
-                       owner = sa;
-               handle_event = B_STOPCOMPO;
-       }
-       else if (sa->spacetype == SPACE_SEQ) {
+       if (sa->spacetype == SPACE_SEQ) {
                if (WM_jobs_test(wm, sa, WM_JOB_TYPE_ANY))
                        owner = sa;
                handle_event = B_STOPSEQ;
@@ -2614,11 +2609,17 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
        else {
                Scene *scene;
                /* another scene can be rendering too, for example via compositor */
-               for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next)
-                       if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER))
+               for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next) {
+                       if (WM_jobs_test(wm, scene, WM_JOB_TYPE_RENDER)) {
+                               handle_event = B_STOPRENDER;
                                break;
+                       }
+                       else if (WM_jobs_test(wm, scene, WM_JOB_TYPE_COMPOSITE)) {
+                               handle_event = B_STOPCOMPO;
+                               break;
+                       }
+               }
                owner = scene;
-               handle_event = B_STOPRENDER;
        }
 
        if (owner) {