[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2070] trunk/py/scripts/addons/modules/ extensions_framework/__init__.py: extensions_framework: update property creation code to support new property types and their options

Doug Hammond doughammond at hamsterfight.co.uk
Tue Jun 28 15:03:09 CEST 2011


Revision: 2070
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2070
Author:   dougal2
Date:     2011-06-28 13:03:08 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
extensions_framework: update property creation code to support new property types and their options

Modified Paths:
--------------
    trunk/py/scripts/addons/modules/extensions_framework/__init__.py

Modified: trunk/py/scripts/addons/modules/extensions_framework/__init__.py
===================================================================
--- trunk/py/scripts/addons/modules/extensions_framework/__init__.py	2011-06-27 13:28:55 UTC (rev 2069)
+++ trunk/py/scripts/addons/modules/extensions_framework/__init__.py	2011-06-28 13:03:08 UTC (rev 2070)
@@ -68,43 +68,54 @@
 			
 			if prop['type'] == 'bool':
 				t = bpy.props.BoolProperty
-				a = {k: v for k,v in prop.items() if k in ['name',
-					'description','default']}
+				a = {k: v for k,v in prop.items() if k in ["name",
+					"description","default","options","subtype","update"]}
+			elif prop['type'] == 'bool_vector':
+				t = bpy.props.BoolVectorProperty
+				a = {k: v for k,v in prop.items() if k in ["name",
+					"description","default","options","subtype","size",
+					"update"]}
 			elif prop['type'] == 'collection':
 				t = bpy.props.CollectionProperty
-				a = {k: v for k,v in prop.items() if k in ["ptype", "name",
-					"description"]}
+				a = {k: v for k,v in prop.items() if k in ["ptype","name",
+					"description","default","options","items"]}
 				a['type'] = a['ptype']
 				del a['ptype']
 			elif prop['type'] == 'enum':
 				t = bpy.props.EnumProperty
-				a = {k: v for k,v in prop.items() if k in ["items", "name",
-					"description", "default"]}
+				a = {k: v for k,v in prop.items() if k in ["items","name",
+					"description","default","options","update"]}
 			elif prop['type'] == 'float':
 				t = bpy.props.FloatProperty
 				a = {k: v for k,v in prop.items() if k in ["name",
-					"description", "min", "max", "soft_min", "soft_max",
-					"default", "precision"]}
+					"description","default","min","max","soft_min","soft_max",
+					"step","precision","options","subtype","unit","update"]}
 			elif prop['type'] == 'float_vector':
 				t = bpy.props.FloatVectorProperty
 				a = {k: v for k,v in prop.items() if k in ["name",
-					"description", "min", "max", "soft_min", "soft_max",
-					"default", "precision", "size", "subtype"]}
+					"description","default","min","max","soft_min","soft_max",
+					"step","precision","options","subtype","size","update"]}
 			elif prop['type'] == 'int':
 				t = bpy.props.IntProperty
 				a = {k: v for k,v in prop.items() if k in ["name",
-					"description", "min", "max", "soft_min", "soft_max",
-					"default"]}
+					"description","default","min","max","soft_min","soft_max",
+					"step","options","subtype","update"]}
+			elif prop['type'] == 'int_vector':
+				t = bpy.props.IntVectorProperty
+				a = {k: v for k,v in prop.items() if k in ["name",
+					"description","default","min","max","soft_min","soft_max",
+					"options","subtype","size","update"]}
 			elif prop['type'] == 'pointer':
 				t = bpy.props.PointerProperty
 				a = {k: v for k,v in prop.items() if k in ["ptype", "name",
-					"description"]}
+					"description","options","update"]}
 				a['type'] = a['ptype']
 				del a['ptype']
 			elif prop['type'] == 'string':
 				t = bpy.props.StringProperty
 				a = {k: v for k,v in prop.items() if k in ["name",
-					"description", "maxlen", "default", "subtype"]}
+					"description","default","maxlen","options","subtype",
+					"update"]}
 			else:
 				continue
 			



More information about the Bf-extensions-cvs mailing list