All docs
Context·
property
Context.panel
the View this call originates from (a location=sidebar form)
Python
panel: View | None
Returns View — the originating View (docked in the sidebar), or None. There is no Panel class; the value is a View.
Example#
Python
@tool.view("demo/inspector", location="sidebar")
def inspector(ctx: Context):
origin = ctx.panel # the View this call came from (docked in the sidebar)
Notes#
A lazily populated slot — set to the originating View when the handler is dispatched from a
@tool.view(location="sidebar") surface (informally a panel), and None otherwise. There is no
Panel class; the attribute keeps its panel name for the docked-sidebar sense, but the value is a
View.
See also#
Guides: Commands & actions
By LSD Team · Last updated Jul 18, 2026
Ask on Discord
View as Markdown