Area :: Header
Interested in making Indie games?

Register for a Meet the Experts webinar with Digital-Tutors today!
Discussion Groups

Python

Reply
Active Contributor
tonthebone
Posts: 33
Registered: ‎01-08-2007

2012 crashes when when using SetCharacterizationOn( True )

38 Views, 4 Replies
09-27-2011 09:39 AM
Hi,

I'm experiencing a crash when I characterize using the myCharacter.SetCharacterizationOn( True).

All seems to be working correctly until I execute this line. When I do so, the charaterize check box turns on and Motionbuilder freezes. Any suggestions on how to remedy this?

Thanks!



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


from pyfbsdk import *

myCharacter = FBCharacter ("Test_Char")

myCharacter.InputType = FBCharacterInputType.kFBCharacterInputStance

myCharacter.ActiveInput = True

#---------- 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 assign the joint 'Hips' into the character's 'Hips' slot, rinse wash repeat.
addJointToCharacter (myCharacter, 'Reference', 'Reference')
addJointToCharacter (myCharacter, 'Hips', 'Hips')
addJointToCharacter (myCharacter, 'LeftUpLeg', 'LeftUpLeg')
addJointToCharacter (myCharacter, 'LeftLeg', 'LeftLeg')
addJointToCharacter (myCharacter, 'LeftFoot', 'LeftFoot')
addJointToCharacter (myCharacter, 'RightUpLeg', 'RightUpLeg')
addJointToCharacter (myCharacter, 'RightLeg', 'RightLeg')
addJointToCharacter (myCharacter, 'RightFoot', 'RightFoot')
addJointToCharacter (myCharacter, 'Spine', 'Spine')
addJointToCharacter (myCharacter, 'LeftArm', 'LeftArm')
addJointToCharacter (myCharacter, 'LeftForeArm', 'LeftForeArm')
addJointToCharacter (myCharacter, 'LeftHand', 'LeftHand')
addJointToCharacter (myCharacter, 'RightArm', 'RightArm')
addJointToCharacter (myCharacter, 'RightForeArm', 'RightForeArm')
addJointToCharacter (myCharacter, 'RightHand', 'RightHand')
addJointToCharacter (myCharacter, 'Head', 'Head')

#---------Turn Characterization on = Crashes MoBu!
myCharacter.SetCharacterizeOn( True )

Please use plain text.
Active Contributor
tonthebone
Posts: 33
Registered: ‎01-08-2007

Re: 2012 crashes when when using SetCharacterizationOn( True )

09-29-2011 09:32 AM in reply to: tonthebone
Adding to this thread: The above code seems to work just fine in Motionbuilder 2010. I wonder if this is something that can be remedied with a hotfix?
Please use plain text.
Active Contributor
tonthebone
Posts: 33
Registered: ‎01-08-2007

Re: 2012 crashes when when using SetCharacterizationOn( True )

10-04-2011 02:22 PM in reply to: tonthebone
I'm calling this resolved. What I've discovered is that if i execute "myCharacter.SetCharacterizeOn( True )" alone or as the last line in a script, It crashes. If I do something after that, like "myChar =FBApplication().CurrentCharacter", all seems to be OK. I guess this is just something finicky with Motionbuilder 2012?
Please use plain text.
Active Contributor
Trueseer
Posts: 42
Registered: ‎07-22-2008

Re: 2012 crashes when when using SetCharacterizationOn( True )

10-16-2011 07:30 AM in reply to: tonthebone
Try - "char_default.SetCharacterizeOn(1)" - It is work for me :smileyhappy: and yes - 2012 is buggy...
Please use plain text.
Distinguished Contributor
brian1_nc
Posts: 114
Registered: ‎05-16-2008

Re: 2012 crashes when when using SetCharacterizationOn( True )

02-03-2012 04:50 PM in reply to: tonthebone
So, I'm having the exact same problem. In mb2010 this worked fine:


myCharacter.SetCharacterizeOn(True) #turn on Biped


But in mb2012 it crashes MB. I have tried the tricks listed above, but it still crashes. wtf?
MotionBuilder 7.5 thru ...
3dsMax 2.5 thru ...
Please use plain text.