new fps getter

This commit is contained in:
FadyFS 2023-06-08 17:42:05 +02:00
parent 786ee1bf37
commit bf15830a9a

View file

@ -27,6 +27,10 @@ def is_sequence(files):
sequence = True
return sequence
def get_current_fps():
session_fps = float(legacy_io.Session.get('AVALON_FPS', 25))
return convert_to_maya_fps(session_fps)
class ArnoldStandinLoader(load.LoaderPlugin):
"""Load as Arnold standin"""
@ -88,7 +92,9 @@ class ArnoldStandinLoader(load.LoaderPlugin):
sequence = is_sequence(os.listdir(os.path.dirname(self.fname)))
cmds.setAttr(standin_shape + ".useFrameExtension", sequence)
fps = float(version["data"]["fps"])
fps = float(version["data"].get("fps"))
if fps is None:
fps = get_current_fps()
cmds.setAttr(standin_shape + ".abcFPS", fps)
nodes = [root, standin, standin_shape]