Fix UV shell connectivity when importing non-indexed faceVarying UVs - #4719
Merged
seando-adsk merged 1 commit intoAug 27, 2026
Merged
Conversation
A faceVarying UV primvar without authored indices was imported with one Maya UV per face vertex, so every face ended up in its own UV shell even where values matched along shared edges. On import, weld UV values that are equal on the same mesh vertex into a single shared UV and synthesize the assignment indices. Welding per vertex restores the connectivity between adjacent faces without fusing UV islands that merely overlap in UV space. Indexed primvars are unaffected, as is the left-handed winding reversal. Add right- and left-handed non-indexed cubes to the UV set import test fixtures and cover both in testUsdImportUVSets. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
barbalt
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a mesh has a faceVarying UV primvar without authored indices (
primvars:stbut noprimvars:st:indices— common for USD written by other DCCs), the importer creates one Maya UV per face vertex with no sharing.The imported UV values themselves are correct, but no UVs are shared between neighboring faces, so every face becomes its own UV shell. A cube that should import with 14 UVs in a single shell instead imports with 24 UVs in 6 shells, and the layout falls apart into individual faces as soon as the UVs are edited.
The same data imports correctly when authored with indices, so whether an asset arrived intact depended on how the exporting application chose to write its UVs.
Fix
In
assignUVSetPrimvarToMesh, when a faceVarying UV primvar has no authored indices, weld values that are equal on the same mesh vertex into a single shared UV and synthesize the assignment indices. Welding per vertex restores connectivity between adjacent faces without fusing UV islands that merely overlap in UV space (e.g. stacked/mirrored shells). The result is identical to what an indexed export of the same data would produce.Indexed primvars, other interpolations, and the left-handed winding reversal are untouched.
Tests
Added a right-handed and a left-handed cube with non-indexed faceVarying UVs to the
UsdImportUVSetsTestfixtures (both variants), with new cases intestUsdImportUVSets.pyasserting values, UV count (14), and shell count (1). All existing UV set, mesh, and color set import tests pass.