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
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
#-----------------------------------------------------------------#
#-----------------------------------------------------------------#
#always start with this line
from pyfbsdk import *
#------------------------------------------
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.