diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-07-06 13:59:18 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-07-06 13:59:18 +0400 |
commit | 9116a623360fb7e5b24a65f978153a0354f2e5db (patch) | |
tree | 5e4c8191b2f2da849c09112d82045519e4be38dc /source/blender/src/drawaction.c | |
parent | fb622c7c3c50fa09c30774ba13bc8dda1a5d5041 (diff) |
== Action Editor Bugfixes ==
Resolved Issues:
* My drawing cleanup commit the other day broke shapekey keyframe selection - was using wrong filter for Action Editor data
* Removed the old hack to limit vertical scrolling so that shapekeys were visible. It wasn't really needed anymore, and was causing problems with HomeKey.
Unresolved Issues:
* Vertical placement of sliders is slightly off
* In a test file I obtained, shapekey sliders don't work immediately after the file is loaded.
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r-- | source/blender/src/drawaction.c | 53 |
1 files changed, 9 insertions, 44 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 4a85f062f11..57ef51702bd 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -100,7 +100,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) { int i; char str[64]; - float x, y; + float x, y; uiBlock *block; uiBut *but; @@ -116,16 +116,15 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) myortho2(-0.375, curarea->winx-0.375, G.v2d->cur.ymin, G.v2d->cur.ymax); sprintf(str, "actionbuttonswin %d", curarea->win); - block= uiNewBlock (&curarea->uiblocks, str, - UI_EMBOSS, UI_HELV, curarea->win); + block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS, UI_HELV, curarea->win); x = NAMEWIDTH + 1; - y = CHANNELHEIGHT/2; + y = 0.0f; /* make the little 'open the sliders' widget */ - BIF_ThemeColor(TH_FACE); // this slot was open... - glRects(2, y + 2*CHANNELHEIGHT - 2, - ACTWIDTH - 2, y + CHANNELHEIGHT + 2); + // should eventually be removed + BIF_ThemeColor(TH_FACE); // this slot was open... (???... Aligorith) + glRects(2, y + 2*CHANNELHEIGHT - 2, ACTWIDTH - 2, y + CHANNELHEIGHT + 2); glColor3ub(0, 0, 0); glRasterPos2f(4, y + CHANNELHEIGHT + 6); BMF_DrawString(G.font, "Sliders"); @@ -283,7 +282,7 @@ static void action_icu_buts(SpaceAction *saction) UI_EMBOSS, UI_HELV, curarea->win); x = NAMEWIDTH + 1; - y = 0.0; + y = 0.0f; uiBlockSetEmboss(block, UI_EMBOSSN); @@ -592,30 +591,10 @@ static void draw_channel_names(void) /* free tempolary channels */ BLI_freelistN(&act_data); - /* re-adjust view matrices for correct scaling*/ + /* re-adjust view matrices for correct scaling */ myortho2(0, NAMEWIDTH, 0, (ofsy+G.v2d->mask.ymax) - (ofsy+G.v2d->mask.ymin)); // Scaling } -/* this function could soon be depreceated... */ -int count_action_levels(bAction *act) -{ - ListBase act_data = {NULL, NULL}; - int filter, y=0; - - /* check for invalid action */ - if (act == NULL) - return 0; - - /* build list of channels to count */ - filter= (ACTFILTER_VISIBLE|ACTFILTER_CHANNELS); - actdata_filter(&act_data, filter, act, ACTCONT_ACTION); - - /* count and free data */ - y = BLI_countlist(&act_data); - BLI_freelistN(&act_data); - return y; -} - /* sets or clears hidden flags */ void check_action_context(SpaceAction *saction) { @@ -843,10 +822,8 @@ void drawactionspace(ScrArea *sa, void *spacedata) void *data; short datatype; - short ofsx = 0, ofsy = 0; float col[3]; - short maxymin; if (!G.saction) return; @@ -868,19 +845,7 @@ void drawactionspace(ScrArea *sa, void *spacedata) act = data; else if (datatype == ACTCONT_SHAPEKEY) key = data; - - /* Damn I hate hunting to find my rvk's because - * they have scrolled off of the screen ... this - * oughta fix it - */ - if (key) { - if (G.v2d->cur.ymin < -CHANNELHEIGHT) - G.v2d->cur.ymin = -CHANNELHEIGHT; - - maxymin = -(key->totkey*(CHANNELHEIGHT+CHANNELSKIP)); - if (G.v2d->cur.ymin > maxymin) G.v2d->cur.ymin = maxymin; - } - + /* Lets make sure the width of the left hand of the screen * is set to an appropriate value based on whether sliders * are showing of not |