Merge pull request #5187 from ynput/bugfix/OP-6244_Bug-3dsmax---OP-Menu-Set-Frame-Range-doesnt-work-in-Max-2024

This commit is contained in:
Milan Kolar 2023-06-28 16:58:43 +02:00 committed by GitHub
commit 2d91685eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -250,10 +250,7 @@ def reset_frame_range(fps: bool = True):
frame_range["handleStart"]
)
frame_end_handle = frame_range["frameEnd"] + int(frame_range["handleEnd"])
frange_cmd = (
f"animationRange = interval {frame_start_handle} {frame_end_handle}"
)
rt.Execute(frange_cmd)
set_timeline(frame_start_handle, frame_end_handle)
set_render_frame_range(frame_start_handle, frame_end_handle)
@ -285,3 +282,10 @@ def get_max_version():
"""
max_info = rt.MaxVersion()
return max_info[7]
def set_timeline(frameStart, frameEnd):
"""Set frame range for timeline editor in Max
"""
rt.animationRange = rt.interval(frameStart, frameEnd)
return rt.animationRange