22 lProperty = ((
'My Integer', FBPropertyType.kFBPT_int,
'Integer',
True,
True,
None),
23 (
'My Bool', FBPropertyType.kFBPT_bool,
'Bool',
True,
True,
None),
24 (
'My Float', FBPropertyType.kFBPT_float,
'Float',
False,
True,
None),
25 (
'My Double', FBPropertyType.kFBPT_double,
'Number',
True,
True,
None),
26 (
'My Chrptr', FBPropertyType.kFBPT_charptr,
'String',
False,
True,
None),
27 (
'My Enum', FBPropertyType.kFBPT_enum,
'Enum',
True,
True,
None),
28 (
'My Time', FBPropertyType.kFBPT_Time,
'Time',
True,
True,
None),
29 (
'My Obj', FBPropertyType.kFBPT_object,
'Object',
False,
True,
None ),
30 (
'My Stringlist', FBPropertyType.kFBPT_stringlist,
'StringList',
False,
True,
None),
31 (
'My Vector4D', FBPropertyType.kFBPT_Vector4D,
'Vector4',
True,
True,
None),
32 (
'My Vector3D', FBPropertyType.kFBPT_Vector3D,
'Vector',
True,
True,
None),
33 (
'My Vector2D', FBPropertyType.kFBPT_Vector2D,
'Vector2',
True,
True,
None),
34 (
'My Colour', FBPropertyType.kFBPT_ColorRGB,
'Color',
True,
True,
None),
35 (
'My ColourAndAlpha', FBPropertyType.kFBPT_ColorRGBA,
'ColorAndAlpha',
True,
True,
None),
36 (
'My Action', FBPropertyType.kFBPT_Action,
'Action',
True,
True,
None),
37 (
'My TimeSpan', FBPropertyType.kFBPT_TimeSpan,
'Time',
False,
True,
None),
51 if len( lModels ) == 0:
52 FBMessageBox(
"Message",
"Nothing selected",
"OK",
None,
None )
58 lFbp.Caption =
"CREATING CUSTOM PROPERTIES"
65 for ( pName, pType, pDataType,pAnimatable, pIsUser, pReferenceSource )
in lProperty:
66 prop = x.PropertyCreate( pName, pType, pDataType, pAnimatable, pIsUser, pReferenceSource )
68 print "NoneObj:"+pName+
","+str(pType)
70 print prop.GetName()+prop.GetPropertyTypeName()
72 lProp = x.PropertyList.Find(
'My Integer')
76 lProp.SetAnimated(
True)
79 lProp = x.PropertyList.Find(
'My Bool')
81 lProp.SetAnimated(
True)
84 lProp = x.PropertyList.Find(
'My Double')
89 lProp.SetAnimated(
True)
92 lProp= x.PropertyList.Find(
'My ChrPtr')
93 lProp.Data =
"TestThis!"
96 lProp= x.PropertyList.Find(
'My Enum')
97 lEnumList = lProp.GetEnumStringList(
True)
98 lEnumList.Add(
"Test1")
99 lEnumList.Add(
"Test2")
100 lEnumList.Add(
"Test3")
101 lProp.NotifyEnumStringListChanged()
104 lProp= x.PropertyList.Find(
'My Time')
105 lProp.Data =
FBTime(0,0,1,1)
106 lProp.SetAnimated =
True
109 lProp = x.PropertyList.Find(
'My Vector3D')
112 lProp.SetAnimated(
True)
115 lProp = x.PropertyList.Find(
'My Vector4D')
118 lProp.SetAnimated(
True)
121 lProp = x.PropertyList.Find(
'My Colour')
124 lProp.SetAnimated(
True)
127 lProp = x.PropertyList.Find(
'My ColourAndAlpha')
130 lProp.SetAnimated(
True)
133 lProp = x.PropertyList.Find(
'My Action')
134 lProp.SetAnimated(
True)
137 lProp = x.PropertyList.Find(
'My Bool')
139 lProp.SetAnimated(
True)
142 lProp = x.PropertyList.Find(
'My Integer')
146 lProp.SetAnimated(
True)
149 lVal = lCount / len(lModels) * 100
150 lFbp.Percent = int(lVal)