Area :: Header
3ds Max 2015 Extension 1 is here

With new tools to power your pipeline
Discussion Groups

Python

Reply
Active Contributor
Steve S,
Posts: 38
Registered: ‎10-18-2007

Creating a character mapping using Python

57 Views, 3 Replies
10-18-2007 01:08 AM
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 :smileywink:) 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 :smileyhappy:

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 :smileyhappy:

Steve
Please use plain text.
Active Contributor
Steve S,
Posts: 38
Registered: ‎10-18-2007

Re: Creating a character mapping using Python

10-18-2007 01:14 AM in reply to: Steve S,
Hmm... I think I'm being silly. It's just PropertyList.append(FBModel), isn't it ?
Please use plain text.
Valued Contributor
CountZr0_1
Posts: 66
Registered: ‎08-22-2006

Re: Creating a character mapping using Python

10-18-2007 02:31 PM in reply to: Steve S,
Yep.
-jason
Please use plain text.
Active Member
GeordieMartinez
Posts: 10
Registered: ‎11-30-2007

Re: Creating a character mapping using Python

10-24-2007 05:40 PM in reply to: Steve S,

# 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)
Please use plain text.