[Bf-blender-cvs] [6248381] master: Fix: Joining armatures wasn't updating Action Constraints properly
Joshua Leung
noreply at git.blender.org
Thu Jan 22 14:35:57 CET 2015
Commit: 6248381783d527dd19d915dba393d093be668ff4
Author: Joshua Leung
Date: Thu Jan 22 02:29:18 2015 +1300
Branches: master
https://developer.blender.org/rB6248381783d527dd19d915dba393d093be668ff4
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.
===================================================================
M 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 2a19d7a..38e3588 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);
}
}
More information about the Bf-blender-cvs
mailing list