user: What is Playback Controls and how is it used in Blender Python scripting?

assistant: The Playback Controls region of the animation editors (such as the Timeline, Dope Sheet, Graph Editor, and NLA Editor)
contains controls and options related to playback, keying, auto keyframing, and transport.

These settings allow you to:

- Control how animations are previewed and synchronized with audio.
- Insert and manage keyframes through keying sets and auto keying.
- Navigate the timeline using playback and transport controls.
- Adjust frame ranges and preview specific segments of the animation.

The footer is shared across animation editors to provide a consistent workflow for animators,
whether they are editing keyframes, adjusting curves, or sequencing actions.

[image reference removed]

### Playback

Properties for how animations are played.

[image reference removed]

Sync
:   [image reference removed]

    3D Viewport red FPS.

    If animation playback can’t keep up with the desired [Frame Rate](../render/output/properties/format.html#bpy-types-rendersettings-fps),
    the actual frame rate (shown in the top left corner of the 3D Viewport) will turn red,
    and the *Sync* option determines how the situation should be handled.

    Play Every Frame:
    :   Play every frame, even if this results in the animation playing slower than intended.

    Frame Dropping:
    :   Drop frames if playback becomes slower than the scene’s frame rate.

    Sync to Audio:
    :   Drop frames if playback becomes too slow to remain synced with audio.

Audio – Scrubbing
:   Play bits of the sound in the animation (if there is any) while you drag the Playhead around.

Audio – Play Audio
:   Uncheck to mute all sound.

Playback – Limit to Frame Range
:   Don’t allow moving the Playhead outside of the Frame Range using the mouse.

Playback – Follow Current Frame
:   Automatically pan the view to catch up when the Playhead goes off screen.

Play In
:   Which editors to update on each animation frame. If an editor is unchecked,
    it’ll only be updated once playback stops (with some exceptions where it’ll
    update on each frame anyway). When starting playback in either the
    [Graph Editor](../editors/graph_editor/introduction.html),
    [Dope Sheet](../editors/dope_sheet/introduction.html) or the
    [NLA Editor](../editors/nla/introduction.html),
    all editors will play back regardless of the settings.
    This is a feature requested by animators to easily play back all views.

Show – Subframes
:   Display and allow setting fractional frame values for the current frame.

Set Start/End Frame
:   Set the scene’s start/end frame to the current frame.
    If the Preview Range is active (see [Frame Controls](#frame-controls)), that one is changed instead.

### Keying

The *Keying* popover contains options that affect keyframe insertion.

[image reference removed]

Active Keying Set
:   [image reference removed]

    Timeline Keying Sets.

    A *Keying Set* is a named collection of animatable properties. If you select
    one and then press `I` while not hovering over any input field,
    Blender will create keyframes for the properties in that keying set.

    If you don’t have a keying set selected, you’ll get keyframes on a default
    set of properties instead (e.g. Location/Rotation/Scale for objects).

    There are a number of predefined keying sets, but you can also create your own
    in the [Keying Sets](keyframes/keying_sets.html#bpy-types-keyingsets) panel.

    Insert Keyframes `I`
    :   Insert keyframes on the current frame.

    Delete Keyframes `Alt`-`I`
    :   Delete keyframes on the current frame.

New Keyframe Type
:   The [keyframe type](keyframes/introduction.html#keyframe-type) for newly created keyframes.

Cycle-Aware Keying
:   When inserting keyframes into [trivially cyclic curves](../editors/graph_editor/fcurves/modifiers.html#bpy-types-fmodifiercycles),
    special handling is applied to preserve the cycle integrity (most useful while tweaking an established cycle):

    - If a key insertion is attempted outside of the main time range of the cycle,
      it is remapped back inside the range.
    - When overwriting one of the end keys, the other one is updated accordingly.

    In addition, when adding a new curve into an action with a
    [Manual Frame Range](actions.html#bpy-types-action-use-frame-range)
    and *Cyclic Animation* enabled, the curve is automatically made cyclic with the period matching the frame range.
    For convenience, this check and conversion is also done before adding the second keyframe to such a curve.

### Auto Keying

[image reference removed]

Auto Keying button.

When the record button () is enabled, Blender will automatically create keyframes on the current
frame whenever you transform an object or bone in the 3D Viewport (or change one of its transform properties
in the [Properties Editor](../editors/properties_editor.html)).

One special use case is to record a camera path as you fly through the scene.
See [Fly/Walk Navigation](../editors/3dview/navigate/walk_fly.html#dview-fly-walk).

Mode
:   Add & Replace:
    :   Add or replace keyframes as needed.

    Replace:
    :   Only replace existing keyframes.

Only Active Keying Set
:   By default, Auto Keying will create keyframes even for properties that are not in the
    [active keying set](#bpy-types-keyingsetsall-active). Use this checkbox to change that.

Layered Recording
:   Adds a new [NLA Track](../editors/nla/tracks.html) for every pass made over the animation
    to allow non-destructive tweaking.

### Transport Controls

These buttons are used to set the current frame and control playback.

[image reference removed]

Transport controls.

Jump to Start `Shift`-`Left`
:   Sets the Playhead to the start of the frame range.

Jump to Previous Keyframe `Up`
:   Moves the Playhead to the previous keyframe.

Rewind `Shift`-`Ctrl`-`Spacebar`
:   Starts playing the animation in reverse.

Play `Spacebar`
:   Starts playing the animation.

Pause `Spacebar`
:   Stops playing the animation.

Jump to Next Keyframe `Down`
:   Moves the Playhead to the next keyframe.

Jump to End `Shift`-`Right`
:   Sets the Playhead to the end of the frame range.

Jump Backward by Delta `Ctrl`-`Left`
:   Jumps the playhead backwards by a user-configured delta.

Jump Forward by Delta `Ctrl`-`Right`
:   Jumps the playhead forward by a user-configured delta.

Additionally, there is a menu accessible to the right of the Jump by Delta buttons where their delta can be set:

[image reference removed]

### Frame Controls

Current Frame `Alt`-`Wheel`
:   The number of the frame that’s currently being displayed in the 3D Viewport.
    This is also the location of the Playhead.

Use Preview Range
:   The Preview Range is an alternative Frame Range that you can use for focusing on a
    particular part of the animation. It lets you repeatedly play a short segment without
    having to manually rewind or change the frame range of the entire scene.

    This range only affects the preview in the 3D Viewport; it doesn’t affect rendering.

    The boundaries of the Preview Range are shown in dark orange. You can quickly configure
    and enable it by pressing `P` and dragging a box. To disable it,
    you can press `Alt`-`P`.

Start, End
:   The start/end frame of the scene (or the preview range, if active).