diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-27 05:15:31 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-06-27 05:15:31 +0400 |
commit | 222fe6b1a5d49f67177cbb762f55a0e482145f5d (patch) | |
tree | 2ff249d49385233c34cddd473e457a76a17b90c8 /source/blender/makesrna | |
parent | d839a9ae9ccbf17375e28cc92aa75a0cb4cf6b11 (diff) |
UI
* Search popup + autocomplete for bones, vertex groups, etc. This
is done with layout.item_pointerR, specifying an RNA collection to
take the items from. Used by constraints and modifiers.
* Some tests with the List template, ignore those for now..
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 75de9d53766..a4aa60775f2 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -136,6 +136,14 @@ void RNA_api_ui_layout(StructRNA *srna) parm= RNA_def_string(func, "value", "", 0, "", "Enum property value."); RNA_def_property_flag(parm, PROP_REQUIRED);*/ + func= RNA_def_function(srna, "item_pointerR", "uiItemPointerR"); + api_ui_item_common(func); + api_ui_item_rna_common(func); + parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in."); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); + parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property."); + RNA_def_property_flag(parm, PROP_REQUIRED); + func= RNA_def_function(srna, "itemO", "uiItemO"); api_ui_item_op_common(func); @@ -211,7 +219,6 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_CONTEXT); api_ui_item_rna_common(func); RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block."); - RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a new ID block."); RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block."); func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier"); @@ -252,9 +259,13 @@ void RNA_api_ui_layout(StructRNA *srna) 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."); + parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for 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); + parm= RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX); + parm= RNA_def_int(func, "columns", 5, 0, INT_MAX, "", "Number of columns to display.", 0, INT_MAX); + parm= RNA_def_boolean(func, "compact", 0, "", "Use compact, single row list template."); + parm= RNA_def_collection(func, "items", 0, "", "Items visible in the list."); + RNA_def_function_return(func, parm); } #endif |