Merging r48284 through r48288 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 25 Jun 2012 19:52:07 +0000 (19:52 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 25 Jun 2012 19:52:07 +0000 (19:52 +0000)
source/blender/editors/interface/interface_draw.c
source/blender/editors/space_clip/clip_editor.c
source/blender/editors/transform/transform_conversions.c

index c14e27562b4d59bce6bff103d6b2d1aa15506173..f173e7ce6301b987e754802fe0f7b522faf8196a 100644 (file)
@@ -1376,9 +1376,11 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
                ui_draw_gradient(&grid, col, UI_GRAD_H, 1.0f);
 
                /* grid, hsv uses different grid */
-               gl_shaded_color((unsigned char *)wcol->inner, -16);
-               /* TODO, grid lines does not line up with colors, need to look into this */
+               glEnable(GL_BLEND);
+               glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+               glColor4ub(0, 0, 0, 48);
                ui_draw_but_curve_grid(rect, zoomx, zoomy, offsx, offsy, 0.1666666f);
+               glDisable(GL_BLEND);
        }
        else {
                if (cumap->flag & CUMA_DO_CLIP) {
index b57b16707d42b7c76e061239e1341b7a0de64990..224a250fe4c9db925af5d2df35912154d7ba786a 100644 (file)
@@ -177,6 +177,13 @@ void ED_space_clip_get_aspect_dimension_aware(SpaceClip *sc, float *aspx, float
         * mainly this is sued for transformation stuff
         */
 
+       if (!sc->clip) {
+               *aspx = 1.0f;
+               *aspy = 1.0f;
+
+               return;
+       }
+
        ED_space_clip_get_aspect(sc, aspx, aspy);
        BKE_movieclip_get_size(sc->clip, &sc->user, &w, &h);
 
index e924ce15286658a87a0cfcef86df84776e962179..dcc876b60265843dc307dba1f446da24de9a8abe 100644 (file)
@@ -5913,9 +5913,12 @@ static void createTransTrackingData(bContext *C, TransInfo *t)
 
        t->total = 0;
 
+       if (!clip)
+               return;
+
        BKE_movieclip_get_size(clip, &sc->user, &width, &height);
 
-       if (!clip || width == 0 || height == 0)
+       if (width == 0 || height == 0)
                return;
 
        if (ar->regiontype == RGN_TYPE_PREVIEW) {