Fix part of T79635: Disable by default operation on unknown mod from liboverride object.

It is unfortunate that we cannot get active modifier from context when
operator is called from a shortcut, but we'd need an event for this to
work... So for now forbid any modifier operation of liboverride objects
in that case.
This commit is contained in:
Bastien Montagne 2020-08-12 10:47:44 +02:00
parent 9b58a41a92
commit b3702f5918
1 changed files with 1 additions and 1 deletions

View File

@ -1022,7 +1022,7 @@ bool edit_modifier_poll_generic(bContext *C,
}
if (ID_IS_OVERRIDE_LIBRARY(ob)) {
if ((mod != NULL) && (mod->flag & eModifierFlag_OverrideLibrary_Local) == 0) {
if ((mod == NULL) || (mod->flag & eModifierFlag_OverrideLibrary_Local) == 0) {
CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from library override");
return false;
}