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:
authorTon Roosendaal <ton@blender.org>2006-11-17 14:56:00 +0300
committerTon Roosendaal <ton@blender.org>2006-11-17 14:56:00 +0300
commit4923b8e7a2b4d5528efdefd4414c28dc55d3bc38 (patch)
tree6eb293b9c4cab1b297525633d287706c77b33236 /source/blender/src/drawaction.c
parent1ad9d9f370557f92e5e0b9a10912b68ecb15504c (diff)
Fixes for Time Marker support in Action window;
- now draws on correct height - selection is clipped correctly (did entire height) - made showing scene markers default Actually this implementation should have been a patch review... it was done with entirely duplicating the code from timeline.c, whilst re-use and generalizing markers has a preference. That way markers can become supported in any time-based editor. Will send an extensive review to Joshua Leung :)
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r--source/blender/src/drawaction.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index b127a895911..ddcee6689f9 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -215,93 +215,6 @@ void draw_cfra_action(void)
glLineWidth(1.0);
}
-/* Aligorith: for now, just draw them as lines (for debugging) */
-static void draw_marker(TimeMarker *marker)
-{
- float xpos, xspace, yspace, xpixels, ypixels;
- float vec[2];
-
-
- xpos = marker->frame;
- /* no time correction for framelen! space is drawn with old values */
-
- xspace= G.v2d->cur.xmax - G.v2d->cur.xmin;
- yspace= G.v2d->cur.ymax - G.v2d->cur.ymin;
- xpixels= G.v2d->mask.xmax-G.v2d->mask.xmin;
- ypixels= G.v2d->mask.ymax-G.v2d->mask.ymin;
-
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
- /* draw line through this point */
- vec[0]= G.scene->r.framelen * xpos;
-
- vec[1]= G.v2d->cur.ymin;
- if (marker->flag & SELECT)
- glColor3ub(0xFF, 0xFF, 0x99);
- else
- glColor3ub(0xAA, 0xAA, 0x55);
- glLineWidth(2.0);
-
- glBegin(GL_LINE_STRIP);
- glVertex2fv(vec);
- vec[1]= G.v2d->cur.ymax;
- glVertex2fv(vec);
- glEnd();
-
- glLineWidth(1.0);
-
-
- /* 5 px to offset icon to align properly, space / pixels corrects for zoom */
- if(marker->flag & SELECT)
- BIF_icon_draw(xpos-(5.0*(xspace/xpixels)), (12.0*yspace/ypixels)-CHANNELHEIGHT, ICON_MARKER_HLT);
- else
- BIF_icon_draw(xpos-(5.0*(xspace/xpixels)), (12.0*yspace/ypixels)-CHANNELHEIGHT, ICON_MARKER);
-
- glBlendFunc(GL_ONE, GL_ZERO);
- glDisable(GL_BLEND);
-
- /* and the marker name too, shifted slightly to the top-right */
- if(marker->name && marker->name[0]) {
- if(marker->flag & SELECT) {
- BIF_ThemeColor(TH_TEXT_HI);
- glRasterPos2f(xpos+(4.0*(xspace/xpixels)),
- ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels);
- }
- else {
- BIF_ThemeColor(TH_TEXT);
- if((marker->frame <= G.scene->r.cfra) && (marker->frame+5 > G.scene->r.cfra))
- glRasterPos2f(xpos+(4.0*(xspace/xpixels)),
- ((ypixels<=39.0)?(ypixels-10.0):29.0)*yspace/ypixels);
- else
- glRasterPos2f(xpos+(4.0*(xspace/xpixels)), 17.0*yspace/ypixels);
- }
- BMF_DrawString(G.font, marker->name);
- }
-}
-
-static void draw_markers_action(SpaceAction *saction)
-{
- ListBase *markers;
- TimeMarker *marker;
-
- /* try to get markers */
- markers = get_saction_markers(saction);
- if (markers == NULL)
- return;
-
- /* unselected markers are drawn at the first time */
- for(marker= markers->first; marker; marker= marker->next) {
- if(!(marker->flag & SELECT)) draw_marker(marker);
- }
-
- /* selected markers are drawn later ... selected markers have to cover unselected
- * markers laying at the same position as selected markers
- * (jiri: it is hack, it could be solved better) */
- for(marker= markers->first; marker; marker= marker->next) {
- if(marker->flag & SELECT) draw_marker(marker);
- }
-}
/* left hand */
static void draw_action_channel_names(bAction *act)