Merging r38733 through r38779 from trunk into soc-2011-tomato
[blender-staging.git] / source / blender / editors / interface / interface_templates.c
index 34315494e14314274fda2e35413b1d2c2d05f599..b6e6bc1dfc2299a286c4d7b53d68099d03c03155 100644 (file)
@@ -2358,6 +2358,7 @@ void uiTemplateOperatorSearch(uiLayout *layout)
 #define B_STOPCAST             2
 #define B_STOPANIM             3
 #define B_STOPCOMPO            4
+#define B_STOPCLIP             5
 
 static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
 {
@@ -2374,6 +2375,9 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event)
                case B_STOPCOMPO:
                        WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
                        break;
+               case B_STOPCLIP:
+                       WM_jobs_stop(CTX_wm_manager(C), CTX_wm_area(C), NULL);
+                       break;
        }
 }
 
@@ -2396,6 +2400,11 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
                   owner = sa;
                handle_event= B_STOPCOMPO;
        } 
+       if(sa->spacetype==SPACE_CLIP) {
+               if(WM_jobs_test(wm, sa))
+                  owner = sa;
+               handle_event= B_STOPCLIP;
+       }
        else {
                Scene *scene;
                /* another scene can be rendering too, for example via compositor */