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-08-15 14:04:45 +0400
committerJoshua Leung <aligorith@gmail.com>2007-08-15 14:04:45 +0400
commit0cc2de1b3777cee64e334c5b624aeb5742bc649e (patch)
tree54a822484cd2d3b734dbc363f6a87009eae4ec52 /source/blender/src/drawaction.c
parent0b562ae3407127cf68f3079d29228b86064beec6 (diff)
== Action Editor Bugfixes (BugReport #7049) ==
This commit fixes several issues related to using the Action Editor with Shapekeys. I've known about most of them for a while, so now's the time to fix that. 1) When the shapekey anim data for an object comes from an Action (key's IPO block is linked to the "Shape" action-channel), the names of the individual shapekeys is now shown. They will only do so if the Action Editor is not pinned though. 2) Slider limits for the case described above should now be sane again 3) "Add New" option from the popup menu in the Action Editor header will now convert shapekey animation data from IPO to Action if the action editor is displaying Shapekey data at the time. Many users have often found the old way of having to toggle the "running man" in the IPO-editor header, too clumsy and confusing.
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r--source/blender/src/drawaction.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index ea1b0dbaffe..8d525b88472 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -228,8 +228,8 @@ static void make_icu_slider(uiBlock *block, IpoCurve *icu,
if (IS_EQ(icu->slide_max, icu->slide_min)) {
if (IS_EQ(icu->ymax, icu->ymin)) {
- if (icu->blocktype == ID_CO) {
- /* hack for constraints (and maybe a few others) */
+ if (ELEM(icu->blocktype, ID_CO, ID_KE)) {
+ /* hack for constraints and shapekeys (and maybe a few others) */
icu->slide_min= 0.0;
icu->slide_max= 1.0;
}
@@ -491,7 +491,10 @@ static void draw_channel_names(void)
mute = ICON_MUTE_IPO_OFF;
sel = SEL_ICU(icu);
- sprintf(name, getname_ipocurve(icu));
+ if (G.saction->pin)
+ sprintf(name, getname_ipocurve(icu, NULL));
+ else
+ sprintf(name, getname_ipocurve(icu, OBACT));
}
break;
case ACTTYPE_SHAPEKEY: /* shapekey channel */
@@ -827,18 +830,20 @@ void drawactionspace(ScrArea *sa, void *spacedata)
short ofsx = 0, ofsy = 0;
float col[3];
- if (!G.saction)
+ /* this is unlikely to occur, but it may */
+ if (G.saction == NULL)
return;
/* warning: blocks need to be freed each time, handlers dont remove */
uiFreeBlocksWin(&sa->uiblocks, sa->win);
- if (!G.saction->pin) {
+ /* only try to refresh action that's displayed if not pinned */
+ if (G.saction->pin==0) {
/* TODO: allow more than one active action sometime? */
if (OBACT)
G.saction->action = OBACT->action;
else
- G.saction->action=NULL;
+ G.saction->action= NULL;
}
/* get data */