Fix setting scene fps with float input

This commit is contained in:
Toke Stuart Jepsen 2023-02-20 08:07:38 +00:00 committed by Milan Kolar
parent e018751927
commit d08c979a21

View file

@ -1997,7 +1997,7 @@ def set_scene_fps(fps, update=True):
'48000': '48000fps'
}
unit = fps_mapping.get(str(fps), None)
unit = fps_mapping.get(str(convert_to_maya_fps(fps)), None)
if unit is None:
raise ValueError("Unsupported FPS value: `%s`" % fps)
@ -3454,11 +3454,11 @@ def convert_to_maya_fps(fps):
# If input fps is a whole number we'll return.
if float(fps).is_integer():
# Validate fps is part of Maya's fps selection.
if fps not in int_framerates:
if int(fps) not in int_framerates:
raise ValueError(
"Framerate \"{}\" is not supported in Maya".format(fps)
)
return fps
return int(fps)
else:
# Differences to supported float frame rates.
differences = []