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
path: root/source
diff options
context:
space:
mode:
authorTom Musgrove <LetterRip@gmail.com>2006-10-01 19:55:09 +0400
committerTom Musgrove <LetterRip@gmail.com>2006-10-01 19:55:09 +0400
commit7e469efd43fa38113c09c1eb9f0d7a0301b1b73f (patch)
treebf37d9f9fc421140ce79f01fc140c798621cebc5 /source
parent230b1a85d7dc56bec512dfb90644c05bd936f860 (diff)
==kkey action column select update==
added constraint key column selection to column selection code, patch by Joshua Leung (aligorith)
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/editaction.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index fc7c12a2db5..25aedeae765 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -582,7 +582,7 @@ static void make_sel_cfra_list(Ipo *ipo, ListBase *elems)
/* This function selects all key frames in the same column(s) as a already selected key(s)
* this version only works for Shape Keys, Key should be not NULL
*/
-static void select_frames_by_sel_frameskey(Key *key)
+static void column_select_shapekeys(Key *key)
{
if(key->ipo) {
@@ -618,19 +618,24 @@ static void select_frames_by_sel_frameskey(Key *key)
/* This function selects all key frames in the same column(s) as a already selected key(s)
* this version only works for on Action. *act should be not NULL
*/
-static void select_frames_by_sel_framesaction(bAction *act)
+static void column_select_actionkeys(bAction *act)
{
IpoCurve *icu;
BezTriple *bezt;
ListBase elems= {NULL, NULL};
CfraElem *ce;
bActionChannel *chan;
+ bConstraintChannel *conchan;
/* create a list of all selected keys */
for (chan=act->chanbase.first; chan; chan=chan->next){
if((chan->flag & ACHAN_HIDDEN)==0) {
if (chan->ipo)
make_sel_cfra_list(chan->ipo, &elems);
+ for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) {
+ if (conchan->ipo)
+ make_sel_cfra_list(conchan->ipo, &elems);
+ }
}
}
@@ -656,6 +661,26 @@ static void select_frames_by_sel_framesaction(bAction *act)
}
}
}
+
+ for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) {
+ if (conchan->ipo) {
+ for(ce= elems.first; ce; ce= ce->next) {
+ for (icu = conchan->ipo->curve.first; icu; icu = icu->next){
+ bezt= icu->bezt;
+ if(bezt) {
+ int verts = icu->totvert;
+ while(verts--) {
+
+ if( ((int)ce->cfra) == ((int)bezt->vec[1][0]) ) {
+ bezt->f2 |= 1;
+ }
+ bezt++;
+ }
+ }
+ }
+ }
+ }
+ }
}
}
BLI_freelistN(&elems);
@@ -2467,9 +2492,9 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case KKEY:
if(key)
- select_frames_by_sel_frameskey(key);
+ column_select_shapekeys(key);
else if(act)
- select_frames_by_sel_framesaction(act);
+ column_select_actionkeys(act);
allqueue(REDRAWIPO, 0);
allqueue(REDRAWVIEW3D, 0);