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:
authorBastien Montagne <bastien@blender.org>2020-07-13 15:29:04 +0300
committerBastien Montagne <bastien@blender.org>2020-07-13 15:29:54 +0300
commit9db0c36af1140082b8e4bcf42564482eb477a682 (patch)
tree474d138db833001142f62fdf8a869bf135904445 /source/blender/editors/screen
parent03c8b048a166584a72ceff08432401cd7047648c (diff)
LibOverride: add more polling checks to operators not supposed to work on overrides.
This is long work, we are still likely missing a lot of cases...
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index cd612c35a36..1555dce8b79 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -360,6 +360,13 @@ bool ED_operator_object_active_editable(bContext *C)
return operator_object_active_editable_ex(ob);
}
+/** Object must be editable and fully local (i.e. not an override). */
+bool ED_operator_object_active_local_editable(bContext *C)
+{
+ Object *ob = ED_object_active_context(C);
+ return operator_object_active_editable_ex(ob) && !ID_IS_OVERRIDE_LIBRARY(ob);
+}
+
bool ED_operator_object_active_editable_mesh(bContext *C)
{
Object *ob = ED_object_active_context(C);