reset frame range & frame rate for the correct frame range & fps value

This commit is contained in:
Kayla Man 2024-06-13 14:25:57 +08:00
parent e8107e2b97
commit edd19c3135

View file

@ -7,7 +7,7 @@ Because of limited api, alembics can be only loaded, but not easily updated.
import os
from ayon_core.pipeline import load, get_representation_path
from ayon_max.api import lib, maintained_selection
from ayon_max.api.lib import unique_namespace
from ayon_max.api.lib import unique_namespace, reset_frame_range
from ayon_max.api.pipeline import (
containerise,
get_previous_loaded_object,
@ -38,12 +38,9 @@ class AbcLoader(load.LoaderPlugin):
}
rt.AlembicImport.ImportToRoot = False
product_fps = float(context["version"]["attrib"].get("fps"))
if product_fps is None:
# Just stick to current scene FPS
product_fps = float(rt.frameRate)
# TODO: remove after the post-system fps setup
rt.frameRange = product_fps
# TODO: it will be removed after the improvement
# on the post-system setup
reset_frame_range()
rt.importFile(file_path, rt.name("noPrompt"), using=rt.AlembicImport)
abc_after = {