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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-11-16 12:39:41 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-11-16 12:39:41 +0300
commit4722fc5dd0a335588a160e43cf77223c256ebd31 (patch)
treee78c43b7ff3c0a3cfc735db7b20dbebef8e31327 /source/blender/editors/screen
parenteb9e9f7f1ac2c7aaec13906acca4f047d3e82e99 (diff)
Disable possibility to flip bone names of linked armatures
Linked data should not be modified in such a way. Reported by Nathan here in the studio, reviewed by Bastien, thanks!
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 022b8605436..c69e01422e0 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -442,6 +442,17 @@ int ED_operator_posemode(bContext *C)
return 0;
}
+int ED_operator_posemode_local(bContext *C)
+{
+ if (ED_operator_posemode(C)) {
+ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
+ bArmature *arm = ob->data;
+ return !(ID_IS_LINKED_DATABLOCK(&ob->id) ||
+ ID_IS_LINKED_DATABLOCK(&arm->id));
+ }
+ return false;
+}
+
/* wrapper for ED_space_image_show_uvedit */
int ED_operator_uvedit(bContext *C)
{