Motion Builder 2019 Python setting custom framerate for plot options

212 views Asked by At

I believe when setting plot options you set the fps using plot period with FBTime and an FBTimeMode. This seems to work for all preset time modes, but when setting to custom I can't figure out how to set the fps of the custom time mode.

lOptions = FBPlotOptions ()
lOptions.PlotPeriod = FBTime(0,0,0,0,0,FBTimeMode.kFBTimeModeCustom)

In the documentation I see an example of FBTime being initialized with a spot for framerate but in mobu it's saying it's improper.

FBTime (int pHour, int pMinute, int pSecond=0, int pFrame=0, int pField=0, FBTimeMode pTimeMode=kFBTimeModeDefault, float pFramerate=0.0)

lOptions = FBPlotOptions ()
lOptions.PlotPeriod = FBTime(0,0,0,0,0,FBTimeMode.kFBTimeModeCustom,240.0)

This doesn't work. Anyone have any ideas or is there another option besides PlotPeriod?

1

There are 1 answers

0
Joshua Guenard On BEST ANSWER

Couldn't figure out a nice way to do it, but I was able to use a popup window, enter desired settings and then print the plot period from the popup and found that the plot period I wanted was FBTime(588000).

from pyfbsdk import *

lPopup = FBPlotPopup()
lPopup.Popup("Options")
lOptions = lPopup.GetPlotOptions()
print(lOptions.PlotPeriod)