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-08-12 11:47:44 +0300
committerBastien Montagne <bastien@blender.org>2020-08-12 12:11:48 +0300
commitb3702f5918863eb743406b4543552a1ca7f00c19 (patch)
tree86268d0c73c83524b9a6dcbf97a6393185de5fb3 /source/blender/editors/object/object_modifier.c
parent9b58a41a929c77a3b6dd72bf2284d77eba6c68cf (diff)
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.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index e93bd8bd94e..17dc7a36a42 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -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;
}