Support GeomModelAPI, or skip unrecognized API
MootoolsSoftware opened this issue · 2 comments
The following model https://dpel-assets.aswf.io/4004-moore-lane/intel_moorelane_v1_2_0.zip
contains some USD file that fails due to unsupported API.
- tydra_to_renderscene.exe .\Intel_mooreLane_v1_2_0\Intel_mooreLane\Instances\usd_pointInstances_0621.usd
ERR : [error]D:\Manu\Dev_Release\Contrib\tinyusdz\src\usdc-reader.cc:ReconstructStage():3438 Failed to reconstruct Stage(Prim hierarchy)
ReconstructPrimNode():2350 Failed to parse Prim fields.
[error]D:\Manu\Dev_Release\Contrib\tinyusdz\src\usdc-reader.cc[USDC]:ParsePrimSpec():1919 Failed to validate apiSchemas
: Invalid or Unsupported API schema: GeomModelAPI
- tydra_to_renderscene.exe ".\Intel_mooreLane_v1_2_0\Intel_mooreLane\USD\4004MooreLane_III_03_ASWF.usd"
ERR : [error]D:\Manu\Dev_Release\Contrib\tinyusdz\src\usdc-reader.cc:ReconstructStage():3438 Failed to reconstruct Stage(Prim hierarchy)
[error]D:\Manu\Dev_Release\Contrib\tinyusdz\src\usdc-reader.cc[USDC]:ReconstructPrimNode():2350 Failed to parse Prim fields.
[error]D:\Manu\Dev_Release\Contrib\tinyusdz\src\usdc-reader.cc[USDC]:ParsePrimSpec():1919 Failed to validate apiSchemas
: Invalid or Unsupported API schema: ShadowAPI
I wonder if this prim could not be skipped in order to retain the recognized one's. 3dsMax shows the following:
There is a flag to skip unknown apiSchema token,
but this flag is not used in actual downstream tasks(USDA parser, USDC parser, etc.) at the moment.
Also we need to add this flag to USDLoadOptions.
https://github.com/syoyo/tinyusdz/blob/7f3ae22884cfa8e1834f1750c30c807f0df466c6/src/tinyusdz.hh#L53
For a while, reporting unknown apiSchema as error always is good to find a potential USD error(e.g. we are better to report apiSchema token with wrong spelling(for example 'skekeBindAPI').
I'm planning to add ShadowAPI
and 'GeomModelAPI` as a known apiSchema in the near future.