NLA SoC: Merge from 2.5
[blender.git] / source / blender / editors / interface / view2d.c
index 4621be6eda095da703f3ba12943ca3ec1b9508bc..aa1cc5790efbb2188d622c31b25167c0c7580c82 100644 (file)
@@ -207,6 +207,23 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                        }
                                break;
                                
+                       /* 'stack view' - practically the same as list/channel view, except is located in the pos y half instead. 
+                        *      zoom, aspect ratio, and alignment restrictions are set here */
+                       case V2D_COMMONVIEW_STACK:
+                       {
+                               /* zoom + aspect ratio are locked */
+                               v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);
+                               v2d->minzoom= v2d->maxzoom= 1.0f;
+                               
+                               /* tot rect has strictly regulated placement, and must only occur in +/+ quadrant */
+                               v2d->align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
+                               v2d->keeptot = V2D_KEEPTOT_STRICT;
+                               tot_changed= 1;
+                               
+                               /* scroller settings are currently not set here... that is left for regions... */
+                       }
+                               break;
+                               
                        /* 'header' regions - zoom, aspect ratio, alignment, and panning restrictions are set here */
                        case V2D_COMMONVIEW_HEADER:
                        {
@@ -245,14 +262,14 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
                                
                                v2d->tot.xmin= 0.0f;
                                v2d->tot.xmax= winx;
-
+                               
                                v2d->tot.ymax= 0.0f;
                                v2d->tot.ymin= -winy;
-
+                               
                                v2d->cur= v2d->tot;
                        }
                                break;
-
+                               
                                /* other view types are completely defined using their own settings already */
                        default:
                                /* we don't do anything here, as settings should be fine, but just make sure that rect */