mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
older versions of maya get fps from string <-> fps mapping
This commit is contained in:
parent
83224fa85c
commit
928b516ad7
1 changed files with 16 additions and 0 deletions
|
|
@ -1704,6 +1704,14 @@ def set_scene_fps(fps, update=True):
|
|||
|
||||
"""
|
||||
|
||||
fps_mapping = {'15': 'game',
|
||||
'24': 'film',
|
||||
'25': 'pal',
|
||||
'30': 'ntsc',
|
||||
'48': 'show',
|
||||
'50': 'palf',
|
||||
'60': 'ntscf'}
|
||||
|
||||
if fps in FLOAT_FPS:
|
||||
unit = "{}fps".format(fps)
|
||||
|
||||
|
|
@ -1713,6 +1721,14 @@ def set_scene_fps(fps, update=True):
|
|||
else:
|
||||
raise ValueError("Unsupported FPS value: `%s`" % fps)
|
||||
|
||||
# get maya version
|
||||
version = int(cmds.about(version=True))
|
||||
if version < 2018:
|
||||
# pull from mapping
|
||||
unit = fps_mapping.get(str(int(fps)), None)
|
||||
if unit is None:
|
||||
raise ValueError("Unsupported FPS value: `%s`" % fps)
|
||||
|
||||
# Get time slider current state
|
||||
start_frame = cmds.playbackOptions(query=True, minTime=True)
|
||||
end_frame = cmds.playbackOptions(query=True, maxTime=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue