MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Editing modifiers

4 REPLIES 4
Reply
Message 1 of 5
Cogs_N_Sprockets
235 Views, 4 Replies

Editing modifiers

Does anyone know if its possible to get access to the modifiers of a character?

Specifically im trying to make a UI that will lock the character on a certain axis.

I have found some added functions for inversing the knees and elbows but it looks like this may be dug in there pretty deep...
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Cogs_N_Sprockets

I think this is what you want...

from pyfbsdk import *

## print all property of a FBCharacter
def PrintCharProp(pCharacter):
for prop in pCharacter.PropertyList:
if prop !=None:## In case some property are none object
print prop.GetName()

## return a list of InplaceLock Property
def GetInPlaceLockProp(pCharacter):
axes =
ret = list()
for idx in range(3):
ret.append(pCharacter.PropertyList.Find("InplaceLock"+axes))
return ret

Chars = FBSystem().Scene.Characters
if len(Chars)>0:
Char = Chars## Make sure to get a character
lock = GetInPlaceLockProp(Char)
for prop in lock:
prop.Data=True

Please Confirm that this is what you want to achive...
Message 3 of 5

Awesome that is excatly what i was looking for, thanks a ton!

Where can i dig around to find these hidden property names? is there a .py file that lists them all?
Message 4 of 5
Anonymous
in reply to: Cogs_N_Sprockets

That's why I left the PrintCharProp in the code... you can use it with any object that Inherit from FBComponent...

Charles
Message 5 of 5

Doh, Captain obvious over here.

Thanks that will help a ton as i got on to make more Custom UI's.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report