From d08c979a2145ea46d66c52408913081d3f4486e6 Mon Sep 17 00:00:00 2001 From: Toke Stuart Jepsen Date: Mon, 20 Feb 2023 08:07:38 +0000 Subject: [PATCH] Fix setting scene fps with float input --- openpype/hosts/maya/api/lib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 84c6e6929d..509168278c 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -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 = []