mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
This commit adds extensive testing and documentation for TinyUSDZ's timeSamples evaluation to ensure compatibility with OpenUSD's behavior. ## Added Tests - Single timeSample behavior (held constant for all times) - Default value vs timeSamples coexistence - Multiple timeSamples with linear interpolation - Attribute::get() API with various time codes - Held vs linear interpolation modes - Edge cases and boundary conditions ## Key Behaviors Verified - Default values and time samples exist in separate value spaces - TimeCode::Default() always returns the default value (e.g., 7,8,9) - Numeric time codes use time samples with interpolation - Values are held constant before/after sample range (no extrapolation) - Linear interpolation between samples when multiple samples exist ## Documentation - doc/timesamples.md: Complete guide with Python test scripts and insights - doc/timesamples-tinyusdz-tests.md: Test results and verification summary - OpenUSD test scripts demonstrating expected behavior All 896 test assertions pass, confirming TinyUSDZ correctly implements OpenUSD's timeSamples evaluation semantics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
19 lines
345 B
Plaintext
19 lines
345 B
Plaintext
#usda 1.0
|
|
(
|
|
endTimeCode = 10
|
|
framesPerSecond = 24
|
|
startTimeCode = -10
|
|
)
|
|
|
|
def Xform "DefaultAndMultiTimeSamples"
|
|
{
|
|
float3 xformOp:scale = (7, 8, 9)
|
|
float3 xformOp:scale.timeSamples = {
|
|
-5: (0.1, 0.1, 0.1),
|
|
0: (0.5, 0.5, 0.5),
|
|
5: (1, 1, 1),
|
|
}
|
|
uniform token[] xformOpOrder = ["xformOp:scale"]
|
|
}
|
|
|