novaphy.OpenUsdImporter¶
Conservative USDA-like text snapshot parser. It reads a small, line-oriented subset from disk and produces a UsdStageData snapshot ready for SceneBuilderEngine.build_from_openusd.
This class does not link the OpenUSD runtime and is not a general USD schema/composition importer. It recognizes prim declarations, a few stage metadata fields, literal mass/density/material fields, simple translate/orient ops and time samples, plus NovaPhy's custom box/sphere size attributes.
Constructor¶
Parameters:
| Parameter | Description |
|---|---|
min_supported_version |
Minimum numeric value accepted from the file's #usda X.Y header. |
Methods¶
| Method | Description |
|---|---|
import_file(usd_path) -> UsdStageData |
Parse the supported subset from a text .usda file. Binary .usdc crates are not supported. |
Properties¶
| Property | Description |
|---|---|
min_supported_version |
Read-only echo of the value passed to the constructor. |
Example¶
import novaphy
importer = novaphy.OpenUsdImporter(min_supported_version=1.0)
stage = importer.import_file("scene.usda")
print("up axis :", stage.up_axis)
print("units :", stage.meters_per_unit, "m / USD unit")
print("prims :", len(stage.prims))
engine = novaphy.SceneBuilderEngine()
result = engine.build_from_openusd(stage)
Notes¶
- The parser is compiled into the core with no
NOVAPHY_WITH_USDbuild flag and no OpenUSD SDK dependency. - The default threshold is
21.08. Because the implementation compares it directly with the text after#usda, passmin_supported_version=1.0when reading ordinary#usda 1.0files. - Standard Cube/Sphere schemas do not populate collider sizes. The text must
author
novaphy:boxHalfExtentsornovaphy:sphereRadiusfor those fields. - Animation samples are surfaced via UsdPrim.tracks; there is no separate top-level animation track list on the stage.