mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Critical fixes for USD path tree encoding: 1. **Use consistent USD path comparison**: Changed spec sorting in Finalize() to use pathlib::ComparePaths instead of simple lexicographic sort. This ensures path indices match the path tree encoding order. 2. **Fix property token remapping**: Properties use negative token indices (e.g., -5 for "outputs:surface"). Fixed token remap table to preserve both positive and negative indices without collision. Previously, both path_tree_idx=3 and path_tree_idx=-3 were mapping to same key, causing property tokens to be lost. 3. **Add ListOp wrapper for Material outputs**: Material output connections (outputs:surface, outputs:displacement, outputs:volume) must be wrapped in ListOp<Path> as required by USD spec. 4. **Add Material/Shader test**: Created test case for Material and Shader prims with surface output connection. Known issue: Material outputs need to be recognized as "attribute connections" by the reader. This requires further investigation into the proper spec structure or fields needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>