polyxios.write_scene#

polyxios.write_scene(scene: SceneData, path: str | PathLike[str] | IO[Any], *, fmt: str | None = None, registry: dict | None = None, **opts: object) → None[source]#

Write a SceneData to a scene-graph file.

Parameters:
scene

SceneData to serialize.

path

Output file path.

fmt

Format override (e.g. '.glb'). Inferred from the file extension when None.

registry

Custom codec registry. Uses the built-in registry if None.

**opts

Format-specific options passed to the codec’s write_scene function (e.g. binary=False for .gltf + .bin).

Raises:
UnsupportedFormatError

If the format does not support scene writing. Use write() to write a flat PolyData instead.