[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23305] trunk/blender: UI: fix display of shape key list to show with no items,

Brecht Van Lommel brecht at blender.org
Thu Sep 17 16:35:09 CEST 2009


Revision: 23305
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23305
Author:   blendix
Date:     2009-09-17 16:35:08 +0200 (Thu, 17 Sep 2009)

Log Message:
-----------
UI: fix display of shape key list to show with no items,
list template should also accept None.

Modified Paths:
--------------
    trunk/blender/release/ui/buttons_data_mesh.py
    trunk/blender/source/blender/makesrna/intern/rna_ui_api.c

Modified: trunk/blender/release/ui/buttons_data_mesh.py
===================================================================
--- trunk/blender/release/ui/buttons_data_mesh.py	2009-09-17 13:47:58 UTC (rev 23304)
+++ trunk/blender/release/ui/buttons_data_mesh.py	2009-09-17 14:35:08 UTC (rev 23305)
@@ -102,8 +102,7 @@
 		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()
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c	2009-09-17 13:47:58 UTC (rev 23304)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui_api.c	2009-09-17 14:35:08 UTC (rev 23305)
@@ -301,7 +301,10 @@
 
 	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.");





More information about the Bf-blender-cvs mailing list