diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-23 18:25:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-23 18:25:33 +0300 |
commit | cb6d2685bd9cc092ef5e1c9bea10bb3a1577d288 (patch) | |
tree | 8034f8bac42daa6b91bba1b1fe65dfae26475d71 /source/blender/editors/interface/interface_layout.c | |
parent | d87e7393e33c3b4bd20d4170fde745826c92014f (diff) |
rna/py-api fix.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument.
next commit will make order of arguments consistant (currently only changed order that rna wrapped).
(commit 27674 by Campbell from render25 branch)
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index ab199436a55..aee1f543607 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -592,7 +592,7 @@ static void ui_item_disabled(uiLayout *layout, char *name) } /* operator items */ -PointerRNA uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, IDProperty *properties, int context, int flag) +PointerRNA uiItemFullO(uiLayout *layout, char *idname, char *name, int icon, IDProperty *properties, int context, int flag) { uiBlock *block= layout->root->block; wmOperatorType *ot= WM_operatortype_find(idname, 0); @@ -673,7 +673,7 @@ static char *ui_menu_enumpropname(uiLayout *layout, char *opname, char *propname return ""; } -void uiItemEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value) +void uiItemEnumO(uiLayout *layout, char *opname, char *name, int icon, char *propname, int value) { PointerRNA ptr; @@ -683,7 +683,7 @@ void uiItemEnumO(uiLayout *layout, char *name, int icon, char *opname, char *pro if(!name) name= ui_menu_enumpropname(layout, opname, propname, value); - uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, ptr.data, layout->root->opcontext, 0); } void uiItemsFullEnumO(uiLayout *layout, char *opname, char *propname, IDProperty *properties, int context, int flag) @@ -723,10 +723,10 @@ void uiItemsFullEnumO(uiLayout *layout, char *opname, char *propname, IDProperty ptr.data= IDP_CopyProperty(properties); RNA_enum_set(&ptr, propname, item[i].value); - uiItemFullO(column, (char*)item[i].name, item[i].icon, opname, ptr.data, context, flag); + uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, ptr.data, context, flag); } else - uiItemEnumO(column, (char*)item[i].name, item[i].icon, opname, propname, item[i].value); + uiItemEnumO(column, opname, (char*)item[i].name, item[i].icon, propname, item[i].value); } else { if(item[i].name) { @@ -790,7 +790,7 @@ void uiItemEnumO_string(uiLayout *layout, char *name, int icon, char *opname, ch if(!name) name= ui_menu_enumpropname(layout, opname, propname, value); - uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, ptr.data, layout->root->opcontext, 0); } void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value) @@ -800,7 +800,7 @@ void uiItemBooleanO(uiLayout *layout, char *name, int icon, char *opname, char * WM_operator_properties_create(&ptr, opname); RNA_boolean_set(&ptr, propname, value); - uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, ptr.data, layout->root->opcontext, 0); } void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *propname, int value) @@ -810,7 +810,7 @@ void uiItemIntO(uiLayout *layout, char *name, int icon, char *opname, char *prop WM_operator_properties_create(&ptr, opname); RNA_int_set(&ptr, propname, value); - uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, ptr.data, layout->root->opcontext, 0); } void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *propname, float value) @@ -820,7 +820,7 @@ void uiItemFloatO(uiLayout *layout, char *name, int icon, char *opname, char *pr WM_operator_properties_create(&ptr, opname); RNA_float_set(&ptr, propname, value); - uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, ptr.data, layout->root->opcontext, 0); } void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value) @@ -830,12 +830,12 @@ void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *p WM_operator_properties_create(&ptr, opname); RNA_string_set(&ptr, propname, value); - uiItemFullO(layout, name, icon, opname, ptr.data, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, ptr.data, layout->root->opcontext, 0); } void uiItemO(uiLayout *layout, char *name, int icon, char *opname) { - uiItemFullO(layout, name, icon, opname, NULL, layout->root->opcontext, 0); + uiItemFullO(layout, opname, name, icon, NULL, layout->root->opcontext, 0); } /* RNA property items */ @@ -993,7 +993,7 @@ void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, uiItemFullR(layout, name, icon, ptr, prop, RNA_ENUM_VALUE, value, 0); } -void uiItemEnumR_string(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, char *value) +void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, char *propname, char *value, char *name, int icon) { PropertyRNA *prop= RNA_struct_find_property(ptr, propname); EnumPropertyItem *item; @@ -1191,7 +1191,7 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN } } -void uiItemPointerR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, struct PointerRNA *searchptr, char *searchpropname) +void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, char *propname, struct PointerRNA *searchptr, char *searchpropname, char *name, int icon) { PropertyRNA *prop, *searchprop; PropertyType type; @@ -1293,7 +1293,7 @@ static void ui_item_menu(uiLayout *layout, char *name, int icon, uiMenuCreateFun but->type= MENU; } -void uiItemM(uiLayout *layout, bContext *C, char *name, int icon, char *menuname) +void uiItemM(uiLayout *layout, bContext *C, char *menuname, char *name, int icon) { MenuType *mt; @@ -1411,7 +1411,7 @@ static void menu_item_enum_opname_menu(bContext *C, uiLayout *layout, void *arg) uiItemsEnumO(layout, lvl->opname, lvl->propname); } -void uiItemMenuEnumO(uiLayout *layout, char *name, int icon, char *opname, char *propname) +void uiItemMenuEnumO(uiLayout *layout, char *opname, char *propname, char *name, int icon) { wmOperatorType *ot= WM_operatortype_find(opname, 0); MenuItemLevel *lvl; @@ -1442,7 +1442,7 @@ static void menu_item_enum_rna_menu(bContext *C, uiLayout *layout, void *arg) uiItemsEnumR(layout, &lvl->rnapoin, lvl->propname); } -void uiItemMenuEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname) +void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname, char *name, int icon) { MenuItemLevel *lvl; PropertyRNA *prop; |