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® / Open Reality / Motionbuilders Evaluation of code?
  RSS 2.0 ATOM  

Motionbuilders Evaluation of code?
Rate this thread
 
59721
 
Permlink of this thread  
avatar
  • Tistatos
  • Posted: 05 September 2011 08:47 PM
  • Total Posts: 44
  • Joined: 07 January 2009 01:31 PM

I’d like to get some insight in why these sort of things happens:
Pseudocode

1. FBGotToFrame(10);
2. int xValue character.GetPositionX();

Switching to a frame on the timeline(row 1) and ask for a certain value(row 2). Motionbuilder will be able to evaluate row 2 before row 1 has finished executing, giving me the wrong value.

I’ve found alot of situations where this happen, but the question is why does this happen? Is it due to Motionbuilder being very “thread-heavy” and this i caused because the two rows are evaluated in different threads?

Most of these i’ve been able to get passed by going another way where in don’t have to ask motionbuilder to do something for me… So no need for answers how i solved this specific problem.



Replies: 0
avatar
  • qhliao
  • Posted: 01 October 2011 05:21 AM

Change frame in python won’t automatically invoke the scene evaluation. You need to call FBScene.Evaluate() to ensure the animation get updated.




Replies: 0