Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui_api.c
| Context not available. | |||||
| } | } | ||||
| static PointerRNA rna_uiItemO(uiLayout *layout, const char *opname, const char *name, const char *text_ctxt, | static PointerRNA rna_uiItemO(uiLayout *layout, const char *opname, const char *name, const char *text_ctxt, | ||||
campbellbarton: Changes here shouldn't be needed. | |||||
| int translate, int icon, int emboss) | int translate, int icon, int emboss, int icon_value) | ||||
Not Done Inline Actionsforgot to change this file... rebellion: forgot to change this file... | |||||
| { | { | ||||
| wmOperatorType *ot; | wmOperatorType *ot; | ||||
| int flag; | int flag; | ||||
| Context not available. | |||||
| flag = UI_ITEM_O_RETURN_PROPS; | flag = UI_ITEM_O_RETURN_PROPS; | ||||
| flag |= (emboss) ? 0 : UI_ITEM_R_NO_BG; | flag |= (emboss) ? 0 : UI_ITEM_R_NO_BG; | ||||
| if (icon_value && !icon) { | |||||
| icon = icon_value; | |||||
| } | |||||
| return uiItemFullO_ptr(layout, ot, name, icon, NULL, uiLayoutGetOperatorContext(layout), flag); | return uiItemFullO_ptr(layout, ot, name, icon, NULL, uiLayoutGetOperatorContext(layout), flag); | ||||
| } | } | ||||
| Context not available. | |||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator"); | RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator"); | ||||
| parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | |||||
| RNA_def_property_ui_text(parm, "Icon Value", | |||||
| "Override automatic icon of the item " | |||||
| "(use it e.g. with custom material icons returned by icon()...)"); | |||||
| func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); | func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); | ||||
| parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); | parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); | ||||
| Context not available. | |||||
Changes here shouldn't be needed.