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.
This commit is contained in:
parent
23cc2a2628
commit
9324e1117a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue