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:
Diffstat (limited to 'source/blender/editors/armature/armature_naming.c')
-rw-r--r--source/blender/editors/armature/armature_naming.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 1f02e24666d..4f329dbe449 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -13,6 +13,7 @@
#include "MEM_guardedalloc.h"
#include "DNA_armature_types.h"
+#include "DNA_camera_types.h"
#include "DNA_constraint_types.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_gpencil_types.h"
@@ -281,6 +282,17 @@ void ED_armature_bone_rename(Main *bmain,
}
}
+ /* fix camera focus */
+ if (ob->type == OB_CAMERA) {
+ Camera *cam = (Camera *)ob->data;
+ if ((cam->dof.focus_object != NULL) && (cam->dof.focus_object->data == arm)) {
+ if (STREQ(cam->dof.focus_subtarget, oldname)) {
+ BLI_strncpy(cam->dof.focus_subtarget, newname, MAXBONENAME);
+ DEG_id_tag_update(&cam->id, ID_RECALC_COPY_ON_WRITE);
+ }
+ }
+ }
+
/* fix grease pencil modifiers and vertex groups */
if (ob->type == OB_GPENCIL) {