diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-01-21 16:08:29 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-01-21 16:09:16 +0300 |
commit | 3df93d063e2d52a2c2e73cfe31801c15682bf0b4 (patch) | |
tree | fab2039dd84ce9666d02fb4e1af68eaa645337bc /source/blender/blenkernel/BKE_animsys.h | |
parent | f087e9930d5b8c876206af117ce085dec0ec4578 (diff) |
Fix: Joining armatures loses drivers
Currently, when joining two armatures, the drivers of the armatures being merged
in are lost. This commit introduces a new AnimData API function for merging
animation data into another AnimData block.
NOTE:
* For now, this only copies the drivers over. As a result, manual effort will
still be needed to go through and fix the drivers.
I am working on automating that process, but it's more important that the
drivers don't have to be created from scratch for now (since this is needed
for the Goosberry rigging work).
Diffstat (limited to 'source/blender/blenkernel/BKE_animsys.h')
-rw-r--r-- | source/blender/blenkernel/BKE_animsys.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index a5109acfa56..24abd114a90 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -73,6 +73,20 @@ bool BKE_copy_animdata_id(struct ID *id_to, struct ID *id_from, const bool do_ac /* Copy AnimData Actions */ void BKE_copy_animdata_id_action(struct ID *id); +/* Merge copies of data from source AnimData block */ +typedef enum eAnimData_MergeCopy_Modes { + /* Keep destination action */ + ADT_MERGECOPY_KEEP_DST = 0, + + /* Use src action (make a new copy) */ + ADT_MERGECOPY_SRC_COPY = 1, + + /* Use src action (but just reference the existing version) */ + ADT_MERGECOPY_SRC_REF = 2 +} eAnimData_MergeCopy_Modes; + +void BKE_animdata_merge_copy(struct ID *dst_id, struct ID *src_id, eAnimData_MergeCopy_Modes action_mode, bool fix_drivers); + /* Make Local */ void BKE_animdata_make_local(struct AnimData *adt); |