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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-20 09:39:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-20 09:39:56 +0400
commit2338765726a5aa6b8870d573d685218720864583 (patch)
tree00f8a2b021805b41804c5e0b55a7af8af846b6e2 /source/blender/editors
parent170716ca533b250ffa9ae031096bbef9ad7c2976 (diff)
renaming bones didnt update update the view3d lock bone name.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/armature/editarmature.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 06b2c06d4d2..a2301540f1b 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -5530,6 +5530,26 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.bones", oldname, newname, 0, 0, 1);
}
}
+
+ {
+ /* correct view locking */
+ bScreen *screen;
+ for(screen= G.main->screen.first; screen; screen= screen->id.next) {
+ ScrArea *sa;
+ /* add regions */
+ for(sa= screen->areabase.first; sa; sa= sa->next) {
+ SpaceLink *sl= sa->spacedata.first;
+ if(sl->spacetype == SPACE_VIEW3D) {
+ View3D *v3d= (View3D *)sl;
+ if(v3d->ob_centre && v3d->ob_centre->data == arm) {
+ if (!strcmp(v3d->ob_centre_bone, oldname)) {
+ BLI_strncpy(v3d->ob_centre_bone, newname, MAXBONENAME);
+ }
+ }
+ }
+ }
+ }
+ }
}
}