Quick use

Add a brief confirmation after a PME command:

overlay("Snapping: Face", alignment="TOP", duration=2.0, offset_y=80)

Or combine feedback with a short action:

bpy.ops.wm.tool_set_by_id(name="builtin.select_box"); overlay("Tool: Select Box")

overlay() gives transient feedback: a mode chosen, a preset applied, or a Macro step reached. Use another UI element for status that must remain visible.

Arguments

overlay(text, alignment="TOP", duration=2.0, offset_x=10, offset_y=10)
ArgumentMeaning
textMessage to display.
alignmentTOP, TOP_LEFT, TOP_RIGHT, CENTER, BOTTOM, BOTTOM_LEFT, or BOTTOM_RIGHT.
durationSeconds before the message disappears; the current operator accepts values of at least one second.
offset_xHorizontal pixel offset for LEFT, RIGHT, and CENTER alignments. Plain TOP and BOTTOM stay horizontally centered and ignore it.
offset_yVertical pixel offset from the selected anchor.

Omitted presentation values use the user’s PME Overlay preferences.

Design the message for recognition

  • State the result: "Pivot: Cursor" is more useful than "Command complete".
  • Keep the text short enough to read without stopping the task.
  • Use one placement consistently for the same kind of feedback.
  • Announce a meaningful change once rather than every internal Macro step.

Overlay text and timer state are shared by Blender editor area type, not by each individual editor area. Calling overlay() again from the same area type updates that shared message and resets its timer. This makes successive choices readable without stacking a column of stale notifications.

Limits

  • The public API has no immediate-dismiss argument, so choose a short duration. Use live UI when the status must remain visible.
  • The helper draws in supported Blender editor areas and needs a valid interactive area.
  • Compute the resulting state first, then display a message that describes it.
  • Long conditional expressions that both mutate data and compose a message are hard to trust. Move that logic to a readable external script.
  • For a state that must remain visible until it changes, use a Popup Dialog, Panel Group, or a dedicated Blender drawing handler rather than extending duration.

Sources