== Sequencer ==
authorPeter Schlaile <peter@schlaile.de>
Sun, 4 May 2008 17:03:10 +0000 (17:03 +0000)
committerPeter Schlaile <peter@schlaile.de>
Sun, 4 May 2008 17:03:10 +0000 (17:03 +0000)
Added the missing directory selector button for proxy custom storage...

source/blender/include/butspace.h
source/blender/src/buttons_scene.c

index 8556d47e4abc6eb56b3c3ff0690a91cb999e7d24..242965a820c49ceee5ec74efcfed44e74b115122 100644 (file)
@@ -367,7 +367,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la
 #define B_SEQ_BUT_TRANSFORM     1695
 #define B_SEQ_BUT_RELOAD_FILE   1696
 #define B_SEQ_BUT_REBUILD_PROXY 1697
-
+#define B_SEQ_SEL_PROXY_DIR     1698
 /* *********************** */
 #define B_ARMATUREBUTS         1800
 #define        B_POSE                  1701
index 5fd23af591e6b09c6d5c52db16d093aa2542eade..b295cdd84810b3a6ed41da7c452ed14441072197 100644 (file)
@@ -1175,9 +1175,14 @@ static void seq_panel_proxy()
        }
 
        if (last_seq->flag & SEQ_USE_PROXY_CUSTOM_DIR) {
+               uiDefIconBut(block, BUT, B_SEQ_SEL_PROXY_DIR, 
+                            ICON_FILESEL, 10, 120, 20, 20, 0, 0, 0, 0, 0, 
+                            "Select the directory/name for "
+                            "the proxy storage");
+
                uiDefBut(block, TEX, 
                         B_SEQ_BUT_RELOAD, "Dir: ", 
-                        10,120,240,19, last_seq->strip->proxy->dir, 
+                        30,120,220,20, last_seq->strip->proxy->dir, 
                         0.0, 160.0, 100, 0, "");
        }
 
@@ -1264,10 +1269,20 @@ void sequencer_panels()
        }
 }
 
+static void sel_proxy_dir(char *name)
+{
+       Sequence *last_seq = get_last_seq();
+       strcpy(last_seq->strip->proxy->dir, name);
+
+       allqueue(REDRAWBUTSSCENE, 0);
+
+       BIF_undo_push("Change proxy directory");
+}
 
 void do_sequencer_panels(unsigned short event)
 {
        Sequence *last_seq = get_last_seq();
+       ScrArea * sa;
 
        switch(event) {
        case B_SEQ_BUT_PLUGIN:
@@ -1280,6 +1295,13 @@ void do_sequencer_panels(unsigned short event)
        case B_SEQ_BUT_REBUILD_PROXY:
                seq_proxy_rebuild(last_seq);
                break;
+       case B_SEQ_SEL_PROXY_DIR:
+               sa= closest_bigger_area();
+               areawinset(sa->win);
+               activate_fileselect(FILE_SPECIAL, "SELECT PROXY DIR", 
+                                   last_seq->strip->proxy->dir, 
+                                   sel_proxy_dir);
+               break;
        case B_SEQ_BUT_RELOAD:
        case B_SEQ_BUT_RELOAD_ALL:
                update_seq_ipo_rect(last_seq);