Blender Git Loki

Git Commits -> Revision 46d56bd

Revision 46d56bd by Sybren A. Stüvel (master)
May 4, 2021, 14:23 (GMT)
Animation: correct active track/strip pointers after copying NLA tracks

After copying NLA tracks from one `AnimData` to another, also ensure
that the `AnimData::act_track` and `AnimData::actstrip` pointers are
pointing to the copy rather than the original.

This is a necessary step to allow library overrides on NLA modifiers
without crashing Blender.

The remapping of the pointers is done by looping over the tracks/strips
and comparing pointers. Alternatively, I could update the copy functions
themselves to keep track of those pointers and return them, but IMO that
would produce more spaghetti (they're also used in cases where this
pointer-remapping is not desired).

Commit Details:

Full Hash: 46d56bd9567045965a6a46e2b5205020514bbee1
Parent Commit: 191664a
Lines Changed: +58, -3

3 Modified Paths:

/source/blender/blenkernel/BKE_nla.h (+8, -1) (Diff)
/source/blender/blenkernel/intern/anim_data.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/nla.c (+49, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021