polyxios.SceneData#

class polyxios.SceneData(meshes: tuple[~polyxios._types.PolyData, ...], nodes: tuple[~polyxios._scene.SceneNode, ...], materials: tuple[~polyxios._scene.SceneMaterial, ...] = (), textures: tuple[~polyxios._scene.SceneTexture, ...] = (), images: tuple[~polyxios._scene.SceneImage, ...] = (), scenes: tuple[tuple[int, ...], ...] = (), active_scene: int = 0, name: str = '', global_attrs: dict[str, ~typing.Any] = <factory>)[source]#

Multi-mesh scene with hierarchy, materials, and texture images.

This is the type returned by scene-aware codecs (glTF, FBX, USD, COLLADA). Each entry in meshes is a flat PolyData; element_attrs["material"] holds int32 indices into materials (-1 meaning no material). Node transforms are stored as local matrices; world transforms are computed on demand by world_transform().

Parameters:
meshes

One PolyData per glTF mesh (primitives merged).

nodes

Scene-graph nodes with local transforms and parent–child wiring.

materials

PBR materials referenced by element_attrs[“material”] indices.

textures

Textures referencing entries in images.

images

Raw image data or URI references.

scenes

Each entry is a tuple of root-node indices defining one scene.

active_scene

Index of the default scene in scenes.

name

Optional top-level name from the source file.

global_attrs

Format-level metadata: asset, raw animations, skins, etc.

__init__(meshes: tuple[~polyxios._types.PolyData, ...], nodes: tuple[~polyxios._scene.SceneNode, ...], materials: tuple[~polyxios._scene.SceneMaterial, ...] = (), textures: tuple[~polyxios._scene.SceneTexture, ...] = (), images: tuple[~polyxios._scene.SceneImage, ...] = (), scenes: tuple[tuple[int, ...], ...] = (), active_scene: int = 0, name: str = '', global_attrs: dict[str, ~typing.Any] = <factory>) → None#

Methods

__init__(meshes, ...], nodes, ...], ...)

to_polydata(*[, scene, apply_transforms])

Flatten the scene graph into a single merged PolyData.

world_transform(node_index)

Return the world-space 4×4 transform for the given node.

Attributes

meshes

nodes

materials

textures

images

scenes

active_scene

name

global_attrs