diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-04-29 06:49:49 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-04-29 06:49:49 +0400 |
commit | acce32138266550f1647aff3491066f646c00e88 (patch) | |
tree | 7b9c962cd90e8a02c9c4a17fe5339616edbd6e21 /source/blender/src | |
parent | 3863205d6132d88e669d94e3cff7a3853c146caa (diff) |
== IPO Editor ==
IPO-Keys (K) should now work with scaled IPO curves.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/drawipo.c | 1 | ||||
-rw-r--r-- | source/blender/src/editipo.c | 31 |
2 files changed, 31 insertions, 1 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 336ac281f5d..aef167f2c2a 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -2148,6 +2148,7 @@ void drawipospace(ScrArea *sa, void *spacedata) /* ipokeys */ if(sipo->showkey) { if(sipo->ipokey.first==0) make_ipokey(); + else update_ipokey_val(); draw_ipokey(sipo); } diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index 44079fbd65c..75ff319fb53 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -4117,7 +4117,7 @@ void make_ipokey(void) } } - /* test selectflags */ + /* test selectflags & scaling */ ik= lb->first; while(ik) { sel= desel= 0; @@ -4147,8 +4147,16 @@ void make_ipokey(void) if(sel) ik->flag = 1; else ik->flag= 0; + /* map ipo-keys for drawing/editing if scaled ipo */ + if (OBACT && OBACT->action && G.sipo->pin==0) { + if (G.sipo->actname || G.sipo->constname) { + ik->val= get_action_frame_inv(OBACT, ik->val); + } + } + ik= ik->next; } + get_status_editipo(); } @@ -4156,6 +4164,7 @@ void make_ipokey_transform(Object *ob, ListBase *lb, int sel) { IpoCurve *icu; BezTriple *bezt; + IpoKey *ik; int a, adrcode = 0, ok, dloc=0, drot=0, dsize=0; if(ob->ipo==NULL) return; @@ -4240,6 +4249,19 @@ void make_ipokey_transform(Object *ob, ListBase *lb, int sel) } icu= icu->next; } + + + ik= lb->first; + while(ik) { + /* map ipo-keys for drawing/editing if scaled ipo */ + if (OBACT && OBACT->action && G.sipo->pin==0) { + if (G.sipo->actname || G.sipo->constname) { + ik->val= get_action_frame_inv(OBACT, ik->val); + } + } + + ik= ik->next; + } } void update_ipokey_val(void) /* after moving vertices */ @@ -4252,6 +4274,13 @@ void update_ipokey_val(void) /* after moving vertices */ for(a=0; a<G.sipo->totipo; a++) { if(ik->data[a]) { ik->val= ik->data[a]->vec[1][0]; + + /* map ipo-keys for drawing/editing if scaled ipo */ + if (OBACT && OBACT->action && G.sipo->pin==0) { + if (G.sipo->actname || G.sipo->constname) { + ik->val= get_action_frame_inv(OBACT, ik->val); + } + } break; } } |