Merging r48284 through r48288 from trunk into soc-2011-tomato

This commit is contained in:
Sergey Sharybin
2012-06-25 19:52:07 +00:00
3 changed files with 15 additions and 3 deletions

View 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) {

View 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);

View 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) {