diff options
author | Bastien Montagne <bastien@blender.org> | 2020-06-30 18:51:41 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-06-30 18:52:36 +0300 |
commit | 6add0cc88a0d06e0a60f88b83c4894bd8701ecb5 (patch) | |
tree | 7b8a0c6fc98930c759f6cb3d1daaf7d44b6e1a47 /source/blender/editors/object/object_remesh.c | |
parent | 438bd823714a24475962ab89ad38b0d7e36349fe (diff) |
LibOverride: Fix lots of poll functions for Object operators.
Prevent operators that should not perform on override data to be
callable in those cases.
Diffstat (limited to 'source/blender/editors/object/object_remesh.c')
-rw-r--r-- | source/blender/editors/object/object_remesh.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_remesh.c b/source/blender/editors/object/object_remesh.c index e28b5d953a5..664d4219686 100644 --- a/source/blender/editors/object/object_remesh.c +++ b/source/blender/editors/object/object_remesh.c @@ -100,7 +100,12 @@ static bool object_remesh_poll(bContext *C) { Object *ob = CTX_data_active_object(C); - if (ob == NULL) { + if (ob == NULL || ob->data == NULL) { + return false; + } + + if (ID_IS_LINKED(ob) || ID_IS_LINKED(ob->data) || ID_IS_OVERRIDE_LIBRARY(ob->data)) { + CTX_wm_operator_poll_msg_set(C, "The remesher cannot worked on linked or override data"); return false; } |