Characterize in code in Motionbuilder

I’ve looked everywhere and I can’t find where to assign joints to character node entries in the code. Tearing hair out. Please help. Grazie.

-L

#-----------------------------------------------------------------#

SCRIPT: 3 - defineCharacter.py

AUTHOR: Jason Parks

UPDATED: June 2007

DESCRIPTION: sample code for creating a character for MasterClass

#-----------------------------------------------------------------#

#always start with this line
from pyfbsdk import *

#------------------------------------------

This custom function adds a joint to the

passed body part

def addJointToCharacter ( characterObject, slot, jointName ):
myJoint = FBFindModelByName(jointName)

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

#------------------------------------------

#this will create an character
myCharacter = FBCharacter (“bob”)

#this will create a test joint
FBModelSkeleton(“pelvis”)

#this will assign the joint ‘pelvis’ into the character’s ‘Hips’ slot
addJointToCharacter (myCharacter, ‘Hips’, ‘pelvis’)

Grabbed this from the python scripting master class by jason parks.

Thanks, after a bunch of experimenting I made it that far but in MoBu 2011 append evaluates to a str.

I’m getting by that using insert instead.

Still, a harrowing day of digging to say the least.

-L

[QUOTE=lanedaughtry;7952]Thanks, after a bunch of experimenting I made it that far but in MoBu 2011 append evaluates to a str.
[/QUOTE]

I get that code to work as is, is there a repro case for the above? I’d be interested to dig down and see how one gets that result.