diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-05-20 10:08:48 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-05-20 10:09:27 +0300 |
commit | 6e416b6bdf283f2337b962c05f93781eac00ff18 (patch) | |
tree | 0fca0a272a0dc82f6f80cdf32a4527d8873c68eb /source/blender/editors/armature/armature_add.c | |
parent | 75a31c36702239fc86081e66bcd6f27df0437e4a (diff) |
Fix T48470: Bendy Bones: Custom Handle References not being cleared when bone deleted
In addition to the original bug report, I've gone through cleaning up a range of
related bugs which only became clear when hunting around the code...
* Custom Handle References weren't getting cleared when the bones they used got
deleted. But, neither was the custom bone shape location/transform reference.
* Various places where posebone settings are copied around were also missing code
to handle the new Bendy Bone properties.
(WHY DO WE HAVE SO MANY VARIATIONS OF COPYING POSE DATA!?!?)
* If duplicating a Bendy Bone with custom references, and the custom references
are also selected/duplicated, the new Bendy Bones will use the corresponding
duplicated bones
Diffstat (limited to 'source/blender/editors/armature/armature_add.c')
-rw-r--r-- | source/blender/editors/armature/armature_add.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 847b45d612c..559d93c7eb1 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -348,6 +348,12 @@ void postEditBoneDuplicate(struct ListBase *editbones, Object *ob) if (pchan_src->custom_tx) { pchan_dst->custom_tx = pchan_duplicate_map(ob->pose, name_map, pchan_src->custom_tx); } + if (pchan_src->bbone_prev) { + pchan_dst->bbone_prev = pchan_duplicate_map(ob->pose, name_map, pchan_src->bbone_prev); + } + if (pchan_src->bbone_next) { + pchan_dst->bbone_next = pchan_duplicate_map(ob->pose, name_map, pchan_src->bbone_next); + } } } } |