|
I’m trying to add a custom float property through python, but when I run my script mobu crashes. Can anyone tell me what I’m doing wrong? Is it a problem with my code or mobu? Either way, it would be nice if it didn’t hard crash.
from pyfbsdk import *
####------------------------------------------------------------------------#### def AddFloatProperty ( model, name, value):
myProp = model.PropertyCreate ( name, FBPropertyType.kFBPT_float, 'float' , False, True )
myProp.Data = value ####------------------------------------------------------------------------####
selJoints = FBModelList() FBGetSelectedModels( selJoints, None , True )
for sel in selJoints:
AddFloatProperty( sel , "TestFloatProperty" , 1.0 )
Thanks, DJ
|
|
|
|
No sure which MB you use, but this is working in MB 2009:
myProp = model.PropertyCreate ( name, FBPropertyType.kFBPT_float, 'Number' , False, True, None )
|
|
|