[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31651] trunk/blender/source/blender/ editors/armature/editarmature.c: Bugfix #23575: Hook modifier don' t update name of bone acting as the controller when the name of that bone is changed
Joshua Leung
aligorith at gmail.com
Mon Aug 30 03:07:49 CEST 2010
Revision: 31651
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31651
Author: aligorith
Date: 2010-08-30 03:07:45 +0200 (Mon, 30 Aug 2010)
Log Message:
-----------
Bugfix #23575: Hook modifier don't update name of bone acting as the controller when the name of that bone is changed
Modified Paths:
--------------
trunk/blender/source/blender/editors/armature/editarmature.c
Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c 2010-08-30 00:49:23 UTC (rev 31650)
+++ trunk/blender/source/blender/editors/armature/editarmature.c 2010-08-30 01:07:45 UTC (rev 31651)
@@ -5460,6 +5460,8 @@
/* do entire dbase - objects */
for (ob= G.main->object.first; ob; ob= ob->id.next) {
+ ModifierData *md;
+
/* we have the object using the armature */
if (arm==ob->data) {
Object *cob;
@@ -5509,6 +5511,19 @@
}
}
+ /* fix modifiers that might be using this name */
+ for (md= ob->modifiers.first; md; md= md->next) {
+ if (md->type == eModifierType_Hook) {
+ HookModifierData *hmd = (HookModifierData *)md;
+
+ /* uses armature, so may use the affected bone name */
+ if (hmd->object && (hmd->object->data == arm)) {
+ if (!strcmp(hmd->subtarget, oldname))
+ BLI_strncpy(hmd->subtarget, newname, MAXBONENAME);
+ }
+ }
+ }
+
/* Fix animation data attached to this object */
// TODO: should we be using the database wide version instead (since drivers may break)
if (ob->adt) {
More information about the Bf-blender-cvs
mailing list