[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43594] trunk/blender/source/blender/ editors/armature/editarmature.c: Bugfix [#29822] Driver' s target field doesn't update on Bone rename

Joshua Leung aligorith at gmail.com
Sun Jan 22 05:12:39 CET 2012


Revision: 43594
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43594
Author:   aligorith
Date:     2012-01-22 04:12:30 +0000 (Sun, 22 Jan 2012)
Log Message:
-----------
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.

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	2012-01-22 03:42:49 UTC (rev 43593)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2012-01-22 04:12:30 UTC (rev 43594)
@@ -5356,7 +5356,7 @@
 					}
 				}
 			}
-					
+			
 			/* See if an object is parented to this armature */
 			if (ob->parent && (ob->parent->data == arm)) {
 				if (ob->partype==PARBONE) {
@@ -5385,17 +5385,15 @@
 					}
 				}
 			}
-			
-			/* 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;




More information about the Bf-blender-cvs mailing list