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>2017-10-31 08:58:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-31 09:04:55 +0300
commit98052162e1338cb8f97832c3e7e1d65d8bfd9b3f (patch)
tree143732bf22c86824f18b1d6142c0942340738e11 /source/blender/editors/object/object_relations.c
parentfe3571b3620f66d352e7eac74fa0066e50ab7837 (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/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index eba01b7ec8a..f191875dab2 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -310,8 +310,9 @@ static int make_proxy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
uiLayout *layout = UI_popup_menu_layout(pup);
/* create operator menu item with relevant properties filled in */
+ PointerRNA opptr_dummy;
uiItemFullO_ptr(layout, op->type, op->type->name, ICON_NONE, NULL,
- WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS);
+ WM_OP_EXEC_REGION_WIN, 0, &opptr_dummy);
/* present the menu and be done... */
UI_popup_menu_end(C, pup);
@@ -898,12 +899,13 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent
#if 0
uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_OBJECT);
#else
- opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
+ uiItemFullO_ptr(layout, ot, IFACE_("Object"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &opptr);
RNA_enum_set(&opptr, "type", PAR_OBJECT);
RNA_boolean_set(&opptr, "keep_transform", false);
- opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object (Keep Transform)"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT,
- UI_ITEM_O_RETURN_PROPS);
+ uiItemFullO_ptr(
+ layout, ot, IFACE_("Object (Keep Transform)"), ICON_NONE,
+ NULL, WM_OP_EXEC_DEFAULT, 0, &opptr);
RNA_enum_set(&opptr, "type", PAR_OBJECT);
RNA_boolean_set(&opptr, "keep_transform", true);
#endif