Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Hamalainen <blender@miikah.org>2011-09-05 21:06:09 +0400
committerMiika Hamalainen <blender@miikah.org>2011-09-05 21:06:09 +0400
commit42faf7ae41d807c2f9a94f40b774038af0c065ec (patch)
tree8460e4d70cf287da04b656748297521d0d3ef381 /source/blender/editors/space_time
parent79ef35889f850aa7173800bcf67918c14f3b1291 (diff)
parent59dbd53e72ae25edf247e49ea1e291af277fecc4 (diff)
Merge with trunk r39928
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r--source/blender/editors/space_time/space_time.c43
-rw-r--r--source/blender/editors/space_time/time_intern.h2
-rw-r--r--source/blender/editors/space_time/time_ops.c2
3 files changed, 23 insertions, 24 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 9c01780d65b..b3baccde5c9 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -71,16 +69,20 @@
static void time_draw_sfra_efra(Scene *scene, View2D *v2d)
{
/* draw darkened area outside of active timeline
- * frame range used is preview range or scene range */
- UI_ThemeColorShade(TH_BACK, -25);
-
- if (PSFRA < PEFRA) {
- glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
- glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- }
- else {
- glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
- }
+ * frame range used is preview range or scene range
+ */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
+ glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
+
+ if (PSFRA < PEFRA) {
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
+ glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
+ else {
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
+ glDisable(GL_BLEND);
UI_ThemeColorShade(TH_BACK, -60);
/* thin lines where the actual frames are */
@@ -283,7 +285,6 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
BLI_dlrbTree_init(&keys);
/* init dopesheet settings */
- // FIXME: the ob_to_keylist function currently doesn't take this into account...
if (onlysel)
ads.filterflag |= ADS_FILTER_ONLYSEL;
@@ -310,8 +311,8 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel)
(ak) && (ak->cfra <= v2d->cur.xmax);
ak=ak->next )
{
- glVertex2f(ak->cfra, v2d->cur.ymin);
- glVertex2f(ak->cfra, v2d->cur.ymax);
+ glVertex2f(ak->cfra, v2d->tot.ymin);
+ glVertex2f(ak->cfra, v2d->tot.ymax);
}
glEnd(); // GL_LINES
@@ -464,9 +465,6 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
glClear(GL_COLOR_BUFFER_BIT);
UI_view2d_view_ortho(v2d);
-
- /* start and end frame */
- time_draw_sfra_efra(scene, v2d);
/* grid */
unit= (stime->flag & TIME_DRAWFRAMES)? V2D_UNIT_FRAMES: V2D_UNIT_SECONDS;
@@ -474,14 +472,19 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_grid_draw(v2d, grid, (V2D_VERTICAL_LINES|V2D_VERTICAL_AXIS));
UI_view2d_grid_free(grid);
+ /* start and end frame */
+ time_draw_sfra_efra(scene, v2d);
+
/* current frame */
+ flag = DRAWCFRA_WIDE; /* this is only really needed on frames where there's a keyframe, but this will do... */
if ((stime->flag & TIME_DRAWFRAMES)==0) flag |= DRAWCFRA_UNIT_SECONDS;
if (stime->flag & TIME_CFRA_NUM) flag |= DRAWCFRA_SHOW_NUMBOX;
ANIM_draw_cfra(C, v2d, flag);
+ UI_view2d_view_ortho(v2d);
+
/* keyframes */
- if(!G.rendering) /* ANIM_nla_mapping_apply_fcurve() modifies curve data while rendering, possible race condition */
- time_draw_keyframes(C, stime, ar);
+ time_draw_keyframes(C, stime, ar);
/* markers */
UI_view2d_view_orthoSpecial(ar, v2d, 1);
diff --git a/source/blender/editors/space_time/time_intern.h b/source/blender/editors/space_time/time_intern.h
index 03ba617de14..094b0bc9e86 100644
--- a/source/blender/editors/space_time/time_intern.h
+++ b/source/blender/editors/space_time/time_intern.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index e9559426b81..78d903a2997 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or