diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index 8796d7a46a8..33b3960b381 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -102,8 +102,7 @@ class DATA_PT_shape_keys(DataButtonsPanel): kb = ob.active_shape_key row = layout.row() - if key: # XXX - looks crappy - row.template_list(key, "keys", ob, "active_shape_key_index", rows=2) + row.template_list(key, "keys", ob, "active_shape_key_index", rows=2) col = row.column() diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 3110e631a65..17846651c3b 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -301,7 +301,10 @@ void RNA_api_ui_layout(StructRNA *srna) func= RNA_def_function(srna, "template_list", "uiTemplateList"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); - api_ui_item_rna_common(func); + parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property."); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); + parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data."); + RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element."); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");