simvx.editor.project

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

Module Contents

Classes

EditorProjectMeta

Persistent project-level configuration stored in project.simvx.

ProjectManager

Higher-level project and scene operations.

Data

log

API

simvx.editor.project.log

‘getLogger(…)’

class simvx.editor.project.EditorProjectMeta

Persistent project-level configuration stored in project.simvx.

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

to_dict() dict
classmethod from_dict(data: dict) simvx.editor.project.EditorProjectMeta

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

class simvx.editor.project.ProjectManager

Higher-level project and scene operations.

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

Initialization

new_scene(state: simvx.editor.state.EditorState) None

Create a fresh scene with a single root Node3D.

open_scene(state: simvx.editor.state.EditorState) None

Emit open_file_requested so the editor shows a FileDialog.

save_scene(state: simvx.editor.state.EditorState) bool

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

save_scene_as(state: simvx.editor.state.EditorState) None

Emit save_file_requested so the editor shows a FileDialog.

add_recent(path: str) None

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

get_recent_files() list[str]

Return the ordered recent-files list.

clear_recent_files() None

Clear the recent-files list.

load_project(path: str | pathlib.Path) bool

Load project.simvx from directory path, with legacy project.json fallback.

save_project(path: str | pathlib.Path) bool

Save project.json into directory path. Returns True on success.

get_window_title(state: simvx.editor.state.EditorState) str

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

export_scene_as_packed(state: simvx.editor.state.EditorState, path: str | pathlib.Path) bool

Save the current scene as a PackedScene for embedding.

static get_scene_node_count(state: simvx.editor.state.EditorState) int

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