mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
make sure the timeline and custom frame range matched to the export
This commit is contained in:
parent
253ae11736
commit
92d49139a5
2 changed files with 4 additions and 20 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue