simvx.editor.project

Project Session — Scene I/O, project settings, and recent files.

Module Contents

Classes

ProjectMetadata

Persistent project-level configuration stored in simvx.toml.

ProjectSession

Higher-level project and scene operations.

Data

log

API

simvx.editor.project.log

‘getLogger(…)’

class simvx.editor.project.ProjectMetadata[source]

Persistent project-level configuration stored in simvx.toml.

project_name: str

‘Untitled Project’

default_scene: str = <Multiline-String>
physics_fps: int

60

window_width: int

1280

window_height: int

720

gravity: float

9.8

engine_version: str = <Multiline-String>
classmethod from_dict(data: dict) simvx.editor.project.ProjectMetadata[source]

Create from a dict, ignoring unknown keys for forward compat.

class simvx.editor.project.ProjectSession[source]

Higher-level project and scene operations.

All public methods accept an State so the session stays stateless with respect to the scene — easy to test and re-entrant.

Initialization

new_scene(state: simvx.editor.state.State) None[source]

Create a fresh scene with a single root Node3D.

open_scene(state: simvx.editor.state.State) None[source]

Emit open_file_requested so the editor shows a FileDialog.

save_scene(state: simvx.editor.state.State) bool[source]

Save directly if path exists, otherwise trigger save-as.

save_scene_as(state: simvx.editor.state.State) None[source]

Emit save_file_requested so the editor shows a FileDialog.

add_recent(path: str) None[source]

Add path to the front of the recent list (dedup, max 10).

property recent_files: list[str][source]

Ordered recent-files list (defensive copy).

clear_recent_files() None[source]

Clear the recent-files list.

load_project(path: str | pathlib.Path) bool[source]

Load simvx.toml from directory path (or a direct file path).

save_project(path: str | pathlib.Path) bool[source]

Save simvx.toml into directory path. Returns True on success.

get_window_title(state: simvx.editor.state.State) str[source]

Return ‘SimVX Editor - scene_name*’ (asterisk if modified).

static get_scene_node_count(state: simvx.editor.state.State) int[source]

Count every node in the current scene (including root).