diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-08-21 16:57:47 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-08-21 16:57:47 +0400 |
commit | 1c614f6cf63fb65622b855123d8db76898d3c9ca (patch) | |
tree | f3e576a33418ab929db9459ddb7028b40ce81923 /source/blender/editors/object | |
parent | 27797a45ee6cbc987350269e6827197f47daf036 (diff) |
2.5: layout.itemO now returns OperatorProperties to be filled in,
when passing properties=True as argument.
Other changes:
* uiItemR, uiItemFullR, uiItemFullO now accept a flag argument rather
than multiple different "boolean" arguments, but still exposed as
booleans to python.
* Fix RNA to support setting PROP_RNAPTR for return values.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index e1b8858937c..47eaf1757ac 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -2759,13 +2759,10 @@ static void proxy_group_objects_menu (bContext *C, wmOperator *op, Object *ob, G if (go->ob) { PointerRNA props_ptr; - /* create operator properties, and assign the relevant pointers to that, - * and add a menu entry which uses these props - */ - WM_operator_properties_create(&props_ptr, op->idname); - RNA_string_set(&props_ptr, "object", go->ob->id.name+2); - RNA_string_set(&props_ptr, "group_object", go->ob->id.name+2); - uiItemFullO(layout, go->ob->id.name+2, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN); + /* create operator menu item with relevant properties filled in */ + props_ptr= uiItemFullO(layout, go->ob->id.name+2, 0, op->idname, NULL, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS); + RNA_string_set(&props_ptr, "object", go->ob->id.name+2); + RNA_string_set(&props_ptr, "group_object", go->ob->id.name+2); } } @@ -2793,12 +2790,9 @@ static int make_proxy_invoke (bContext *C, wmOperator *op, wmEvent *evt) uiLayout *layout= uiPupMenuLayout(pup); PointerRNA props_ptr; - /* create operator properties, and assign the relevant pointers to that, - * and add a menu entry which uses these props - */ - WM_operator_properties_create(&props_ptr, op->idname); - RNA_string_set(&props_ptr, "object", ob->id.name+2); - uiItemFullO(layout, op->type->name, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN); + /* create operator menu item with relevant properties filled in */ + props_ptr= uiItemFullO(layout, op->type->name, 0, op->idname, props_ptr.data, WM_OP_EXEC_REGION_WIN, UI_ITEM_O_RETURN_PROPS); + RNA_string_set(&props_ptr, "object", ob->id.name+2); /* present the menu and be done... */ uiPupMenuEnd(C, pup); |