diff options
author | Ton Roosendaal <ton@blender.org> | 2005-10-28 12:11:15 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-10-28 12:11:15 +0400 |
commit | 595447a85ea2e388fa17b4a44dacf256ac97f343 (patch) | |
tree | 3461e1157f41cbe304f8e346cd2ac5c8333c395d /source/blender/src/drawaction.c | |
parent | 0dde486eeae6c563059bfab408f1ed5bd239ad85 (diff) |
Here's another milestone: Shape Keys now can be inserted in Actions and NLA
It works like for moving Object Ipos to the Action, press the Action icon
in the header of the IpoWindow, to the left of the mode selection menu.
It then creates an Action (if not existed) and moves the Shape Ipo to the
Action, using custom channel "Shape".
Main code change was that evaluating Ipo Curves for Relative Shapes had to
be recoded, but that's pretty minor and even much cleaner. (added "curval"
in the KeyBlock struct).
That this feature can work is thanks to the full modifier/derivedmesh
recode Daniel did, can't give him enough credits! :)
Also; small fixes in Outliner, for clicking on the Ipo icon (sets the Ipo
window to show that Ipo).
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r-- | source/blender/src/drawaction.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index c1a4782b1fa..c6955955c09 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -88,28 +88,18 @@ /* local functions ----------------------------------------------------- */ -void drawactionspace(ScrArea *sa, void *spacedata); -static void draw_channel_names(void); -static void draw_channel_strips(SpaceAction *saction); int count_action_levels(bAction *act); static BezTriple **ipo_to_keylist(Ipo *ipo, int flags, int *totvert); static BezTriple **action_to_keylist(bAction *act, int flags, int *totvert); static BezTriple **ob_to_keylist(Object *ob, int flags, int *totvert); static BezTriple **icu_to_keylist(IpoCurve *icu, int flags, int *totvert); -static void draw_keylist(gla2DDrawInfo *di, int totvert, BezTriple **blist, float ypos); void draw_icu_channel(gla2DDrawInfo *di, IpoCurve *icu, int flags, float ypos); -static void draw_action_mesh_names(Key *key); - -/* missing local prototypes -------------------------------------------- */ -void meshactionbuts(SpaceAction *saction, Key *key); -void do_actionbuts(unsigned short event); /* implementation ------------------------------------------------------ */ - extern short showsliders; /* editaction .c */ extern short ACTWIDTH; -void meshactionbuts(SpaceAction *saction, Key *key) +static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) { int i; char str[64]; @@ -176,7 +166,7 @@ void meshactionbuts(SpaceAction *saction, Key *key) glRects(NAMEWIDTH, 0, NAMEWIDTH+SLIDERWIDTH, curarea->winy); uiBlockSetEmboss(block, UI_EMBOSS); for (i=1 ; i < key->totkey ; ++ i) { - make_rvk_slider(block, key, i, + make_rvk_slider(block, ob, i, x, y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys"); y-=CHANNELHEIGHT+CHANNELSKIP; @@ -670,7 +660,7 @@ void drawactionspace(ScrArea *sa, void *spacedata) /* if there is a mesh with rvk's selected, * then draw the key frames in the action window */ - meshactionbuts(G.saction, key); + meshactionbuts(G.saction, OBACT, key); } } } |