diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-01-21 16:29:18 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-01-22 16:33:31 +0300 |
commit | 6248381783d527dd19d915dba393d093be668ff4 (patch) | |
tree | b3008faf0bd7b3ddb9955d6df74bdea0187c403a /source/blender/editors/armature | |
parent | 9617446be24af967d64f9bbb611b1f84eba29b3a (diff) |
Fix: Joining armatures wasn't updating Action Constraints properly
The code here was still trying to access ancient 2.4x "action channels" to rename
them. Now, this renames the relevant FCurves instead.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/armature_relations.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 2a19d7a0bec..38e3588f267 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -29,6 +29,7 @@ * \ingroup edarmature */ +#include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_constraint_types.h" #include "DNA_object_types.h" @@ -99,18 +100,11 @@ static void joined_armature_fix_links_constraints( /* action constraint? (pose constraints only) */ if (con->type == CONSTRAINT_TYPE_ACTION) { - bActionConstraint *data = con->data; // XXX old animation system - bAction *act; - bActionChannel *achan; + bActionConstraint *data = con->data; if (data->act) { - act = data->act; - - for (achan = act->chanbase.first; achan; achan = achan->next) { - if (STREQ(achan->name, pchan->name)) { - BLI_strncpy(achan->name, curbone->name, sizeof(achan->name)); - } - } + BKE_action_fix_paths_rename(&tarArm->id, data->act, "pose.bones[", + pchan->name, curbone->name, 0, 0, false); } } |