AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / 2012 crashes when when using SetCharacterizationOn( True )
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

2012 crashes when when using SetCharacterizationOn( True )
Rate this thread
 
60400
 
Permlink of this thread  
avatar
  • Total Posts: 34
  • Joined: 08 January 2007 12:09 PM

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 )



Attachment Attachment
Attachment Attachment
Attachment Attachment
Replies: 0
avatar

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?



Replies: 1
/img/forum/light/default_avatar.png

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?

Author: tonthebone

Replied: 04 October 2011 10:22 AM  
avatar
  • Trueseer
  • Posted: 16 October 2011 03:30 AM

Try - “char_default.SetCharacterizeOn(1)” - It is work for me :) and yes - 2012 is buggy…



Replies: 0
avatar

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 ...

Replies: 0