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

assistant: [image reference removed]

Object Mode header.

The header contains various menus and controls based on
the current [mode](modes.xhtml).
Its items are split into three groups:

### Mode & Menus

Mode `Ctrl`-`Tab`
:   The 3D Viewport has several [modes](modes.xhtml)
    used for editing different kinds of data. For example, the default Object Mode
    would let you place a character in the scene, while Pose Mode would allow
    you to pose it.

    The shortcut `Ctrl`-`Tab` brings up a pie menu for quick mode switching.
    If you have an [Armature](../../animation/armatures/introduction.xhtml) selected,
    it’ll instead switch between Object Mode and Pose Mode.

    Pressing `Tab` will switch between Object Mode and Edit Mode for objects
    that support it.

View
:   This menu offers tools for [navigating](navigate/introduction.xhtml) in 3D space.

The other menus depend on the current mode, Object Mode menus listed below:

Select
:   Contains tools for [selecting](../../scene_layout/object/selecting.xhtml#object-select-menu) objects.

Add `Shift`-`A`
:   Contains a list of different [objects types](../../scene_layout/object/types.xhtml#objects-types) that can be added to the scene.

Object
:   Contains tools for operating on [objects](../../scene_layout/object/editing/transform/introduction.xhtml),
    such as duplicating them. A subset of these tools can also be accessed by right-clicking
    in the 3D Viewport.

### Transform Controls

Transform Orientation `Comma`
:   Used to change the [Transform Orientation](controls/orientation.xhtml),
    which affects the rotation of the transform gizmo.

Pivot Point `Period`
:   Used to change the [Pivot Point](controls/pivot_point/index.xhtml),
    which affects the location of the transform gizmo.

Snapping `Shift`-`Tab`
:   Offers options for [snapping](controls/snapping.xhtml) items
    to others that are nearby. You can hold `Ctrl` to toggle snapping on/off temporarily
    (as long as the key is held).

Proportional Editing `O`
:   Used to smoothly transform unselected items that are near the selected ones.
    See [Proportional Editing](controls/proportional_editing.xhtml).

### Display & Shading

Object Type Visibility
:   Change which types of objects are visible/selectable in the 3D Viewport.
    See [Object Type Visibility](display/visibility.xhtml).

Viewport Gizmos
:   Change how [gizmos](display/gizmo.xhtml) are
    displayed in the 3D Viewport.

Viewport Overlays
:   Change how [overlays](display/overlays.xhtml) are
    displayed in the 3D Viewport.

Toggle X-Ray `Alt`-`Z`
:   Make the whole scene transparent, allowing you to see and select items that would otherwise be occluded.
    This is a shortcut to the [X-Ray](display/shading.xhtml#bpy-types-view3dshading-show-xray)
    option which can be found inside the Viewport Shading popover (see below).

    In Pose Mode, this same button controls a different setting with its own separate on/off state.
    Rather than making the scene transparent, it shows the armature in front of any geometry.

Viewport Shading
:   Change the [shading](display/shading.xhtml) of the 3D Viewport.