Add get_supported_gltf_extensions to GLTFDocument#96251
Merged
akien-mga merged 1 commit intogodotengine:masterfrom Aug 29, 2024
Merged
Add get_supported_gltf_extensions to GLTFDocument#96251akien-mga merged 1 commit intogodotengine:masterfrom
get_supported_gltf_extensions to GLTFDocument#96251akien-mga merged 1 commit intogodotengine:masterfrom
Conversation
BastiaanOlij
approved these changes
Aug 29, 2024
Contributor
BastiaanOlij
left a comment
There was a problem hiding this comment.
Perfect! Exactly what I was looking for! Thanks @aaronfranke
lyuma
approved these changes
Aug 29, 2024
Member
|
Thanks! |
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.
This method returns a list of all support glTF extensions, including extensions supported directly by the engine, and extensions supported by user plugins registering GLTFDocumentExtension classes.
This was requested by @BastiaanOlij: "I have a need to communicate the list of extensions we support to an external system so that it can limit/extend the GLTF document it is going to provide to me."
Most of this logic already existed in
_parse_gltf_extensions, but now it is exposed. I also sorted the output, since this method is not expected to be called often, and it makes the output more predictable and easier to read.This PR will conflict with #93722 and #94165, but it will be very easy to rebase them. This PR should be merged first.
Example output when ran in an empty Godot project as of this PR:
["EXT_texture_webp", "GODOT_single_root", "KHR_lights_punctual", "KHR_materials_emissive_strength", "KHR_materials_pbrSpecularGlossiness", "KHR_materials_unlit", "KHR_texture_basisu", "KHR_texture_transform", "OMI_collider", "OMI_physics_body", "OMI_physics_shape"]Example output when run in a project that provides additional extensions in plugins:
["EXT_texture_webp", "GODOT_single_root", "KHR_lights_punctual", "KHR_materials_emissive_strength", "KHR_materials_pbrSpecularGlossiness", "KHR_materials_unlit", "KHR_texture_basisu", "KHR_texture_transform", "KHR_xmp_json_ld", "OMI_collider", "OMI_physics_body", "OMI_physics_joint", "OMI_physics_shape", "OMI_seat", "OMI_spawn_point", "OMI_vehicle_body", "OMI_vehicle_hover_thruster", "OMI_vehicle_thruster", "OMI_vehicle_wheel"]