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>2007-06-05 16:11:00 +0400
committerJoshua Leung <aligorith@gmail.com>2007-06-05 16:11:00 +0400
commit25935dbdb10dc905b5963951c339447aa181654b (patch)
tree4a2ea7d4946549da23d93fdc238abfd135d5d614 /source/blender/src/drawaction.c
parent6b9fe36e0b86bb6acce5b49d4037cc235eb13121 (diff)
== Action Editor - Major Recode ==
I've just spent two days rewriting the Action Editor to unify its code and bring it under control again (it was 107kb, now it is around 73 kb). * This means that there are no longer separate functions for each tool for Actions and Shapekeys in the Action Editor, and also no more missing tools for either. * Also, I've gotten rid of the need for those complicated, hierarchial loops used for action channels, as they were a pain to keep consistent with each other. * Baking functions have been removed. See user-level-changes for more details. * Reorganised and completely rewrote code in editaction.c, thus the lengthy diff. User Level Changes: * For the meantime, border-selecting Action Channels has been disabled * Baking functions have been removed. As far as I have been able to find out, these were really non-functional anyway. Besides, I don't think they really belonged in editaction.c * Editing Shapekey keyframes now yields the same feature set as for those in Action Channels. * There shouldn't be any major bugs left, but I might have missed something. Further Work: * Do a cleanup like this to the Action Editor drawing code in drawaction.c * Baking??? (harkyman seems to be doing something about this)
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r--source/blender/src/drawaction.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index fd6f5f8f0b4..6576dac1d2c 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -110,14 +110,14 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
* correctly *grumble*
*/
mywinset(curarea->win);
- myortho2(-0.375, curarea->winx-0.375, -0.375, curarea->winy-0.375);
+ 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);
x = NAMEWIDTH + 1;
- y = key->totkey*(CHANNELHEIGHT+CHANNELSKIP) + CHANNELHEIGHT/2 - G.v2d->cur.ymin;
+ y = CHANNELHEIGHT/2;
/* make the little 'open the sliders' widget */
BIF_ThemeColor(TH_FACE); // this slot was open...
@@ -534,7 +534,7 @@ static void draw_action_mesh_names(Key *key)
KeyBlock *kb;
x = 0.0;
- y= key->totkey*(CHANNELHEIGHT+CHANNELSKIP);
+ y= 0.0;
kb= key->block.first;
@@ -846,7 +846,7 @@ static void draw_mesh_strips(SpaceAction *saction, Key *key)
scr_rct.ymax= saction->area->winrct.ymin + saction->v2d.mask.ymax;
di= glaBegin2DDraw(&scr_rct, &G.v2d->cur);
- ybase = key->totkey*(CHANNELHEIGHT+CHANNELSKIP);
+ ybase = 0;
for (icu = key->ipo->curve.first; icu ; icu = icu->next) {
int frame1_x, channel_y;
@@ -959,7 +959,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
if (G.v2d->cur.ymin < -CHANNELHEIGHT)
G.v2d->cur.ymin = -CHANNELHEIGHT;
- maxymin = key->totkey*(CHANNELHEIGHT+CHANNELSKIP);
+ maxymin = -(key->totkey*(CHANNELHEIGHT+CHANNELSKIP));
if (G.v2d->cur.ymin > maxymin) G.v2d->cur.ymin = maxymin;
}