Revision: 20881
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20881
Author:   schlaile
Date:     2009-06-14 20:54:35 +0200 (Sun, 14 Jun 2009)

Log Message:
-----------
== Sequencer ==

Big proxy fix (addressing hopefully most complaints on mailing list and 
in tracker)
* proxy render settings are now independent of render size settings.
  That means: which proxy size is used, is controlled by two parameters
  now: the proxy size of the files, can be controlled with additional
  buttons within the proxy panels. What is shown in a specific preview
  window depends on the header settings of the preview panel.
  So: proxies are _only_ used in those windows, that are switched to a
  specific proxy resolution.
* output rendering is always done _without_ proxies.
* proxy generation now shows a waitcursor with numbers.
  (closing Bug: [#18909] Building Proxies doesn't give any feedback
  which was rather a feature request, since the problem mentioned there
  was always the case :) )

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/BKE_blender.h
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/makesdna/DNA_sequence_types.h
    trunk/blender/source/blender/src/buttons_scene.c
    trunk/blender/source/blender/src/drawseq.c
    trunk/blender/source/blender/src/header_seq.c
    trunk/blender/source/blender/src/sequence.c

Modified: trunk/blender/source/blender/blenkernel/BKE_blender.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_blender.h       2009-06-14 
18:16:38 UTC (rev 20880)
+++ trunk/blender/source/blender/blenkernel/BKE_blender.h       2009-06-14 
18:54:35 UTC (rev 20881)
@@ -41,7 +41,7 @@
 struct MemFile;
 
 #define BLENDER_VERSION                        249
-#define BLENDER_SUBVERSION             1
+#define BLENDER_SUBVERSION             2
 
 #define BLENDER_MINVERSION             245
 #define BLENDER_MINSUBVERSION  15

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2009-06-14 
18:16:38 UTC (rev 20880)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2009-06-14 
18:54:35 UTC (rev 20881)
@@ -8156,7 +8156,35 @@
        
        }
        
+       if (main->versionfile < 249 && main->subversionfile < 2) {
+               Scene *sce= main->scene.first;
+               Sequence *seq;
+               Editing *ed;
+               
+               while(sce) {
+                       ed= sce->ed;
+                       if(ed) {
+                               WHILE_SEQ(&ed->seqbase) {
+                                       if (seq->strip && seq->strip->proxy){
+                                               if (G.scene->r.size != 100.0) {
+                                                       seq->strip->proxy->size
+                                                               = sce->r.size;
+                                               } else {
+                                                       seq->strip->proxy->size
+                                                               = 25.0;
+                                               }
+                                               seq->strip->proxy->quality =90;
+                                       }
+                               }
+                               END_SEQ
+                       }
+                       
+                       sce= sce->id.next;
+               }
 
+       }
+
+
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! 
*/
        /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
 

Modified: trunk/blender/source/blender/makesdna/DNA_sequence_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_sequence_types.h  2009-06-14 
18:16:38 UTC (rev 20880)
+++ trunk/blender/source/blender/makesdna/DNA_sequence_types.h  2009-06-14 
18:54:35 UTC (rev 20881)
@@ -80,6 +80,9 @@
        char dir[160];
        char file[80];
        struct anim *anim;
+       short size;
+       short quality;
+       int pad;
 } StripProxy;
 
 typedef struct Strip {

Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c    2009-06-14 18:16:38 UTC 
(rev 20880)
+++ trunk/blender/source/blender/src/buttons_scene.c    2009-06-14 18:54:35 UTC 
(rev 20881)
@@ -1164,6 +1164,8 @@
 {
        Sequence *last_seq = get_last_seq();
        uiBlock *block;
+       int yofs;
+
        block = uiNewBlock(&curarea->uiblocks, "seq_panel_proxy", 
                           UI_EMBOSS, UI_HELV, curarea->win);
 
@@ -1172,83 +1174,118 @@
 
        uiBlockBeginAlign(block);
 
+       yofs = 140;
+
        uiDefButBitI(block, TOG, SEQ_USE_PROXY, 
                     B_SEQ_BUT_RELOAD, "Use Proxy", 
-                    10,140,80,19, &last_seq->flag, 
+                    10,yofs,80,19, &last_seq->flag, 
                     0.0, 21.0, 100, 0, 
                     "Use a preview proxy for this strip");
 
-       if (last_seq->flag & SEQ_USE_PROXY) {
-               if (!last_seq->strip->proxy) {
-                       last_seq->strip->proxy = 
-                               MEM_callocN(sizeof(struct StripProxy),
-                                           "StripProxy");
-               }
+       if (!(last_seq->flag & SEQ_USE_PROXY)) {
+               uiBlockEndAlign(block);
+               return;
+       }
 
-               uiDefButBitI(block, TOG, SEQ_USE_PROXY_CUSTOM_DIR, 
-                            B_SEQ_BUT_RELOAD, "Custom Dir", 
-                            90,140,80,19, &last_seq->flag, 
-                            0.0, 21.0, 100, 0, 
-                            "Use a custom directory to store data");
+       if (!last_seq->strip->proxy) {
+               last_seq->strip->proxy = 
+                       MEM_callocN(sizeof(struct StripProxy),
+                                   "StripProxy");
+       }
 
-               uiDefButBitI(block, TOG, SEQ_USE_PROXY_CUSTOM_FILE, 
-                            B_SEQ_BUT_RELOAD, "Custom File", 
-                            170,140,80,19, &last_seq->flag, 
-                            0.0, 21.0, 100, 0, 
-                            "Use a custom file to load data from");
+       uiDefButBitI(block, TOG, SEQ_USE_PROXY_CUSTOM_DIR, 
+                    B_SEQ_BUT_RELOAD, "Custom Dir", 
+                    90,yofs,80,19, &last_seq->flag, 
+                    0.0, 21.0, 100, 0, 
+                    "Use a custom directory to store data");
 
-               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");
+       uiDefButBitI(block, TOG, SEQ_USE_PROXY_CUSTOM_FILE, 
+                    B_SEQ_BUT_RELOAD, "Custom File", 
+                    170,yofs,80,19, &last_seq->flag, 
+                    0.0, 21.0, 100, 0, 
+                    "Use a custom file to load data from");
+       
+       if (last_seq->flag & SEQ_USE_PROXY_CUSTOM_DIR ||
+           last_seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
+               yofs -= 20;
 
-                       uiDefBut(block, TEX, 
-                                B_SEQ_BUT_RELOAD, "Dir: ", 
-                                30,120,220,20, last_seq->strip->proxy->dir, 
-                                0.0, 
(float)sizeof(last_seq->strip->proxy->dir)-1, 100, 0, "");
-               }
-               if (last_seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
-                       uiDefIconBut(block, BUT, B_SEQ_SEL_PROXY_FILE, 
-                                    ICON_FILESEL, 10, 100, 20, 20, 0, 0, 0, 
-                                    0, 0, 
-                                    "Select the custom proxy file "
-                                    "(used for all preview resolutions!)");
+               uiDefIconBut(block, BUT, B_SEQ_SEL_PROXY_DIR, 
+                            ICON_FILESEL, 10, yofs, 20, 20, 0, 0, 0, 0, 0, 
+                            "Select the directory/name for "
+                            "the proxy storage");
+               
+               uiDefBut(block, TEX, 
+                        B_SEQ_BUT_RELOAD, "Dir: ", 
+                        30,yofs,220,20, last_seq->strip->proxy->dir, 
+                        0.0, (float)sizeof(last_seq->strip->proxy->dir)-1, 
+                        100, 0, "");
+       }
 
-                       uiDefBut(block, TEX, 
-                                B_SEQ_BUT_RELOAD, "File: ", 
-                                30,100,220,20, last_seq->strip->proxy->file, 
-                                0.0, 
(float)sizeof(last_seq->strip->proxy->file)-1, 100, 0, "");
-               }
+       if (last_seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
+               yofs -= 20;
+               uiDefIconBut(block, BUT, B_SEQ_SEL_PROXY_FILE, 
+                            ICON_FILESEL, 10, yofs, 20, 20, 0, 0, 0, 
+                            0, 0, 
+                            "Select the custom proxy file "
+                            "(used for all preview resolutions!)");
+               
+               uiDefBut(block, TEX, 
+                        B_SEQ_BUT_RELOAD, "File: ", 
+                        30, yofs,220,20, last_seq->strip->proxy->file, 
+                        0.0, (float)sizeof(last_seq->strip->proxy->file)-1, 
+                        100, 0, "");
        }
 
-       if (last_seq->flag & SEQ_USE_PROXY) {
-               if (G.scene->r.size == 100) {
-                       uiDefBut(block, LABEL, 0, 
-                                "Full render size selected, ",
-                                10,60,240,19, 0, 0, 0, 0, 0, "");
-                       uiDefBut(block, LABEL, 0, 
-                                "so no proxy enabled!",
-                                10,40,240,19, 0, 0, 0, 0, 0, "");
-               } else if (last_seq->type != SEQ_MOVIE 
-                          && last_seq->type != SEQ_IMAGE
-                          && !(last_seq->flag & SEQ_USE_PROXY_CUSTOM_DIR)) {
-                       uiDefBut(block, LABEL, 0, 
-                                "Cannot proxy this strip without ",
-                                10,60,240,19, 0, 0, 0, 0, 0, "");
-                       uiDefBut(block, LABEL, 0, 
-                                "custom directory selection!",
-                                10,40,240,19, 0, 0, 0, 0, 0, "");
-               } else if (!(last_seq->flag & SEQ_USE_PROXY_CUSTOM_FILE)) {
-                       uiDefBut(block, BUT, B_SEQ_BUT_REBUILD_PROXY, 
-                                "Rebuild proxy",
-                                10,60,240,19, 0, 0, 0, 0, 0, 
-                                "Rebuild proxy for the "
-                                "currently selected strip.");
+       if (!(last_seq->flag & SEQ_USE_PROXY_CUSTOM_FILE)) {
+               if (last_seq->strip->proxy->size == 0) {
+                       if (G.scene->r.size != 100) {
+                               last_seq->strip->proxy->size = G.scene->r.size;
+                       } else {
+                               last_seq->strip->proxy->size = 25;
+                       }
                }
+               if (last_seq->strip->proxy->quality == 0) {
+                       last_seq->strip->proxy->quality = 90;
+               }
+               yofs -= 25;
+
+               uiDefButS(block, NUM,B_DIFF, "Q:",  10,yofs,74,20, 
+                         &last_seq->strip->proxy->quality, 
+                         10.0, 100.0, 0, 0, 
+                         "Quality setting for JPEG images");
+               uiDefButS(block, ROW,B_DIFF,"75%",  90,yofs,53,20,
+                         &last_seq->strip->proxy->size,1.0,75.0, 0, 0, 
+                         "Set proxy size to 3/4 of defined size");
+               uiDefButS(block, ROW,B_DIFF,"50%",  143,yofs,53,20,
+                         &last_seq->strip->proxy->size,1.0,50.0, 0, 0, 
+                         "Set proxy size to 1/2 of defined size");
+               uiDefButS(block, ROW,B_DIFF,"25%",  196,yofs,53,20,
+                         &last_seq->strip->proxy->size,1.0,25.0, 0, 0, 
+                         "Set proxy size to 1/4 of defined size");
        }
 
+       if (last_seq->type != SEQ_MOVIE 
+           && last_seq->type != SEQ_IMAGE
+           && !(last_seq->flag & SEQ_USE_PROXY_CUSTOM_DIR)) {
+               yofs -= 20;
+               uiDefBut(block, LABEL, 0, 
+                        "Cannot proxy this strip without ",
+                        30,yofs,240,19, 0, 0, 0, 0, 0, "");
+               yofs -= 20;
+               uiDefBut(block, LABEL, 0, 
+                        "custom directory selection!",
+                        30,yofs,240,19, 0, 0, 0, 0, 0, "");
+       } else if (!(last_seq->flag & SEQ_USE_PROXY_CUSTOM_FILE)) {
+               yofs -= 45;
+               uiDefBut(block, BUT, B_SEQ_BUT_REBUILD_PROXY, 
+                        "Rebuild proxy",
+                        10,yofs,240,40, 0, 0, 0, 0, 0, 
+                        "Rebuild proxy for the "
+                        "currently selected strip.");
+       }
+
        uiBlockEndAlign(block);
+
 }
 
 

Modified: trunk/blender/source/blender/src/drawseq.c
===================================================================
--- trunk/blender/source/blender/src/drawseq.c  2009-06-14 18:16:38 UTC (rev 
20880)
+++ trunk/blender/source/blender/src/drawseq.c  2009-06-14 18:54:35 UTC (rev 
20881)
@@ -849,7 +849,8 @@
        static int recursive= 0;
        float zoom;
        float zoomx, zoomy;
-       int render_size = 0;
+       float render_size = 0.0;
+       float proxy_size = 100.0;
 
        glClearColor(0.0, 0.0, 0.0, 0.0);
        glClear(GL_COLOR_BUFFER_BIT);
@@ -860,6 +861,8 @@
        render_size = sseq->render_size;
        if (render_size == 0) {
                render_size = G.scene->r.size;
+       } else {
+               proxy_size = render_size;
        }
        if (render_size < 0) {
                return;
@@ -879,16 +882,16 @@
                recursive= 1;
                if (special_seq_update) {
                        ibuf= give_ibuf_seq_direct(
-                               rectx, recty, (G.scene->r.cfra), render_size,
+                               rectx, recty, (G.scene->r.cfra), proxy_size,
                                special_seq_update);
                } else if (!U.prefetchframes || (G.f & G_PLAYANIM) == 0) {
                        ibuf= (ImBuf *)give_ibuf_seq(
                                rectx, recty, (G.scene->r.cfra), 
-                               sseq->chanshown, render_size);
+                               sseq->chanshown, proxy_size);
                } else {
                        ibuf= (ImBuf *)give_ibuf_seq_threaded(
                                rectx, recty, (G.scene->r.cfra), 
-                               sseq->chanshown, render_size);
+                               sseq->chanshown, proxy_size);
                }
                recursive= 0;
                
@@ -939,7 +942,7 @@
        
        zoom= SEQ_ZOOM_FAC(sseq->zoom);
        if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) {
-               zoom /= render_size / 100.0;
+               zoom /= proxy_size / 100.0;
                zoomx = zoom * ((float)G.scene->r.xasp / 
(float)G.scene->r.yasp);
                zoomy = zoom;
        } else {
@@ -1122,8 +1125,11 @@
        SpaceSeq *sseq= sa->spacedata.first;
        int rectx, recty;
        int render_size = sseq->render_size;
+       int proxy_size = 100.0; 
        if (render_size == 0) {
                render_size = G.scene->r.size;
+       } else {
+               proxy_size = render_size;
        }
        if (render_size < 0) {
                return;
@@ -1135,7 +1141,7 @@
        if(sseq->mainb) {
                give_ibuf_prefetch_request(
                        rectx, recty, (G.scene->r.cfra), sseq->chanshown,

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to