From 6248381783d527dd19d915dba393d093be668ff4 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 22 Jan 2015 02:29:18 +1300 Subject: 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. --- source/blender/editors/armature/armature_relations.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/armature/armature_relations.c') 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); } } -- cgit v1.2.3