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:
authorJoshua Leung <aligorith@gmail.com>2008-12-21 06:14:01 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-21 06:14:01 +0300
commit12439031c9f67f0acedd25d667b08fb23d79933a (patch)
treef9e48785333833b0efda382120b1b9194adbcf7f /source/blender/editors/animation/anim_markers.c
parent4d2ae9431b5a200278bbf733d6b1b76b86c0f0f5 (diff)
2.5 - Animation Editors - common drawing stuff
* Fixed current frame number drawing in Animation Editors, so that the little frame number indicator box gets shown (animsys2 feature). * Made all Animation Editors draw markers and preview range
Diffstat (limited to 'source/blender/editors/animation/anim_markers.c')
-rw-r--r--source/blender/editors/animation/anim_markers.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index a428bc7559a..f7d13937075 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -95,8 +95,8 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
int icon_id= 0;
xpos = marker->frame;
- /* no time correction for framelen! space is drawn with old values */
+ /* no time correction for framelen! space is drawn with old values */
ypixels= v2d->mask.ymax-v2d->mask.ymin;
UI_view2d_getscale(v2d, &xscale, &yscale);
@@ -105,18 +105,20 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- /* vertical line */
+ /* vertical line - dotted */
if (flag & DRAW_MARKERS_LINES) {
setlinestyle(3);
- if(marker->flag & SELECT)
- glColor4ub(255,255,255, 96);
+
+ if (marker->flag & SELECT)
+ glColor4ub(255, 255, 255, 96);
else
- glColor4ub(0,0,0, 96);
+ glColor4ub(0, 0, 0, 96);
glBegin(GL_LINES);
- glVertex2f((xpos*xscale)+0.5, 12);
- glVertex2f((xpos*xscale)+0.5, 34*yscale); /* a bit lazy but we know it cant be greater then 34 strips high*/
+ glVertex2f((xpos*xscale)+0.5, 12);
+ glVertex2f((xpos*xscale)+0.5, 34*yscale); /* a bit lazy but we know it cant be greater then 34 strips high*/
glEnd();
+
setlinestyle(0);
}
@@ -137,7 +139,7 @@ static void draw_marker(View2D *v2d, TimeMarker *marker, int cfra, int flag)
glDisable(GL_BLEND);
/* and the marker name too, shifted slightly to the top-right */
- if(marker->name && marker->name[0]) {
+ if (marker->name && marker->name[0]) {
if(marker->flag & SELECT) {
UI_ThemeColor(TH_TEXT_HI);
ui_rasterpos_safe(xpos*xscale+4.0, (ypixels<=39.0)?(ypixels-10.0):29.0, 1.0);