ADCS.helpers.animations.godot.launcher module¶
- ADCS.helpers.animations.godot.launcher.launch_viewer(binary, host, port, token, extra_args=(), project=None, assets=None)[source]¶
Start the viewer as a child process.
Inside WSL a Windows
.exeis started through WSL interop and connects back to127.0.0.1, which Windows forwards into WSL; no wider binding is needed.- Parameters:
binary (str | Path)
host (str)
port (int)
token (str)
extra_args (Sequence[str])
project (Path | None)
assets (Path | None)
- Return type:
Popen
- ADCS.helpers.animations.godot.launcher.view(log_path, binary=None, host='127.0.0.1', port=0, launch=True, extra_args=(), project=None, assets=None)[source]¶
Serve a recorded vizlog and open the viewer on it. Blocks until the viewer exits (or, with
launch=False, until interrupted).- Parameters:
log_path (str | Path) – vizlog directory.
binary (str | Path | None) – Viewer executable; resolved with
find_viewer()if omitted.host (str) – Interface to serve on.
port (int) – Port;
0picks a free one.launch (bool) – Start the viewer.
Falseonly serves and prints the arguments to give a viewer started by hand (e.g. from the Godot editor).extra_args (Sequence[str]) – Extra viewer arguments.
project (str | Path | None) – Godot project when
binaryis a plain Godot build (seeviewer_project()).assets (str | Path | None) – Asset cache; defaults to the built cache of
ADCS.helpers.animations.godot.assets, if any.
- Returns:
The viewer’s exit code (0 when not launched).
- Return type:
int
- ADCS.helpers.animations.godot.launcher.viewer_command(binary, host, port, token, extra_args=(), project=None, assets=None)[source]¶
Command line that starts the viewer and points it at a server.
Godot passes arguments after
--to the project (OS.get_cmdline_user_args()), so the viewer options follow it.- Parameters:
project (Path | None) – Godot project directory, when
binaryis a plain Godot build.assets (Path | None) – Visualization asset cache (
python -m ADCS.helpers.animations.godot.assets path).binary (str | Path)
host (str)
port (int)
token (str)
extra_args (Sequence[str])
- Return type:
List[str]
- ADCS.helpers.animations.godot.launcher.viewer_project(binary, project=None)[source]¶
The Godot project to run when the “viewer” is a plain Godot binary (development), or
Nonefor an exported viewer.Order:
project,$ADCS_VIEWER_PROJECT, then the bundledviewer/directory if the binary looks like a Godot editor build. The bundled project is copied to the user cache so Godot can create its import files without writing into the installation. Inside WSL with a Windows Godot, the copy lives on the Windows side.- Parameters:
binary (str | Path)
project (str | Path | None)
- Return type:
Path | None