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® / Autodesk MotionBuilder through 7.x / How to get total frames with C++ in mb 7.5 ext2
  RSS 2.0 ATOM  

How to get total frames with C++ in mb 7.5 ext2
Rate this thread
 
46930
 
Permlink of this thread  
avatar
  • will.mi
  • Posted: 04 September 2010 09:41 PM
  • Total Posts: 4
  • Joined: 05 September 2010 04:32 AM

I try to get the total frames in transport control.
As some topic shows it can be down as this:

to get current time you can use FBSystem().LocalTime
to set current time you can use FBPlayerControl().Goto(<FBTime time>)

to get frame of the FBTime variable - frame = time.GetFrame(True)
to set frame for the FBTime variable - time.Set(0,0,0,frame)

SoI try to use:
FBPropertyTime starttime = FBPlayerControl().ZoomWindowStart;
FBPropertyTime stoptime = FBPlayerControl().ZoomWindowStop;

But FBPropertyTime don’t have functon GetFrame()
so how can i transform FBPropertyTime to FBTime
or any other way to get the total frames to render in transpaort control.



Replies: 0
avatar

Have you tried just casting it to a Time? 

i.e.

frame FBTime(FBPropertyTime).GetFrame();


Replies: 0
avatar
  • will.mi
  • Posted: 25 September 2010 10:09 PM

I fixed it, use getData



Replies: 0