simvx.editor.panels.inspector_sections._base

Inspector section registry – extensible node-type-specific inspector sections.

Each InspectorSection subclass handles a specific node type or pattern. The inspector queries the registry via get_sections_for_node(node) and calls build_rows() to create the section widgets.

Sections are registered with the @register_inspector_section decorator.

Module Contents

Classes

InspectorContext

Helper passed to InspectorSection.build_rows().

InspectorSection

Base class for node-type-specific inspector sections.

Functions

register_inspector_section

Decorator to register an InspectorSection subclass.

get_sections_for_node

Return instantiated sections applicable to the given node, sorted by priority.

Data

API

simvx.editor.panels.inspector_sections._base.__all__

[‘InspectorContext’, ‘InspectorSection’, ‘register_inspector_section’, ‘get_sections_for_node’, ‘_fo…

simvx.editor.panels.inspector_sections._base.log

‘getLogger(…)’

class simvx.editor.panels.inspector_sections._base.InspectorContext(inspector)[source]

Helper passed to InspectorSection.build_rows().

Provides undo-aware property editing without exposing PropertiesPanel internals.

Initialization

on_property_changed(node: simvx.core.Node, prop: str, old_val: Any, new_val: Any)[source]

Push a PropertyCommand through the undo stack.

on_callable_command(do_fn, undo_fn, description: str)[source]

Push a CallableCommand through the undo stack.

on_material_prop_changed(node, prop: str, value: Any)[source]

Handle material sub-object property change with undo.

on_material_colour_changed(node, new_colour: tuple)[source]

Handle material colour change with undo.

on_material_texture_changed(node, attr: str, path: str | None)[source]

Handle material texture URI change with undo.

rebuild()[source]

Request full inspector rebuild.

property editor_state[source]
register_widget(key: str, widget: simvx.core.Control)[source]

Register a widget in the inspector’s _property_widgets dict.

property property_changed_signal: simvx.core.Signal[source]
class simvx.editor.panels.inspector_sections._base.InspectorSection[source]

Base class for node-type-specific inspector sections.

Subclasses override can_handle(), build_rows(), and optionally handled_properties() to claim properties from the generic section.

section_title: str

‘Section’

priority: int

0

abstractmethod can_handle(node: simvx.core.Node) bool[source]
abstractmethod build_rows(node: simvx.core.Node, ctx: simvx.editor.panels.inspector_sections._base.InspectorContext) list[simvx.core.Control][source]
handled_properties(node: simvx.core.Node) set[str][source]

Property names this section manages (excluded from generic section).

simvx.editor.panels.inspector_sections._base.register_inspector_section(cls: type[simvx.editor.panels.inspector_sections._base.InspectorSection]) type[simvx.editor.panels.inspector_sections._base.InspectorSection][source]

Decorator to register an InspectorSection subclass.

simvx.editor.panels.inspector_sections._base.get_sections_for_node(node: simvx.core.Node) list[simvx.editor.panels.inspector_sections._base.InspectorSection][source]

Return instantiated sections applicable to the given node, sorted by priority.