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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-14 13:39:52 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-08-14 14:25:08 +0300
commit1f78e8607033f64d2c9633517d3b921c61ff431c (patch)
treeade0160185a8c89925671e30107ca62535224870 /source/blender/editors/object/object_modifier.c
parent5e696fdcd646ca8643f617046a22da0a825f56d4 (diff)
Fix modifier operators not working from Python API as before.
The poll function required the modifier to be in the context, but these operators also accept a "modifier" string property as well.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r--source/blender/editors/object/object_modifier.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index dcc2ce63a83..d16ba47b464 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -827,11 +827,6 @@ bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_fla
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", rna_type);
Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
- if (!ptr.data) {
- CTX_wm_operator_poll_msg_set(C, "Context missing 'modifier'");
- return 0;
- }
-
if (!ob || ID_IS_LINKED(ob)) return 0;
if (obtype_flag && ((1 << ob->type) & obtype_flag) == 0) return 0;
if (ptr.id.data && ID_IS_LINKED(ptr.id.data)) return 0;