novaphy.UsdStageData¶
Snapshot of a parsed USD stage. Returned by OpenUsdImporter.import_file and consumed by SceneBuilderEngine.build_from_openusd.
Attributes¶
| Attribute | Description |
|---|---|
default_prim |
Path of the stage's default prim (string). May be empty when the stage does not declare one. |
up_axis |
Stage up-axis token ("Y" or "Z"). |
meters_per_unit |
Stage unit scale, in meters per USD unit. Most USD scenes use 0.01 (centimeters) or 1.0 (meters). |
prims |
List of UsdPrim entries describing rigid bodies, shapes, and reference frames. Animation tracks live inside each prim's tracks field, not on the stage. |
Example¶
import novaphy
stage = novaphy.OpenUsdImporter().import_file("scene.usda")
if stage.up_axis == "Z":
print("Z-up scene; NovaPhy uses Y-up internally — gravity must be set explicitly.")
for prim in stage.prims:
print(prim.path, prim.type_name)
Notes¶
- The structure is read-only after import; mutate via UsdPrim fields if you need to override masses or transforms before scene build.
- NovaPhy follows Y-up by default. The scene builder honours
up_axiswhen constructing the root transform; coupled gravity changes still require passing the desired vector to the solver.