diff options
author | Hans Goudey <h.goudey@me.com> | 2020-11-03 23:10:20 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-11-03 23:10:20 +0300 |
commit | fe7093fae466b95e54f15d358107c38b825a4f83 (patch) | |
tree | 59b4a9fe8dd92eb4bd4c4cec012e976a8bf1e3a5 /source/blender/editors/mesh | |
parent | 76683af38c2805f9cb4205c598b11dd0f973e87c (diff) |
Cleanup: Remove dead code in bevel operator
The `poll_property` callback is only used when the `ui` callback isn't
defined.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 69306a22d00..b8badd207fe 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -604,27 +604,6 @@ static void edbm_bevel_numinput_set_value(wmOperator *op) } } -/* Hide one of offset or offset_pct, depending on offset_type */ -static bool edbm_bevel_poll_property(const bContext *UNUSED(C), - wmOperator *op, - const PropertyRNA *prop) -{ - const char *prop_id = RNA_property_identifier(prop); - - if (STRPREFIX(prop_id, "offset")) { - int offset_type = RNA_enum_get(op->ptr, "offset_type"); - - if (STREQ(prop_id, "offset") && offset_type == BEVEL_AMT_PERCENT) { - return false; - } - if (STREQ(prop_id, "offset_pct") && offset_type != BEVEL_AMT_PERCENT) { - return false; - } - } - - return true; -} - wmKeyMap *bevel_modal_keymap(wmKeyConfig *keyconf) { static const EnumPropertyItem modal_items[] = { @@ -1097,7 +1076,6 @@ void MESH_OT_bevel(wmOperatorType *ot) ot->modal = edbm_bevel_modal; ot->cancel = edbm_bevel_cancel; ot->poll = ED_operator_editmesh; - ot->poll_property = edbm_bevel_poll_property; ot->ui = edbm_bevel_ui; /* flags */ |