Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Problem with FBAnimationAction enum
  RSS 2.0 ATOM  

Problem with FBAnimationAction enum
Rate this thread
 
23396
 
Permlink of this thread  
avatar
  • Total Posts: 7
  • Joined: 02 August 2007 04:32 AM

Hello,

I am having problems with using the enumeration class: FBAnimationAction. I import the class and it’s clearly recognised since I get no errors with the import. However, when I come to use it in the following bit of code :

oManager.Actors = FBElementAction.kFBElementActionDiscard
oManager.ActorFaces = FBElementAction.kFBElementActionDiscard
oManager.ActorFacesAnimation = FBAnimationAction.kFBAnimationActionConsider
oManager.Audio = FBElementAction.kFBElementActionDiscard

I get this error:

“oManager.ActorFacesAnimation = FBAnimationAction.kFBAnimationActionConsider
UnboundLocalError: local variable ‘FBAnimationAction’ referenced before assignment”

It seems to think that FBAnimationAction is a local variable even though it seems to have been imported successfully. Anyone seen this sort of error before? Thanks.



Replies: 0
avatar
  • CPaulin
  • Posted: 04 March 2009 11:05 AM

Hi,

Witch Version on Mobu are you using, I tried with Mobu2009.b(05.02.2009) and no issue…

from pyfbsdk import *

oManager FBFbxManager()
oManager.Actors FBElementAction.kFBElementActionDiscard 
oManager
.ActorFaces FBElementAction.kFBElementActionDiscard 
oManager
.ActorFacesAnimation FBAnimationAction.kFBAnimationActionConsider 
oManager
.Audio FBElementAction.kFBElementActionDiscard


CHARLES PAULIN | SQA AUTOMATION ANALYST
AUTODESK Media & Entertainment

Replies: 0
avatar

I’m using 7.5, ext 2. Maybe a bug that was fixed in a later version?



Replies: 0
avatar

I’ve found out what the problem is now. Thanks for the help.



Replies: 0