Hi all,
I tried to use this snippet in userSetup.py to make frame rate set to 25 when opening a new maya scene. But it doesn't work at all:
import maya.cmds as cmds
cmds.currentUnit(time='pal')
Also I tried the mel equivalent in userSetup.mel but also doesn't work. Just wondering is it possible to change frame rate when launching Maya ?
Solved! Go to Solution.
Solved by huseila. Go to Solution.
It might be the new scene setting that is on by default to reset your working units. It's oddly separate from your global prefs. Go to File > New Scene > options to disable it.
OK, I think this snippet works in userSetup.py
import maya.cmds as cmds
import maya.utils
def set_fps(fps_name):
cmds.currentUnit(time=fps_name)
# Get project fps data from server. It could be "film", "pal", "ntsc"
# The key point to drive "cmds.currentUnit" work is using "maya.utils.executeDeferred"
maya.utils.executeDeferred(lambda *args: set_fps(fps_name_from_server))
Can't find what you're looking for? Ask the community or share your knowledge.