|
Hello,
Yes you can access most properties on all objects in MotionBuilder, we have exposed a funtion called PropertyList that contains a list of all the properties for your object.
from pyfbsdk import *
#Getting properties works just like how it does on models, or textures or actors, etc.
#Keying all properties on a character lCharacter = FBApplication().CurrentCharacter for each in lCharacter.PropertyList:
if each != None: #Make sure none of the properties return a value of none.
print each.Name #View all the properties
#Setting a particular property on a character lProp = lCharacter.PropertyList.Find("Match Source") if lProp:
lProp.Data = True
The above example is how to set the property “Match Source”, you would do the same for the other properties you would like to set.
The difference for your other properties you are looking for is they are integers (not a boolean like Match Source)so you would just set the Data attribute to that value.
lProp.Data = 50
One small thing to note is, every once in a while the name you put in the Find function does not mate the UI name or the UI name without a space(both should work), so a trick is to set the property you want to acess to something crazy like 999, save out the FBX scene as ASCII, use something like Notepad to search for the value 999, and then you have your property name you need to add into the Find function.
Regards,
Kristine
KRISTINE MIDDLEMISS | SENIOR DEVELOPER CONSULTANT
AUTODESK DEVELOPER NETWORK Media & Entertainment
http://www.autodesk.com/joinadn
|