From 1f78e8607033f64d2c9633517d3b921c61ff431c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 14 Aug 2018 12:39:52 +0200 Subject: [PATCH] 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. --- source/blender/editors/object/object_modifier.c | 5 ----- 1 file changed, 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;