You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ASSET-505: preserve static GLB node transforms during ped import
ped_assemble.py imported only a mesh node's local translation. A valid GLB emitted by glb_writer.write_instanced_glb(..., mode="nodes") lost rotation and scale when assembled again, and parent transforms were ignored. Matrix-based placements lost their translation too.
The importer now composes a static mesh node's ancestry using glTF column-major matrices or T * R * S. It bakes the resulting linear matrix into positions and keeps world translation in the existing MeshPart.translation field. Normals use the normalized inverse transpose, and negative determinants reverse triangle winding. Keeping the complete linear matrix preserves shear from a rotated child beneath a nonuniformly scaled parent.
Flat mesh-node ordering and the bare-mesh fallback are preserved. The skin path keeps its existing payload and local-translation handling. glTF skin deformation uses joint globals and inverse binds and ignores the instantiating mesh node's global transform, so this static bake stays outside that path. Singular or non-affine static transforms fail before an existing output is replaced.
Refreshed onto main 1cc6e3c121969761d9dad8fdec99f19928213973 at 5bc121fe8f1adc67955f71226a9dd2199f68b215. The transform helpers, original eight-method test file and documentation insertion are unchanged. The single conflict was beside the newly merged sparse-accessor closure; the resolution retains its complete per-file implicit-row budget and uses the indexed mesh-node tuples required by this change. Merged document validation, material defaults and JSON texture serialization remain intact.
Current Windows/Python 3.14 checks, synthetic inputs only:
Original eight methods pass; the identical file on unchanged current main still fails 11 subcases.
96 focused and related methods pass: transforms 8, ped 14, sparse GLB 7, malformed GLB 8, GLB material defaults 6, JSON textures 4, world instancing 32 and GLB skinning 17.
CI registration 14, compileall, both help commands and diff checks pass. The text-writer audit reports the same pre-existing current-main failure in tools/f64_omod_probe.py:268; the separate fix is f64_omod_probe: pin newline="\n" when writing JSON report #6461. No unrelated writer change is included here.
Windows, Python 3.14, synthetic inputs only. No game files or GPU runs.
New actual-writer/importer/CLI regression: 8 methods pass. The identical final test against unchanged main 561b65a8 fails 11 subcases.
Literal-coordinate controls cover TRS and matrix equivalence, parent-induced shear, normalized inverse-transpose normals, mirrors with stored or generated normals, small and large nonzero scales, flat ordering, numeric-string translation tolerance, bare meshes, both existing skin binding paths, and output preservation on unsupported transforms.
Existing suites: test_ped_assemble.py 14, test_world_instancing.py 32, and test_glb_skinning.py 17 pass.
CI registration 14 and text line endings 3 pass. Compileall, both help commands, and git diff --check pass.
Independent peer review reran all 8 new and 14 existing ped methods and found no issues.
Checked on main 561b65a8 with exact #5824ffc26593, #5764f9e2ff3e, and #5999d8fb362c: 8 transform + 9 texture + 15 ped/CLI + 6 malformed-GLB methods pass. #5824 has nearby patch context; three-way application merges cleanly without manual resolution. The other two patches apply directly. These are compatible adjacent changes, not implementation dependencies.
At that check, #4905 changed writer component-count checks, while #3919 and #4927 changed animation/skin exporters. Their patches did not touch the files changed here.
Refreshed ASSET-505 onto main 1cc6e3c121969761d9dad8fdec99f19928213973 at 5bc121fe8f1adc67955f71226a9dd2199f68b215. The transform helpers, original eight-method test file and documentation are unchanged. The one conflict was resolved by retaining the complete current-main implicit-accessor budget closure before the transform PR's indexed mesh-node tuples.
The identical regression still fails 11 subcases on unchanged current main. This refresh passes 96 focused/related methods plus CI registration14, compileall, both help commands and diff checks. The exact #5824ffc26593 / #5764f9e2ff3e / #619982d19e3c / #660482814559 combination applies cleanly and passes72 methods. The only line-audit failure is the existing current-main writer already owned by #6461.
Independent source, unchanged-helper/test and integration review is clear. Synthetic inputs only, no game files or GPU. AI-assisted: yes.
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
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.
ASSET-505: preserve static GLB node transforms during ped import
ped_assemble.pyimported only a mesh node's local translation. A valid GLB emitted byglb_writer.write_instanced_glb(..., mode="nodes")lost rotation and scale when assembled again, and parent transforms were ignored. Matrix-based placements lost their translation too.The importer now composes a static mesh node's ancestry using glTF column-major matrices or
T * R * S. It bakes the resulting linear matrix into positions and keeps world translation in the existingMeshPart.translationfield. Normals use the normalized inverse transpose, and negative determinants reverse triangle winding. Keeping the complete linear matrix preserves shear from a rotated child beneath a nonuniformly scaled parent.Flat mesh-node ordering and the bare-mesh fallback are preserved. The skin path keeps its existing payload and local-translation handling. glTF skin deformation uses joint globals and inverse binds and ignores the instantiating mesh node's global transform, so this static bake stays outside that path. Singular or non-affine static transforms fail before an existing output is replaced.
The format reference is the Khronos glTF 2.0 specification's transformations, mesh winding, and skins rules.
Claim: #5781 (comment), carried to #5934 as ASSET-505.
Current-main refresh
Refreshed onto main
1cc6e3c121969761d9dad8fdec99f19928213973at5bc121fe8f1adc67955f71226a9dd2199f68b215. The transform helpers, original eight-method test file and documentation insertion are unchanged. The single conflict was beside the newly merged sparse-accessor closure; the resolution retains its complete per-file implicit-row budget and uses the indexed mesh-node tuples required by this change. Merged document validation, material defaults and JSON texture serialization remain intact.Current Windows/Python 3.14 checks, synthetic inputs only:
ffc26593, ped_assemble: guard output paths and report I/O or JSON errors with exit 2 #5764f9e2ff3e, ASSET-522: Preserve GLB strip and fan topology #619982d19e3cand ASSET-539: Preserve extra UV sets during ped assembly #660482814559merges without manual conflicts and passes 72 relevant methods. Every included published test file matches its exact head. These are compatible adjacent changes, not dependencies.tools/f64_omod_probe.py:268; the separate fix is f64_omod_probe: pin newline="\n" when writing JSON report #6461. No unrelated writer change is included here.Maintenance status: #6603 (comment)
Original validation on main 561b65a
Windows, Python 3.14, synthetic inputs only. No game files or GPU runs.
561b65a8fails 11 subcases.test_ped_assemble.py14,test_world_instancing.py32, andtest_glb_skinning.py17 pass.git diff --checkpass.Original adjacent checks on main 561b65a
Checked on main
561b65a8with exact #5824ffc26593, #5764f9e2ff3e, and #5999d8fb362c: 8 transform + 9 texture + 15 ped/CLI + 6 malformed-GLB methods pass. #5824 has nearby patch context; three-way application merges cleanly without manual resolution. The other two patches apply directly. These are compatible adjacent changes, not implementation dependencies.At that check, #4905 changed writer component-count checks, while #3919 and #4927 changed animation/skin exporters. Their patches did not touch the files changed here.
AI-assisted: yes