simvx.editor.demo_steps

Editor-specific demo step types for scripted editor demos.

Provides high-level declarative steps (AddNode, SetProperty, SelectNode, etc.) that operate through EditorState methods rather than raw UI pixel clicks. Eliminates the need for helper functions and hardcoded layout coordinates.

Usage: from simvx.editor.demo_steps import register_editor_steps, AddNode, SetProperty, … register_editor_steps() steps = [AddNode(“Label”, parent_path=”Layout”, name=”Title”), …]

Module Contents

Classes

AddNode

Add a node to the scene via state.add_node().

RenameNode

Rename a node via state.rename_node().

SelectNode

Select a node via state.selection.select().

SetProperty

Set a Property-descriptor value via state.set_node_property().

AssertProperty

Assert a node property equals expected, with actual-value diagnostics.

SetScript

Set the code viewport text via state.set_script_text().

PlayScene

Enter play mode via state.play_scene().

StopScene

Exit play mode via state.stop_scene().

SwitchViewport

Switch viewport mode (“3d”, “2d”, or “code”).

AssertTree

Verify scene tree structure.

PlaceNode

Add a node at a specific position (mouse-placement style).

ConfigureNode

Bulk-set attributes on a node (for non-Property attrs like colors).

AssertConfig

Verify multiple properties on a node match expected values.

ClickAddButton

Click the ‘+’ button in the Scene Tree to open the Add Node dialog.

DialogSelect

Type filter text and click a type row in the open Add Node dialog.

ClickTreeItem

Click a node in the scene tree by path to select it.

InspectorRename

Click the inspector name field and type a new name.

InspectorEdit

Edit a property via the inspector widget (SpinBox, TextEdit, or Slider).

InspectorSetColor

Set a color via the inspector ColorPicker hex input (click hex field, type value, enter).

ClickToolbar

Click a named toolbar button (‘Play’, ‘Stop’, ‘Pause’, ‘3D’, ‘2D’, ‘Code’).

ClickInspectorButton

Click a button by text label in the inspector panel.

PasteInEditor

Paste content into the active code editor via clipboard + Ctrl+A/Ctrl+V.

ClickViewport3D

Click at a 3D world position in the viewport during play mode.

ClickMenu

Click a menu label on the MenuBar, then click an item in the dropdown.

NewSceneSelect

Click a row in the NewSceneDialog to choose a root type.

Functions

register_editor_steps

Register all editor step handlers with DemoRunner.

Data

API

simvx.editor.demo_steps.log

‘getLogger(…)’

class simvx.editor.demo_steps.AddNode

Add a node to the scene via state.add_node().

type_name: str

None

parent_path: str = <Multiline-String>
name: str = <Multiline-String>
class simvx.editor.demo_steps.RenameNode

Rename a node via state.rename_node().

path: str

None

new_name: str

None

class simvx.editor.demo_steps.SelectNode

Select a node via state.selection.select().

path: str

None

class simvx.editor.demo_steps.SetProperty

Set a Property-descriptor value via state.set_node_property().

path: str

None

prop: str

None

value: object

None

class simvx.editor.demo_steps.AssertProperty

Assert a node property equals expected, with actual-value diagnostics.

path: str

None

prop: str

None

expected: object

None

tolerance: float

0.5

message: str = <Multiline-String>
class simvx.editor.demo_steps.SetScript

Set the code viewport text via state.set_script_text().

text: str

None

class simvx.editor.demo_steps.PlayScene

Enter play mode via state.play_scene().

class simvx.editor.demo_steps.StopScene

Exit play mode via state.stop_scene().

class simvx.editor.demo_steps.SwitchViewport

Switch viewport mode (“3d”, “2d”, or “code”).

mode: str

None

class simvx.editor.demo_steps.AssertTree

Verify scene tree structure.

expected maps path -> type_name or path -> (type_name, child_count).

expected: dict

None

message: str = <Multiline-String>
class simvx.editor.demo_steps.PlaceNode

Add a node at a specific position (mouse-placement style).

type_name: str

None

x: float

0.0

y: float

0.0

parent_path: str = <Multiline-String>
name: str = <Multiline-String>
class simvx.editor.demo_steps.ConfigureNode

Bulk-set attributes on a node (for non-Property attrs like colors).

path: str

None

props: dict

‘field(…)’

class simvx.editor.demo_steps.AssertConfig

Verify multiple properties on a node match expected values.

path: str

None

props: dict

‘field(…)’

message: str = <Multiline-String>
class simvx.editor.demo_steps.ClickAddButton

Click the ‘+’ button in the Scene Tree to open the Add Node dialog.

class simvx.editor.demo_steps.DialogSelect

Type filter text and click a type row in the open Add Node dialog.

type_name: str

None

class simvx.editor.demo_steps.ClickTreeItem

Click a node in the scene tree by path to select it.

path: str

None

class simvx.editor.demo_steps.InspectorRename

Click the inspector name field and type a new name.

new_name: str

None

class simvx.editor.demo_steps.InspectorEdit

Edit a property via the inspector widget (SpinBox, TextEdit, or Slider).

prop: str

None

value: object

None

component: int

None

class simvx.editor.demo_steps.InspectorSetColor

Set a color via the inspector ColorPicker hex input (click hex field, type value, enter).

prop: str

None

color: tuple

None

class simvx.editor.demo_steps.ClickToolbar

Click a named toolbar button (‘Play’, ‘Stop’, ‘Pause’, ‘3D’, ‘2D’, ‘Code’).

name: str

None

class simvx.editor.demo_steps.ClickInspectorButton

Click a button by text label in the inspector panel.

label: str

None

class simvx.editor.demo_steps.PasteInEditor

Paste content into the active code editor via clipboard + Ctrl+A/Ctrl+V.

content: str

None

class simvx.editor.demo_steps.ClickViewport3D

Click at a 3D world position in the viewport during play mode.

Projects world_pos to screen coordinates using the playing scene’s camera, moves the cursor there, and calls input_cast() for 3D picking.

world_pos: tuple[float, float, float]

None

class simvx.editor.demo_steps.ClickMenu

Click a menu label on the MenuBar, then click an item in the dropdown.

menu_name: str

None

item_text: str

None

class simvx.editor.demo_steps.NewSceneSelect

Click a row in the NewSceneDialog to choose a root type.

root_type: str

None

simvx.editor.demo_steps.register_editor_steps()

Register all editor step handlers with DemoRunner.

simvx.editor.demo_steps.__all__

[‘AddNode’, ‘PlaceNode’, ‘RenameNode’, ‘SelectNode’, ‘SetProperty’, ‘AssertProperty’, ‘SetScript’, ‘…