diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-24 18:16:56 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-24 18:16:56 +0400 |
commit | 5b26f520bb50f17b0a2193daf9b8b10616c4707b (patch) | |
tree | 868be9ac8f1bd3da6acb283198dec7291c779cd0 /source/blender/makesrna | |
parent | a379fdd7fba460fdceb14d6dd164116d9a4744bd (diff) |
UI
* Added SCROLL button type, use like a NUMSLI basically, with
a1 used to define the scroller size.
* Add scroll and toggle colors to the Theme (toggle was set to
draw like radio in a recent commit, but it's the intention
these look different).
* Added rudimentary list template, used for object material
slots, this is WIP though.
* In popup menu, split text with line breaks over multiple
lines, makes python errors display slightly nicer.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index d8648e05153..75de9d53766 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -249,6 +249,12 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, "image_user", "ImageUser", "", ""); RNA_def_property_flag(parm, PROP_REQUIRED); + + func= RNA_def_function(srna, "template_list", "uiTemplateList"); + api_ui_item_rna_common(func); + parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, indicating the active element."); + RNA_def_property_flag(parm, PROP_REQUIRED); + parm= RNA_def_int(func, "items", 5, 0, INT_MAX, "", "Number of items to display.", 0, INT_MAX); } #endif diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 97337af5cb0..609082144e1 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -306,6 +306,12 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Option Widget Colors", ""); RNA_def_property_update(prop, NC_WINDOW, NULL); + + prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle"); + RNA_def_property_struct_type(prop, "ThemeWidgetColors"); + RNA_def_property_ui_text(prop, "Toggle Widget Colors", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NEVER_NULL); RNA_def_property_pointer_sdna(prop, NULL, "wcol_num"); @@ -348,7 +354,12 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ThemeWidgetColors"); RNA_def_property_ui_text(prop, "Menu Item Colors", ""); RNA_def_property_update(prop, NC_WINDOW, NULL); - + + prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NEVER_NULL); + RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll"); + RNA_def_property_struct_type(prop, "ThemeWidgetColors"); + RNA_def_property_ui_text(prop, "Scroll Widget Colors", ""); + RNA_def_property_update(prop, NC_WINDOW, NULL); prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); RNA_def_property_string_sdna(prop, NULL, "iconfile"); |