diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 7 |
2 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 8dfa54b95da..76d76b0a913 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -346,6 +346,15 @@ static PointerRNA rna_uiItemOMenuHold(uiLayout *layout, return opptr; } +static void rna_uiItemsEnumO(uiLayout *layout, + const char *opname, + const char *propname, + const bool icon_only) +{ + int flag = icon_only ? UI_ITEM_R_ICON_ONLY : 0; + uiItemsFullEnumO(layout, opname, propname, NULL, uiLayoutGetOperatorContext(layout), flag); +} + static void rna_uiItemMenuEnumO(uiLayout *layout, bContext *C, const char *opname, @@ -972,11 +981,12 @@ void RNA_api_ui_layout(StructRNA *srna) "Item. Places a button into the layout to call an Operator"); } - func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); + func = RNA_def_function(srna, "operator_enum", "rna_uiItemsEnumO"); parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + RNA_def_boolean(func, "icon_only", false, "", "Draw only icons in buttons, no text"); func = RNA_def_function(srna, "operator_menu_enum", "rna_uiItemMenuEnumO"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 1ecd0a581b6..868c804b4a3 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2952,7 +2952,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna) static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) { StructRNA *srna; - // PropertyRNA *prop; + PropertyRNA *prop; /* space_buts */ @@ -2961,6 +2961,11 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) RNA_def_struct_clear_flag(srna, STRUCT_UNDO); RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties"); + prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Search Match", ""); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + rna_def_userdef_theme_spaces_main(srna); } |