[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11183] trunk/blender/source/blender: == Action Editor Bugfixes ==
Joshua Leung
aligorith at gmail.com
Fri Jul 6 11:59:18 CEST 2007
Revision: 11183
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11183
Author: aligorith
Date: 2007-07-06 11:59:18 +0200 (Fri, 06 Jul 2007)
Log Message:
-----------
== 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.
Modified Paths:
--------------
trunk/blender/source/blender/include/BDR_drawaction.h
trunk/blender/source/blender/src/drawaction.c
trunk/blender/source/blender/src/editaction.c
trunk/blender/source/blender/src/header_action.c
Modified: trunk/blender/source/blender/include/BDR_drawaction.h
===================================================================
--- trunk/blender/source/blender/include/BDR_drawaction.h 2007-07-06 04:45:57 UTC (rev 11182)
+++ trunk/blender/source/blender/include/BDR_drawaction.h 2007-07-06 09:59:18 UTC (rev 11183)
@@ -71,7 +71,6 @@
/* Action Generics */
void draw_cfra_action(void);
-int count_action_levels (struct bAction *act);
/* Channel Drawing */
void draw_icu_channel(struct gla2DDrawInfo *di, struct IpoCurve *icu, float ypos);
Modified: trunk/blender/source/blender/src/drawaction.c
===================================================================
--- trunk/blender/source/blender/src/drawaction.c 2007-07-06 04:45:57 UTC (rev 11182)
+++ trunk/blender/source/blender/src/drawaction.c 2007-07-06 09:59:18 UTC (rev 11183)
@@ -116,16 +116,15 @@
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;
/* 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");
@@ -592,30 +591,10 @@
/* 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 *data;
short datatype;
-
short ofsx = 0, ofsy = 0;
float col[3];
- short maxymin;
if (!G.saction)
return;
@@ -868,19 +845,7 @@
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
Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c 2007-07-06 04:45:57 UTC (rev 11182)
+++ trunk/blender/source/blender/src/editaction.c 2007-07-06 09:59:18 UTC (rev 11183)
@@ -637,7 +637,7 @@
}
/* filter data */
- filter= (ACTFILTER_VISIBLE | ACTFILTER_CHANNELS);
+ filter= (ACTFILTER_FORDRAWING | ACTFILTER_VISIBLE | ACTFILTER_CHANNELS);
actdata_filter(&act_data, filter, data, datatype);
for (ale= act_data.first; ale; ale= ale->next) {
Modified: trunk/blender/source/blender/src/header_action.c
===================================================================
--- trunk/blender/source/blender/src/header_action.c 2007-07-06 04:45:57 UTC (rev 11182)
+++ trunk/blender/source/blender/src/header_action.c 2007-07-06 09:59:18 UTC (rev 11183)
@@ -171,17 +171,15 @@
G.v2d->cur.xmax= -5;
G.v2d->cur.xmax= 100;
}
-
- G.v2d->cur.ymin= -(count_action_levels(G.saction->action)*(CHANNELHEIGHT+CHANNELSKIP));
- G.v2d->cur.ymax= 0;
}
else { /* shapekeys and/or no action */
- G.v2d->cur.xmax= -5;
- G.v2d->cur.xmax= 100;
- G.v2d->cur.ymax= 1000;
- G.v2d->cur.ymin= 0;
+ G.v2d->cur.xmin= -5.0;
+ G.v2d->cur.xmax= 65.0;
}
+ G.v2d->cur.ymin= -75.0;
+ G.v2d->cur.ymax= 5.0;
+
G.v2d->tot= G.v2d->cur;
test_view2d(G.v2d, curarea->winx, curarea->winy);
view2d_do_locks(curarea, V2D_LOCK_COPY);
More information about the Bf-blender-cvs
mailing list