def setPropKeys(args):
global theProperty
if theProperty is None:
return
(name, tip, value) = theProperty
if len(args) >= 2 and not isinstance(value, bool):
if "BOOLEAN" in args[1]:
value = bool(value)
else:
tip = tip + "," + args[1].replace(":", "=").replace('"', " ")
#expr = "bpy.types.Object.%s = %sProperty(%s)" % (name, proptype, tip)
if isinstance(value, bool):
prop = BoolProperty(tip)
elif isinstance(value, int):
prop = IntProperty(tip)
elif isinstance(value, float):
prop = FloatProperty(tip)
elif isinstance(value, string):
prop = StringProperty(tip)
setattr(bpy.types.Object, name, prop)
theProperty = None
评论列表
文章目录