GLTF: Unify logic for encoding buffers during export#120652
Draft
aaronfranke wants to merge 2 commits into
Draft
GLTF: Unify logic for encoding buffers during export#120652aaronfranke wants to merge 2 commits into
aaronfranke wants to merge 2 commits into
Conversation
9c02a89 to
b57759f
Compare
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.
Draft because I built this PR on top of PR #120519, so that has to be merged first.
The logic for encoding glTF buffers when exporting a glTF from Godot is currently duplicated, with one function for saving to text-based
.gltf(_encode_buffer_bins), and one function for saving to binary.glb(_encode_buffer_glb).The code duplication alone is not problematic itself, in that it's not causing any bugs, but it does hinder future refactoring efforts I am working on for glTF 2.1 support and for customizing external data storage. This was a fairly big chunk that I could isolate, so I wanted to submit this as a PR separately before either of those.