From 64e86e39881392ae80883588387ec3ac4bb18df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Tue, 29 Oct 2019 15:41:45 +0000 Subject: [PATCH] fixed Maya set fps --- pype/maya/lib.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pype/maya/lib.py b/pype/maya/lib.py index 55a138428b..b9387b65fd 100644 --- a/pype/maya/lib.py +++ b/pype/maya/lib.py @@ -1774,6 +1774,11 @@ def set_scene_fps(fps, update=True): '48000': '48000fps'} # pull from mapping + # this should convert float string to float and int to int + # so 25.0 is converted to 25, but 23.98 will be still float. + decimals = int(str(fps-int(fps))[2:]) + if decimals == 0: + fps = int(fps) unit = fps_mapping.get(str(fps), None) if unit is None: raise ValueError("Unsupported FPS value: `%s`" % fps)