Commit: 13c275ce8477c94d53b3799c28b48011b59db2fb
Author: Antony Riakiotakis
Date:   Thu Feb 26 14:26:42 2015 +0100
Branches: master
https://developer.blender.org/rB13c275ce8477c94d53b3799c28b48011b59db2fb

Fix T42506 sequencer not limiting zoom.

Fix by Campbell thanks!

===================================================================

M       source/blender/blenkernel/BKE_blender.h
M       source/blender/blenloader/intern/versioning_270.c
M       source/blender/editors/space_sequencer/space_sequencer.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_blender.h 
b/source/blender/blenkernel/BKE_blender.h
index 34d34e9..63cc921 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         273
-#define BLENDER_SUBVERSION      8
+#define BLENDER_SUBVERSION      9
 /* 262 was the last editmesh release but it has compatibility code for bmesh 
data */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   5
diff --git a/source/blender/blenloader/intern/versioning_270.c 
b/source/blender/blenloader/intern/versioning_270.c
index f4591e4..089ee15 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -629,4 +629,28 @@ void blo_do_versions_270(FileData *fd, Library 
*UNUSED(lib), Main *main)
                        }
                }
        }
+
+       if (!MAIN_VERSION_ATLEAST(main, 273, 9)) {
+               bScreen *scr;
+               ScrArea *sa;
+               SpaceLink *sl;
+               ARegion *ar;
+
+               /* Make sure sequencer preview area limits zoom */
+               for (scr = main->screen.first; scr; scr = scr->id.next) {
+                       for (sa = scr->areabase.first; sa; sa = sa->next) {
+                               for (sl = sa->spacedata.first; sl; sl = 
sl->next) {
+                                       if (sl->spacetype == SPACE_SEQ) {
+                                               for (ar = sl->regionbase.first; 
ar; ar = ar->next) {
+                                                       if (ar->regiontype == 
RGN_TYPE_PREVIEW) {
+                                                               
ar->v2d.keepzoom |= V2D_LIMITZOOM;
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+
 }
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c 
b/source/blender/editors/space_sequencer/space_sequencer.c
index 7be356d..8934628 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -144,7 +144,7 @@ static SpaceLink *sequencer_new(const bContext *C)
        ar->alignment = RGN_ALIGN_TOP;
        ar->flag |= RGN_FLAG_HIDDEN;
        /* for now, aspect ratio should be maintained, and zoom is clamped 
within sane default limits */
-       ar->v2d.keepzoom = V2D_KEEPASPECT | V2D_KEEPZOOM;
+       ar->v2d.keepzoom = V2D_KEEPASPECT | V2D_KEEPZOOM | V2D_LIMITZOOM;
        ar->v2d.minzoom = 0.00001f;
        ar->v2d.maxzoom = 100000.0f;
        ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to