user: Show practical ways to work with Header in a Blender add-on or script – include code.

assistant: ### View Menu

Sidebar `N`
:   Shows or hides the [Sidebar Region](../../interface/window_system/regions.xhtml#ui-region-sidebar).

Adjust Last Operation
:   Displays a pop-up panel to alter properties of the last
    completed operation. See [Adjust Last Operation](../../interface/undo_redo.xhtml#bpy-ops-screen-redo-last).

Channels
:   Shows or hides the [Channels Region](channels/introduction.xhtml#editors-graph-editor-channels-region).

Playback Controls
:   Show or hide the [Playback Controls](../../animation/animation_editors.xhtml#animation-editors-footer).

---

Frame Selected `NumpadPeriod`
:   Pans and zooms the view to focus on the selected keyframes.

Frame All `Home`
:   Pans and zooms the view to show all keyframes.

Frame Scene/Preview Range
:   Reset the horizontal view to the current scene frame range,
    taking the preview range into account if it is active.

Go to Current Frame `Numpad0`
:   Centers the area to the Playhead.

---

Realtime Updates
:   Whether to update other views (such as the 3D Viewport) while you’re moving keyframes around.
    If disabled, the other views only get updated once you finish the move.

[image reference removed]

Sliders.

Show Sliders
:   Shows a value slider next to each channel. Adjusting such a slider automatically creates a keyframe.

Auto-Merge Keyframes
:   Automatically merge keyframes that end up on the same frame after transformation.

Auto-Lock Key Axis
:   Automatically locks the movement of keyframes to the axis that best matches the direction
    of the mouse cursor.

---

Show Markers
:   Shows the marker region. When disabled, the [Marker Menu](#marker-menu) is also hidden
    and marker operators are not available in this editor.

Show Cursor
:   Toggles the visibility of the horizontal blue line (see [Playhead & 2D Cursor](#playhead-2d-cursor)).

Use Timecode `Ctrl`-`T`
:   Show timing in seconds instead of frames.
    As an example, the timestamp `01:03+02` means “1 minute, 3 seconds, 2 frames.”

Sync Visible Range
:   Synchronizes the horizontal panning and scale of the editor
    with other time-based editors that also have this option enabled.
    That way, they always show the same section of time.

---

Show Extrapolation
:   Toggles the visibility of the [extrapolated](channels/editing.xhtml#editors-graph-fcurves-settings-extrapolation)
    portion of curves.

Show Handles `Ctrl`-`H`
:   Toggles the display of keyframe handles.

Only Selected Keyframes Handles
:   Only shows the handles for the selected keyframes.

---

Set Preview Range `P`
:   Lets you drag a box to define a time range for previewing. As long as this range is active,
    playback will be limited to it, letting you repeatedly view a segment of the animation without
    having to manually rewind each time.

    You can change the start or end frame using the corresponding button in the
    Timeline editor’s [Playback](../../animation/animation_editors.xhtml#animation-editors-playback) popover.
    Alternatively, you can simply run *Set Preview Range* again.

Clear Preview Range `Alt`-`P`
:   Clears the preview range.

Set Preview Range to Selected `Ctrl`-`Alt`-`P`
:   Applies a preview range that encompasses the selected keyframes.

---

Toggle Dope Sheet
:   Changes the area’s editor to the [Dope Sheet Editor](../dope_sheet/introduction.xhtml).

---

Area
:   Area controls. See the [user interface](../../interface/window_system/areas.xhtml)
    documentation for more information.

### Select Menu

All `A`
:   Selects all keyframes and handles.

None `Alt`-`A`
:   Clears the selection.

Invert `Ctrl`-`I`
:   Inverts the selection.

---

[Box Select](../../interface/selecting.xhtml#bpy-ops-select-box) `B`
:   Lets you drag a box and selects the keyframes and handles inside it.

Box Select (Axis Range) `Alt`-`B`
:   Lets you drag a box and selects the keyframes and handles inside the corresponding time range,
    even if they’re above or below the box.

Box Select (Include Handles)
:   Selects keyframes and their handles inside the defined box.

[Circle Select](../../interface/selecting.xhtml#bpy-ops-select-circle) `C`
:   Displays a circle around the cursor, which you can drag over keyframes and handles to select them.

[Lasso Select](../../interface/selecting.xhtml#bpy-ops-select-lasso) `Ctrl`-`RMB`
:   Lets you draw a freehand shape and selects the keyframes and handles inside it.

---

Columns on Selected Keys `K`
:   Selects keys that are on the same frame as a key that’s already selected.

Column on Current Frame `Ctrl`-`K`
:   Selects all the keys that are on the current frame.

Columns on Selected Markers `Shift`-`K`
:   Selects keys that are on the same frame as a selected [marker](../../animation/markers.xhtml).

Between Selected Markers `Alt`-`K`
:   Selects keys that lie between the leftmost and rightmost selected markers.

---

Before Current Frame `[`
:   Select the keys that lie before (or on) the current frame.
    You can also click `Shift`-`Ctrl`-`LMB` anywhere to the left of the Playhead.

After Current Frame `]`
:   Select the keys that lie after (or on) the current frame.
    You can also click `Shift`-`Ctrl`-`LMB` anywhere to the right of the Playhead.

---

Select Handles
:   Selects the handles of the currently selected keyframes.

Select Keys
:   Selects the keyframes of the currently selected handles.

---

Select More `Ctrl`-`NumpadPlus`
:   Expands the selection to include the neighbors (in time) of the currently selected keys.

Select Less `Ctrl`-`NumpadMinus`
:   Deselects keyframes with fewer than two selected neighbors.

---

Select Linked
:   Selects keys that are on the same curve as a key that’s already selected.

### Marker Menu

[Markers](../../animation/markers.xhtml) are used to denote frames with key points or significant events
within an animation. Like with most animation editors, they’re shown at the bottom.

[image reference removed]

Markers in animation editor.

For descriptions of the different marker tools, see [Editing Markers](../../animation/markers.xhtml#animation-markers-editing).

### Channel Menu

See [Editing Channels](channels/editing.xhtml).

### Key Menu

See [Editing F-Curves](fcurves/editing.xhtml).

### Normalize

Scales the display of each curve so that they all (appear to) occupy the same value range,
going from -1 to 1. This can make editing easier when you’re working with curves whose value
ranges are far apart.

When you enable this option, the view is zoomed accordingly and the area outside the normalized
value range is darkened.

If a preview range is defined, keyframes within the range are normalized,
while the others are scaled proportionally.

#### Auto Normalization

Automatically recalculate curve normalization on every curve edit.

### View Controls

[image reference removed]

View controls.

Show Only Selected
:   Only show curves belonging to objects/bones/… that are selected.

Show Hidden
:   Show keyframes from objects/bones/… that are hidden.

Show Only Errors
:   Only show channels that have errors (for example, because they try to animate a property that doesn’t
    exist on the object).

Create Ghost Curves (framed F-Curve icon)
:   Creates a snapshot of the current curves and shows it in the background
    so that you can use it as a reference. Click the button again to clear the snapshot.

Filter (funnel icon)
:   Search
    :   Filters the channel list by a search term.

    Filtering Collection
    :   Select a collection to only show keyframes from objects in that collection.

    Filter by Type
    :   Filter curves by property type.

    Sort Data-Blocks
    :   Sorts data-blocks alphabetically to make them easier to find.

        If your playback speed suffers because of this
        (should only really be an issue when working with lots of objects),
        you can turn it off.

### Transform Controls

[image reference removed]

Transform controls.

Pivot Point
:   Pivot point for rotating and scaling.

    Bounding Box Center
    :   Center of the smallest possible box around the selected keyframes.

    2D Cursor
    :   The intersection between the Playhead and the horizontal Cursor line.

    Individual Centers
    :   Rotate/scale each handle around its keyframe.

Snap
:   The icon toggles snapping on or off. The dropdown offers the following options:

    Snap To
    :   Type of element to snap to.

        Frame:
        :   Snap to full frames.

        Second:
        :   Snap to seconds.

        Nearest Marker:
        :   Snap to the nearest [Marker](../../animation/markers.xhtml).

    Absolute Time Snap
    :   When disabled, keyframes will move in increments of *Snap To*.
        For example, if you selected *Second* and have a keyframe that’s currently on
        0:06+5, dragging it to the right will snap it to 0:07+5. Its time
        increases by a second, and its subsecond offset of 5 frames remains the same.

        When enabled, keyframes will snap to multiples of *Snap To*.
        Taking the above example, the keyframe would snap to 0:07+0,
        removing the subsecond offset.

Proportional Editing `O`
:   See [Proportional Editing](../3dview/controls/proportional_editing.xhtml).