simvx.editor.project¶
Project Manager — Scene I/O, project settings, and recent files.
Module Contents¶
Classes¶
Persistent project-level configuration stored in project.simvx. |
|
Higher-level project and scene operations. |
Data¶
API¶
- class simvx.editor.project.EditorProjectMeta[source]¶
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
- classmethod from_dict(data: dict) simvx.editor.project.EditorProjectMeta[source]¶
Create from a dict, ignoring unknown keys for forward compat.
- class simvx.editor.project.ProjectManager[source]¶
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[source]¶
Create a fresh scene with a single root Node3D.
- open_scene(state: simvx.editor.state.EditorState) None[source]¶
Emit open_file_requested so the editor shows a FileDialog.
- save_scene(state: simvx.editor.state.EditorState) bool[source]¶
Save directly if path exists, otherwise trigger save-as.
- save_scene_as(state: simvx.editor.state.EditorState) None[source]¶
Emit save_file_requested so the editor shows a FileDialog.
- load_project(path: str | pathlib.Path) bool[source]¶
Load project.simvx from directory path, with legacy project.json fallback.
- save_project(path: str | pathlib.Path) bool[source]¶
Save project.json into directory path. Returns True on success.
- get_window_title(state: simvx.editor.state.EditorState) str[source]¶
Return ‘SimVX Editor - scene_name*’ (asterisk if modified).
- export_scene_as_packed(state: simvx.editor.state.EditorState, path: str | pathlib.Path) bool[source]¶
Save the current scene as a PackedScene for embedding.
- static get_scene_node_count(state: simvx.editor.state.EditorState) int[source]¶
Count every node in the current scene (including root).