diff --git a/server_addon/max/client/ayon_max/api/lib.py b/server_addon/max/client/ayon_max/api/lib.py index 03310ff16f..7c140be72e 100644 --- a/server_addon/max/client/ayon_max/api/lib.py +++ b/server_addon/max/client/ayon_max/api/lib.py @@ -607,18 +607,3 @@ def suspended_refresh(): finally: rt.enableSceneRedraw() rt.resumeEditing() - - -@contextlib.contextmanager -def scene_fps(fps): - """Set scene fps during context - - Args: - fps (float): fps value - """ - fps_before = rt.frameRate - try: - rt.frameRate = float(fps) - yield - finally: - rt.frameRate = fps_before diff --git a/server_addon/max/client/ayon_max/plugins/load/load_pointcache.py b/server_addon/max/client/ayon_max/plugins/load/load_pointcache.py index 498c5c6ce7..3eb4ba3323 100644 --- a/server_addon/max/client/ayon_max/plugins/load/load_pointcache.py +++ b/server_addon/max/client/ayon_max/plugins/load/load_pointcache.py @@ -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, scene_fps +from ayon_max.api.lib import unique_namespace from ayon_max.api.pipeline import ( containerise, get_previous_loaded_object, @@ -42,10 +42,9 @@ class AbcLoader(load.LoaderPlugin): if product_fps is None: # Just stick to current scene FPS product_fps = float(rt.frameRate) - with scene_fps(product_fps): - rt.importFile(file_path, - rt.name("noPrompt"), - using=rt.AlembicImport) + # TODO: remove after the post-system fps setup + rt.frameRange = product_fps + rt.importFile(file_path, rt.name("noPrompt"), using=rt.AlembicImport) abc_after = { c