EMSUSD-1061 - [GitHub #3631] Import support for left handed polygon m… - #4305
Merged
seando-adsk merged 2 commits intoAug 26, 2025
Merged
Conversation
…eshes * Handle UVs correctly for left-handed prims.
seando-adsk
commented
Aug 20, 2025
Comment on lines
+180
to
+199
| if (isLeftHanded) { | ||
| // When the mesh is left-handed, face winding order was reversed. | ||
| // We need to adjust the face-vertex index to match the corrected order. | ||
| // Find the position of this vertex within its face and reverse it. | ||
| const int faceId = itFV.faceId(); | ||
| int vertexCount = meshFn.polygonVertexCount(faceId); | ||
|
|
||
| // Find which vertex we are within this face | ||
| unsigned int baseFvi = 0; | ||
| for (int f = 0; f < faceId; ++f) { | ||
| int faceVertCount = meshFn.polygonVertexCount(f); | ||
| baseFvi += faceVertCount; | ||
| } | ||
|
|
||
| const int vertexPosInFace = fvi - baseFvi; | ||
| const int reversedVertexPosInFace = vertexCount - 1 - vertexPosInFace; | ||
| valueId = baseFvi + reversedVertexPosInFace; | ||
| } else { | ||
| valueId = fvi; | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Handle UVs for left-handed meshes. See #1139 where a change was made to support faces correctly for left-handled meshes. That PR fixed that problem but exposed this problem with the UVs.
pierrebai-adsk
previously approved these changes
Aug 20, 2025
…eshes * clang-format
seando-adsk
deleted the
donnels/EMSUSD-1061/handle_UVs_for_left_handed_meshes
branch
August 26, 2025 20:52
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.
EMSUSD-1061 - [GitHub #3631] Import support for left handed polygon meshes