From df8cb37e1eeac4b846459378859f7eb8ff369e06 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 5 May 2007 05:10:35 +0000 Subject: AutoKey Avail was also not working correctly for Object with ObActions. --- source/blender/src/transform_conversions.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index c76f545ee8f..487592160ac 100755 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -2323,9 +2323,22 @@ void special_aftertrans_update(TransInfo *t) actname= "Object"; if(U.uiflag & USER_KEYINSERTAVAI) { - if(base->object->ipo) { + if(base->object->ipo || base->object->action) { ID* id= (ID *)(base->object); - icu= base->object->ipo->curve.first; + + if (base->object->ipo) { + icu= base->object->ipo->curve.first; + } + else { + bActionChannel *achan; + achan= get_action_channel(base->object->action, actname); + + if (achan && achan->ipo) + icu= achan->ipo->curve.first; + else + icu= NULL; + } + while(icu) { icu->flag &= ~IPO_SELECT; if (U.uiflag & USER_KEYINSERTNEED) -- cgit v1.2.3