Skip to content
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

GLTF: Store extensions in GLTFState and get supported extensions from GLTFDocumentExtension #66094

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Sep 19, 2022

  • Make used extensions be stored in GLTFState. This allows GLTFDocumentExtension classes to add to the used extensions array.
  • Add a way to get the GLTF extensions supported by GLTFDocumentExtension. It will check the required extensions during import, and print a message for each unsupported required extension.

These changes were built with #66026 in mind, in fact this PR is a subset of it. These changes are mostly useful with that PR, but technically changing how the list of GLTF extensions is stored, and adding the ability for GLTFDocumentExtension to say which GLTF extensions it supports, is not dependent on refactoring how GLTFDocumentExtension classes are registered with GLTFDocument. So I split out this PR for easier reviewing.

This work was sponsored by The Mirror.

Copy link
Contributor

@lyuma lyuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything here is minor. I think it's good overall, and should allow for better handling of extensionsRequired

modules/gltf/doc_classes/GLTFDocumentExtension.xml Outdated Show resolved Hide resolved
modules/gltf/doc_classes/GLTFState.xml Outdated Show resolved Hide resolved
modules/gltf/gltf_document.cpp Outdated Show resolved Hide resolved
modules/gltf/gltf_state.h Outdated Show resolved Hide resolved
modules/gltf/gltf_document.cpp Outdated Show resolved Hide resolved
modules/gltf/gltf_document_extension.h Outdated Show resolved Hide resolved
@aaronfranke aaronfranke force-pushed the gltf-used-extensions branch 2 times, most recently from 057cb3c to b3abd54 Compare September 19, 2022 19:33
@fire fire requested a review from a team September 20, 2022 00:35
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

@akien-mga akien-mga merged commit 4cdb16a into godotengine:master Sep 20, 2022
@akien-mga
Copy link
Member

Thanks!

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