Skip to content

GLTF: Move accessor and buffer view Dictionary conversion into those classes - #108320

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
aaronfranke:gltf-buf-accessor-dict
Oct 21, 2025
Merged

Repiteo merged 1 commit into
godotengine:masterfrom
aaronfranke:gltf-buf-accessor-dict

Conversation

@aaronfranke

Copy link
Copy Markdown
Member

This PR moves the logic currently in GLTFDocument for converting GLTFAccessor to/from Dictionary, and converting GLTFBufferView to/from Dictionary, into those respective classes, and exposes it.

I also renamed some variables for clarity (ex: si -> sparse_indices_dict), and removed some error checks that will never be true (!d.has("buffer") can't happen after d["buffer"] = ...), but otherwise it is mostly a trivial move, it has the same logic as the existing code.

Note that _get_accessor_type_from_str and _get_accessor_type_name are duplicated code since their counterparts are still in GLTFDocument for now, but this will be cleaned up later when the rest of the logic is moved into GLTFAccessor.

This is part of a refactor to allow using glTF accessors and buffer views from extensions (or just generally outside of GLTFDocument).

Comment thread modules/gltf/structures/gltf_accessor.h Outdated
@Repiteo

Repiteo commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Thanks!

@aaronfranke
aaronfranke deleted the gltf-buf-accessor-dict branch October 21, 2025 15:44
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…sor-dict

GLTF: Move accessor and buffer view Dictionary conversion into those classes
wangshucheng pushed a commit to wangshucheng/godot that referenced this pull request Aug 27, 2026
…sor-dict

GLTF: Move accessor and buffer view Dictionary conversion into those classes
Shane-Gadsby pushed a commit to Shane-Gadsby/godotwebgpu that referenced this pull request Sep 21, 2026
…sor-dict

GLTF: Move accessor and buffer view Dictionary conversion into those classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants