-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow exporting children of skipped nodes in glTF exporter #16017
Conversation
…ed nodes; make _createNodeAsync() to help detect skipped nodes
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/16017/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/16017/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/16017/merge#BCU1XR#0 |
Visualization tests for WebGPU (Experimental) |
WebGL2 visualization test reporter: |
…ed nodes; make _createNodeAsync() to help detect skipped nodes (BabylonJS#16017)
See https://forum.babylonjs.com/t/gltf-export-shouldexportnode-changed/55421/2 . Expected behavior is that all nodes are checked for export using
shouldExportNode()
, regardless of whether parent is being exported or not, but we missed this in #15869.Now children add themselves to their parent instead of parents tracking and adding their children. This helps address a weird situation where a child node is skipped, so its parent needs to add the indices of several grandchildren instead of just the child’s index (which is null anyway). The new
parentNodeChildren
parameter also helps with accessing the glTF root node list, in the case where a root node is skipped but has children that should be reparented to the root.Also factored out the creation of the glTF nodes into _createNodeAsync() so that we can early return a null (meaning skipped) node and still process its children afterwards in _exportNodeAsync().