Updated method to get correct FPS from abc file

This commit is contained in:
FadyFS 2023-06-08 16:28:56 +02:00
parent dce5483919
commit 786ee1bf37

View file

@ -17,7 +17,6 @@ from openpype.hosts.maya.api.lib import (
)
from openpype.hosts.maya.api.pipeline import containerise
def is_sequence(files):
sequence = False
if len(files) == 1:
@ -28,13 +27,6 @@ def is_sequence(files):
sequence = True
return sequence
def get_fps(standin_shape):
fps = convert_to_maya_fps(
float(legacy_io.Session.get("AVALON_FPS", 25))
)
return fps
class ArnoldStandinLoader(load.LoaderPlugin):
"""Load as Arnold standin"""
@ -96,9 +88,8 @@ class ArnoldStandinLoader(load.LoaderPlugin):
sequence = is_sequence(os.listdir(os.path.dirname(self.fname)))
cmds.setAttr(standin_shape + ".useFrameExtension", sequence)
cmds.setAttr(standin_shape + ".dso", path, type="string")
matching_fps = get_fps(os.listdir(os.path.dirname(self.fname)))
cmds.setAttr(standin_shape + ".abcFPS", matching_fps)
fps = float(version["data"]["fps"])
cmds.setAttr(standin_shape + ".abcFPS", fps)
nodes = [root, standin, standin_shape]
if operator is not None: