Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2012-01-22 08:12:30 +0400
committerJoshua Leung <aligorith@gmail.com>2012-01-22 08:12:30 +0400
commit85f2256bea549113b352f167137fdc7f4f5300e0 (patch)
treebb78bc5e685a63185bcafbcc5a38562a68100d89 /source/blender/editors/armature
parentcfab40b65235a4cf55f74af1da45a9bc4511a3fd (diff)
Bugfix [#29822] Driver's target field doesn't update on Bone rename
This only affected non-object drivers, since the renaming was only getting called on object-animdata.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 5df4d42ad96..e8c9a2cf4da 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -5356,7 +5356,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
}
}
}
-
+
/* See if an object is parented to this armature */
if (ob->parent && (ob->parent->data == arm)) {
if (ob->partype==PARBONE) {
@@ -5385,17 +5385,15 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
}
}
}
-
- /* Fix animation data attached to this object */
- // TODO: should we be using the database wide version instead (since drivers may break)
- if (ob->adt) {
- /* posechannels only... */
- BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.bones", oldname, newname, 0, 0, 1);
- }
}
-
+
+ /* Fix all animdata that may refer to this bone - we can't just do the ones attached to objects, since
+ * other ID-blocks may have drivers referring to this bone [#29822]
+ */
+ BKE_all_animdata_fix_paths_rename("pose.bones", oldname, newname);
+
+ /* correct view locking */
{
- /* correct view locking */
bScreen *screen;
for(screen= G.main->screen.first; screen; screen= screen->id.next) {
ScrArea *sa;