diff options
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index b7cc98063ed..0e8450025da 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -204,6 +204,32 @@ AnimData *BKE_copy_animdata (AnimData *adt) return dadt; } +/* Make Local -------------------------------------------- */ + +static void make_local_strips(ListBase *strips) +{ + NlaStrip *strip; + + for(strip=strips->first; strip; strip=strip->next) { + if(strip->act) make_local_action(strip->act); + if(strip->remap && strip->remap->target) make_local_action(strip->remap->target); + + make_local_strips(&strip->strips); + } +} + +void BKE_animdata_make_local(AnimData *adt) +{ + NlaTrack *nlt; + + if(adt->action) make_local_action(adt->action); + if(adt->tmpact) make_local_action(adt->tmpact); + if(adt->remap && adt->remap->target) make_local_action(adt->remap->target); + + for(nlt=adt->nla_tracks.first; nlt; nlt=nlt->next) + make_local_strips(&nlt->strips); +} + /* *********************************** */ /* KeyingSet API */ |