generated from ynput/ayon-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Open
Copy link
Labels
communityIssues and PRs coming from the community membersIssues and PRs coming from the community memberstype: enhancementImprovement of existing functionality or minor additionImprovement of existing functionality or minor addition
Description
Is there an existing issue for this?
- I have searched the existing issues and added correct labels.
Please describe the feature you have in mind and explain what the current shortcomings are?
For now, "timeline bar playback" and "render range" are controlled together by one server settings.
maya_0.4.9\ayon_maya\api\lib_rendersettings.py
def reset_frame_range(playback=True, render=True, fps=True):
"""Set frame range to current folder.
Args:
playback (bool, Optional): Whether to set the maya timeline playback
frame range. Defaults to True.
render (bool, Optional): Whether to set the maya render frame range.
Defaults to True.
fps (bool, Optional): Whether to set scene FPS. Defaults to True.
"""
if fps:
set_scene_fps(get_fps_for_current_context())
frame_range = get_frame_range(include_animation_range=True)
if not frame_range:
# No frame range data found for folder
return
frame_start = frame_range["frameStart"]
frame_end = frame_range["frameEnd"]
animation_start = frame_range["animationStart"]
animation_end = frame_range["animationEnd"]
if playback:
cmds.playbackOptions(
minTime=frame_start,
maxTime=frame_end,
animationStartTime=animation_start,
animationEndTime=animation_end
)
cmds.currentTime(frame_start)
if render:
cmds.setAttr("defaultRenderGlobals.startFrame", animation_start)
cmds.setAttr("defaultRenderGlobals.endFrame", animation_end)Say, I want to include frame handle on playback for point cache export.
But not with render range when rendering exr.
Might be like this
if playback:
cmds.playbackOptions(
minTime=frame_start,
maxTime=frame_end,
animationStartTime=animation_start,
animationEndTime=animation_end
)
cmds.currentTime(frame_start)
if render:
cmds.setAttr("defaultRenderGlobals.startFrame", frame_start)
cmds.setAttr("defaultRenderGlobals.endFrame", frame_end)Suggested implementation?
No response
Describe alternatives you've considered:
No response
Metadata
Metadata
Assignees
Labels
communityIssues and PRs coming from the community membersIssues and PRs coming from the community memberstype: enhancementImprovement of existing functionality or minor additionImprovement of existing functionality or minor addition
