code tweaks - big roy's comment

This commit is contained in:
Kayla Man 2024-06-11 20:31:44 +08:00
parent d7aa02c3e6
commit 253ae11736

View file

@ -616,8 +616,9 @@ def scene_fps(fps):
Args:
fps (float): fps value
"""
fps_before = rt.frameRate
try:
rt.frameRate = float(get_fps_for_current_context())
rt.frameRate = float(fps)
yield
finally:
rt.frameRate = fps
rt.frameRate = fps_before