diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-31 08:58:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-31 09:04:55 +0300 |
commit | 98052162e1338cb8f97832c3e7e1d65d8bfd9b3f (patch) | |
tree | 143732bf22c86824f18b1d6142c0942340738e11 /source/blender/editors/space_view3d | |
parent | fe3571b3620f66d352e7eac74fa0066e50ab7837 (diff) |
UI: replace UI_ITEM_O_RETURN_PROPS /w return arg
Means we can have a version of this function that returns the button
and avoids returning a struct that often isn't used.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 34e01405e7e..0c67776693d 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -879,12 +879,12 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa) /* The weight group paste function */ icon = (locked) ? ICON_BLANK1 : ICON_PASTEDOWN; - op_ptr = uiItemFullO(row, "OBJECT_OT_vertex_weight_paste", "", icon, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS); + uiItemFullO(row, "OBJECT_OT_vertex_weight_paste", "", icon, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr); RNA_int_set(&op_ptr, "weight_group", i); /* The weight entry delete function */ icon = (locked) ? ICON_LOCKED : ICON_X; - op_ptr = uiItemFullO(row, "OBJECT_OT_vertex_weight_delete", "", icon, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS); + uiItemFullO(row, "OBJECT_OT_vertex_weight_delete", "", icon, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr); RNA_int_set(&op_ptr, "weight_group", i); yco -= UI_UNIT_Y; diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 1d99fcfdd3a..5e3c783c1b6 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -218,7 +218,7 @@ static void view3d_panel_tool_shelf(const bContext *C, Panel *pa) for (ct = st->toolshelf.first; ct; ct = ct->next) { if (STREQLEN(context, ct->context, OP_MAX_TYPENAME)) { col = uiLayoutColumn(pa->layout, true); - uiItemFullO(col, ct->opname, NULL, ICON_NONE, NULL, WM_OP_INVOKE_REGION_WIN, 0); + uiItemFullO(col, ct->opname, NULL, ICON_NONE, NULL, WM_OP_INVOKE_REGION_WIN, 0, NULL); } } } |