I’m having a frustrating little issue trying to get the frame rate of my scene. The documentation is a little confusing since it doesn’t specify a type for the return for playbackSpeed(). Someone from Autodesk told me that it’s supposed to return an MTime. But when I try it with the code below I only get a return of 0. I’m hoping someone can help me out. Thanks!
OK, it’s actually returning an index to that Playback speed attribute. So how does one get the frame rate? I don’t see that method in the docs anywhere.
The MTime static function uiUnit will return the enum associated with the time mode of the scene which essentially correlates to a frameRate.
Unfortunately I didn’t see anything that returns the frameRate in the SDK. In your shoes I would map the enum to a frameRate. Maybe its a global somewhere in a header file. Another option is to see if you can get the frameRate from ticksPerSecond()? In 3dsMax I remember having to multiply this constant by some factor that was passed by the timeMode.