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: 

Creating a character mapping using Python

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
790 Views, 3 Replies

Creating a character mapping using Python

Hey all,

The MotionBuilder Python SDK is fairly new to me so I'm betting that what I want to do is pretty easy (or at least hoping it is ;)) and that I'm just overlooking it.

I've got my FBModel and I want to use that model for an appropriate character mapping. For example, I want to programatically map, say, Hips to this FBModel object.

From what I can see, each FBCharacter mapping is done through the character's PropertyList property with the name of the Bone followed by "Link". For Hips, there's a HipsLink in the PropertyList. So, I'm assuming that I'll want to set my model in the HipsLink. From what I can see the HipsLink Property is actually a PropertyList which doesn't make sense to me yet because I would have thought that the Hips mapping could only map to one FBModel so I could be wrong in this being the right place to set my FBModel. Each object in that PropertyList looks to be an FBComponent, which an FBModel inherits so I was thinking that I was somewhat close 🙂

How do I set the HipsLink property with the FBModel that I've got (more of a question about how the PropertyList structure around the Link properties works). Or if that's not the right way, how do I set my Hips mapping to my FBModel in the FBCharacter?

Phew.. hope that question isn't too confusing to follow. I appreciate the help 🙂

Steve
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Hmm... I think I'm being silly. It's just PropertyList.append(FBModel), isn't it ?
Message 3 of 4
CountZr0_1
in reply to: Anonymous

Yep.
-jason
Message 4 of 4
GeordieMartinez
in reply to: Anonymous


# a thanks to Jason Parks for this function:
def addJointToCharacter ( characterObject, slot, jointName ):
myJoint = FBFindModelByName(jointName)

property = characterObject.PropertyList.Find(slot + "Link")
property.append (myJoint)

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

Post to forums  

Autodesk Design & Make Report