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"]holdsint32indices into materials (-1meaning no material). Node transforms are stored as local matrices; world transforms are computed on demand byworld_transform().- Parameters:
- meshes
One
PolyDataper 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, rawanimations,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
meshesnodesmaterialstexturesimagesscenesactive_scenenameglobal_attrs