Skip to content

Separate Control of "Include/Exclude Handles in default playback & render range" #308

@SeanGoToTerminus

Description

@SeanGoToTerminus

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.

Image

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

No one assigned

    Labels

    communityIssues and PRs coming from the community memberstype: enhancementImprovement of existing functionality or minor addition

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions