Files
tinyusdz/tests/usda/timesamples-array-dedup-002.usda
Syoyo Fujita 1f18be0949 Fix empty timeSamples being omitted from output
Empty timeSamples (with size=0 but valid type_id) were being completely
omitted from output instead of being printed as "{}". This fix ensures
authored but empty timeSamples are preserved during round-trip parsing.

Changes:
- prim-reconstruct.cc: Check type_id != 0 to detect authored empty timeSamples in xformOp reconstruction
- primvar.hh: Update type_name() and type_id() to handle empty timeSamples
- pprinter.cc: Update printing logic to output empty timeSamples as "{}"
- timesamples-pprint.cc: Remove debug output
- timesamples.hh: Remove debug output
- ascii-parser-timesamples-array.cc: Add bool[] timeSamples support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 11:36:02 +09:00

30 lines
678 B
Plaintext

#usda 1.0
# USDC will dedup value.timeSamples
def Xform "muda"
{
float xformOp:rotateZ:tilt = 12
float xformOp:rotateZ:spin.timeSamples = {
0: 0,
192: 1440,
}
texCoord2f[] primvars:uv.timeSamples = {
0: [(1.0, 2.0), (0.5, 4.0)],
1: [(1.0, 2.0), (0.5, 4.0)],
2: [(1.0, 2.0), (0.5, 4.0)],
3: [(1.0, 2.0), (0.5, 4.0)],
4: [(1.0, 2.0), (0.5, 4.0)],
5: [(1.0, 2.0), (0.5, 4.0)],
6: [(1.0, 2.0), (0.5, 4.0)],
7: [(1.0, 2.0), (0.5, 4.0)],
8: [(1.0, 2.0), (0.5, 4.0)],
9: [(1.0, 2.0), (0.5, 4.0)],
10: [(1.0, 2.0), (0.5, 4.0)],
}
uniform token[] xformOpOrder = ["xformOp:rotateZ:tilt", "xformOp:rotateZ:spin"]
}