[Bf-blender-cvs] [9324e1117a5] master: LibOverride: Tweak more poll functions to prevent illegal operations.
Bastien Montagne
noreply at git.blender.org
Wed Jul 1 14:47:07 CEST 2020
Commit: 9324e1117a558b1581a2c13250c04e699bd8bedc
Author: Bastien Montagne
Date: Wed Jul 1 14:45:27 2020 +0200
Branches: master
https://developer.blender.org/rB9324e1117a558b1581a2c13250c04e699bd8bedc
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.
===================================================================
M source/blender/editors/screen/screen_ops.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list