diff options
author | Bastien Montagne <bastien@blender.org> | 2020-07-01 15:45:27 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-07-01 15:45:27 +0300 |
commit | 9324e1117a558b1581a2c13250c04e699bd8bedc (patch) | |
tree | 30800f3ac82d7546fddc4abd638f485243e42cad /source/blender/editors/screen/screen_ops.c | |
parent | 23cc2a262835f6e61bcc876b7fc911a1ce3e16b6 (diff) |
LibOverride: Tweak more poll functions to prevent illegal operations.
We are likely still missing a lot of things, but most operators that
should not be allowed on liboverrides should now be properly disabled.
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 1623b59167e..5de8ccd404d 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -366,19 +366,20 @@ bool ED_operator_object_active_editable_mesh(bContext *C) { Object *ob = ED_object_active_context(C); return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) && (ob->type == OB_MESH) && - !ID_IS_LINKED(ob->data)); + !ID_IS_LINKED(ob->data) && !ID_IS_OVERRIDE_LIBRARY(ob->data)); } bool ED_operator_object_active_editable_font(bContext *C) { Object *ob = ED_object_active_context(C); - return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) && (ob->type == OB_FONT)); + return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) && (ob->type == OB_FONT) && + !ID_IS_LINKED(ob->data) && !ID_IS_OVERRIDE_LIBRARY(ob->data)); } bool ED_operator_editable_mesh(bContext *C) { Mesh *mesh = ED_mesh_context(C); - return (mesh != NULL) && !ID_IS_LINKED(mesh); + return (mesh != NULL) && !ID_IS_LINKED(mesh) && !ID_IS_OVERRIDE_LIBRARY(mesh); } bool ED_operator_editmesh(bContext *C) |