usdcat doesn't support --version flag. It requires input files and
exits with error "inputFiles is required" when run without arguments.
Changed all verification steps to use `usdcat --help` which properly
displays the help text and exits with success.
The OpenUSD release archives extract files directly to the current
directory (./bin/, ./lib/, etc.) rather than creating a top-level
directory. This fixes extraction and environment setup for all platforms:
**Changes:**
1. Extract archives into a named 'openusd' directory
2. Manually set all required environment variables:
- PATH: Add bin, lib (Windows), and tbb/bin directories
- LD_LIBRARY_PATH/DYLD_LIBRARY_PATH: Add lib and tbb/lib directories
- PYTHONPATH: Add lib/python directory
- PXR_PLUGINPATH_NAME: Set to lib/usd
**Fixes:**
- Windows: usdcat not found in PATH (bin directory not added)
- macOS: libtbb.12.dylib not found (DYLD_LIBRARY_PATH missing tbb/lib)
- Linux: Ensure TBB libraries are in LD_LIBRARY_PATH
All platforms now properly configure the environment to use the bundled
TBB libraries included in the release packages.
Update the OpenUSD binary download pattern to match the actual release
artifact naming:
- Old: openusd-*-minsizerel-win64.zip
- New: openusd-*-minsizerel-windows-x86_64.zip
This matches the naming convention used in openusd-bin releases where
platform names follow GitHub Actions standard identifiers
(windows-x86_64, linux-x86_64, etc).
Fixes the "no assets match the file pattern" error in Windows CI.
Despite TBB being included in the OpenUSD binary package, the system
still requires libtbb12 to be installed for proper library resolution.
This ensures usdcat and other OpenUSD binaries can find libtbb.so.12.
Fixes failure in workflow run #20869757118.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix ARM64 binary pattern: change aarch64 to arm64 to match actual release filename
- Add libtbb12 installation for x86_64 build to resolve missing libtbb.so.12 error
These changes fix the failures in workflow run #20866500999 where:
1. ARM64 build failed with "no assets match the file pattern"
2. x86_64 build failed with "error while loading shared libraries: libtbb.so.12"
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Downloads prebuilt OpenUSD binaries from lighttransport/openusd-bin
and tests TinyUSDZ output compatibility with official OpenUSD tools.
Validates that TinyUSDZ-generated USDA files can be read by OpenUSD's
usdcat. Tests run on Linux (x64/ARM64), macOS ARM64, and Windows x64.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix signed integer overflow when parsing INT_MIN (-2147483648) by
negating in int64_t space before casting to int32_t. The previous
code attempted to negate the result after casting, which is undefined
behavior for INT_MIN.
Also add bootstrap-cmake-linux-ubsan.sh for UBSan builds.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Revert to running tusdcat directly without debuggers. The ARM64 pointer
sign-extension bug has been fixed in the previous commit.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The TypedArray::get() function was incorrectly sign-extending 48-bit
packed pointers on ARM64. On x86-64, user space addresses never have
bit 47 set, so sign extension is correct. However, on ARM64 user space
addresses CAN have bit 47 set (0x0000... to 0x0000FFFF...).
When an ARM64 address like 0x0000aaaaab7520d0 was stored and retrieved,
the sign extension converted it to 0xFFFFaaaaab7520d0 (kernel space),
causing SIGSEGV when accessed.
Fix: Only apply sign extension on x86-64 where canonical addresses
require it.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Build with Debug mode for better stack traces
- Install gdb for gcc build, lldb-21 for clang build
- Run tusdcat under debugger to capture backtrace on crash
- Clean up duplicate steps from earlier merge
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Build with AddressSanitizer enabled on ARM64 runner to help identify
the root cause of segmentation faults in timesamples USDC file parsing.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit tusdcat tests for USDC timesamples files that have shown
parsing issues on ARM64 runners. Also upload ARM64 tusdcat binaries as
artifacts for testing in other environments (e.g., QEMU).
Run order: artifact upload -> tusdcat tests -> ctest, so that artifacts
are available even if subsequent tests fail.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit tusdcat tests for USDC timesamples files that have shown
parsing issues on ARM64 runners. Also upload ARM64 tusdcat binaries as
artifacts for testing in other environments (e.g., QEMU).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update ARM64 runners from ubuntu-22.04-arm to ubuntu-24.04-arm
- Update LLVM apt repository from jammy to noble for Ubuntu 24.04
- Remove clang default from bootstrap-cmake-linux.sh; now uses
system default compiler unless CC/CXX are explicitly set
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The script was hardcoding CXX=clang++ CC=clang, ignoring any
user-provided environment variables. Now uses shell parameter
expansion to default to clang only if CC/CXX are not already set.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Split build-arm64 into build-arm64-gcc and build-arm64-clang
- build-arm64-gcc: Uses system GCC on Ubuntu 22.04 ARM
- build-arm64-clang: Installs Clang 21 from LLVM apt repository
(previously used system Clang 14 which is outdated)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix move constructor/assignment operator to transfer value array storage
fields (_value_array_storage, _value_array_refs, _use_value_array)
- Fix copy constructor/assignment operator for value array storage fields
- Add bounds checking for blocked[] and offsets[] array access in pprint
- Strip TYPE_ID_1D_ARRAY_BIT before type lookup in print_pod_value_dispatch
and get_pod_type_size to handle array element types correctly
- Add handler for value array storage path in get_samples()
- Set _use_pod=false when using value array storage
This fixes the "Unknown type_id: 1048618" error when printing array-typed
timeSamples (e.g., color3f[]) and prevents heap-buffer-overflow when
printing timeSamples with None values.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CMakeLists.txt: Skip libatomic linking on MSVC (atomics built into runtime)
- crate-reader.cc: Use std::transform with explicit cast to fix C4244 warning
- pprinter.cc: Remove duplicate to_string(DomeLight::TextureFormat) to fix LNK4006
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add -Wunknown-warning-option suppression before -Wdeprecated-literal-operator
to prevent build errors on clang versions that don't recognize the latter.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all CMakeLists.txt, Makefiles, meson.build, setup.py,
and documentation files to use C++17 standard.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- task-queue.hh: Use mutex fallback on MSVC (no GCC __atomic_* builtins)
- shape-to-mesh.hh: Use kPI/kPI_2 constants instead of M_PI/M_PI_2
- tinyexr_c_impl.c: Use Windows Interlocked functions for MSVC C mode
- unit-task-queue.cc: Fix lambda capture for MSVC
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update _POSIX_C_SOURCE from 199309L to 200112L for vsnprintf/snprintf
- Silence unused parameter warning in serializePreviewSurfaceToJson
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove debug console.log statements from coroutine helpers
- Split Tydra conversion into multiple phases with yields:
- detecting: Format detection
- parsing: USD parsing
- setup: Converter environment setup
- assets: Asset resolution setup
- meshes: Tydra mesh conversion
- complete: Done
- Each phase yields to event loop, allowing browser repaints
- Update progress-demo.js phase mapping with descriptive messages
- The Tydra ConvertToRenderScene call is still blocking, but yields
occur before and after it
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add console.log debug prints at yield points in binding.cc:
- Log when yielding to event loop
- Log when resuming from yield (rAF or setTimeout)
- Log phase name and progress percentage
- Add hasAsyncSupport() method to TinyUSDZLoader.js:
- Checks if loadFromBinaryAsync is available
- Returns true if WASM was built with TINYUSDZ_WASM_COROUTINE=ON
- Update progress-demo.js to use coroutine async when available:
- Check hasAsyncSupport() before loading
- Use parseAsync() for file and URL loading when available
- Fall back to standard Promise-based loading if not
- Map coroutine phases to progress UI stages
- Manual fetch with progress for URL loading in async mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add yieldToEventLoop() helper using EM_JS that returns a Promise for requestAnimationFrame
- Implement loadFromBinaryAsync() coroutine that yields between processing phases:
- detecting: format detection
- parsing: USD parsing
- converting: Tydra conversion
- complete: done
- Add reportAsyncPhaseStart() EM_JS callback for JS progress tracking
- Add parseAsync() and loadAsync() methods to TinyUSDZLoader.js
- Parameters passed by value (not reference) to survive co_await suspension points
- No ASYNCIFY required - uses native LLVM coroutine transform
This allows the browser to repaint between processing phases, improving
perceived loading performance for large USD files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add TextureLoadingManager class for queuing and progressive texture loading
- Add texture progress bar UI (bottom overlay with green theme)
- Modify buildSceneWithProgress to use delayed texture mode
- Scene renders immediately without textures, then textures load in background
- Support textureLoadingManager option in material conversion functions
- Update TinyUSDZMaterialX.js to support delayed loading for OpenPBR materials
- Textures load with concurrency control (2 at a time) and browser yields
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix lights disappearing from HDRI on refresh in envmap mode by using
lightData.enabled (user's intention) instead of threeLights.visible
(rendering state) for HDRI projection filtering
- Update toggleLight() to respect envmap mode - keep lights hidden for
rendering while still allowing on/off toggling for HDRI purposes
- Fix setLightingMode() to restore lights based on user's enabled state
when switching back to lights mode
- Fix SpotLight rotation gizmo position by resetting light.position to
(0,0,0) after creation (Three.js r146+ defaults to (0,1,0))
- Add getAttachTargetForLight() for proper transform control attachment
based on mode (translate/rotate/scale -> group, target -> target object)
- Add minHdriRadius (0.3) for HDRI projection to ensure lights are visible
- Improve light picking to skip disabled/invisible helpers
- Add drag state management to prevent picking different object after drag
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add envIntensityController to guiState for GUI updates
- Update Env Intensity display when loading DomeLight from USD
- Update Env Intensity display when switching to usd_dome environment
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Export normalTextureId, occlusionTextureId, displacementTextureId in
material-serializer.cc for UsdPreviewSurface materials
- Fix TinyUSDZLoaderUtils.js to properly extract surfaceShader from
nested JSON structure
- Add Normal Mode selector (geometry/mapped) to Show Normals feature
- Add createViewNormalMaterial() shader for view-space normals with
normal map support
- Add extractNormalMapFromMaterial() to extract normal maps from both
OpenPBR/MaterialX and UsdPreviewSurface materials
- Make Env Color and Env Colorspace controls disabled when Environment
is not constant_color
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add EM_JS functions in binding.cc for direct C++ to JS progress reporting
- reportTydraProgress: mesh conversion progress (current/total, stage, name)
- reportTydraStage: conversion stage changes
- reportTydraComplete: conversion completion with counts
- Update TinyUSDZLoader.js with callback options:
- onTydraProgress, onTydraStage, onTydraComplete
- setTydraProgressCallback/setTydraStageCallback/setTydraCompleteCallback methods
- Integrate callbacks in progress-demo.js for real-time UI updates
- Add design document for JS/WASM synchronous event update patterns
This enables real-time progress updates during Tydra scene conversion
without requiring ASYNCIFY, using Emscripten's EM_JS for synchronous
JavaScript calls from C++.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>