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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-26 11:39:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-26 11:39:57 +0300
commit1f809f34c11d9a492f9500c034d69876792048d7 (patch)
tree4ab33af57e42baf3f4d1173afdd574ebf22d45ae /source/blender/editors/mesh/editmesh_tools.c
parente91bdb10e9c11acf98a2e986d490f2de3c272489 (diff)
parentab67c6e46b689a703c22c6e04f6d098603e3b49c (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 2e971b225d4..b2a2291f4f6 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -6001,10 +6001,10 @@ static int edbm_sort_elements_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static bool edbm_sort_elements_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop, void *UNUSED(user_data))
+static bool edbm_sort_elements_poll_property(const bContext *UNUSED(C), wmOperator *op, const PropertyRNA *prop)
{
const char *prop_id = RNA_property_identifier(prop);
- const int action = RNA_enum_get(ptr, "type");
+ const int action = RNA_enum_get(op->ptr, "type");
/* Only show seed for randomize action! */
if (STREQ(prop_id, "seed")) {
@@ -6025,18 +6025,6 @@ static bool edbm_sort_elements_draw_check_prop(PointerRNA *ptr, PropertyRNA *pro
return true;
}
-static void edbm_sort_elements_ui(bContext *C, wmOperator *op)
-{
- uiLayout *layout = op->layout;
- wmWindowManager *wm = CTX_wm_manager(C);
- PointerRNA ptr;
-
- RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
-
- /* Main auto-draw call. */
- uiDefAutoButsRNA(layout, &ptr, edbm_sort_elements_draw_check_prop, NULL, UI_BUT_LABEL_ALIGN_NONE, false);
-}
-
void MESH_OT_sort_elements(wmOperatorType *ot)
{
static const EnumPropertyItem type_items[] = {
@@ -6072,7 +6060,7 @@ void MESH_OT_sort_elements(wmOperatorType *ot)
ot->invoke = WM_menu_invoke;
ot->exec = edbm_sort_elements_exec;
ot->poll = ED_operator_editmesh;
- ot->ui = edbm_sort_elements_ui;
+ ot->poll_property = edbm_sort_elements_poll_property;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;