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

Rename accessor GLTFType to GLTFAccessorType, fix verbose prints, document GLTFAccessor #90560

Merged
merged 1 commit into from
May 28, 2024

Conversation

aaronfranke
Copy link
Member

Follow-up to #36382 and #89317. The name type by itself is too generic and should be avoided.

This PR renames GLTFAccessor get_type to get_accessor_type, renames the GLTFType enum to GLTFAccessorType, moves GLTFAccessorType to gltf_accessor.h, and documents all of GLTFAccessor's properties. It also fixes the verbose prints using a duplicate and incorrect _get_type_name that used lowercase and "float", but the correct values per the GLTF spec are all uppercase and the float one is "SCALAR".

For now the old names are still bound for compatibility, but this change will fix these warnings when building C# assemblies the next time we break compatibility and we remove the old method names:

GltfAccessor.cs(287,18): warning CS0108: 'GltfAccessor.GetType()' hides inherited member 'object.GetType()'. Use the new keyword if hiding was intended.
GltfAccessor.cs(578,43): warning CS0108: 'GltfAccessor.MethodName.GetType' hides inherited member 'object.GetType()'. Use the new keyword if hiding was intended.

@aaronfranke aaronfranke requested a review from a team as a code owner April 12, 2024 05:22
@aaronfranke aaronfranke force-pushed the gltf-accessor-type branch 2 times, most recently from 9e5d04e to cd91fed Compare April 12, 2024 05:26
@AThousandShips AThousandShips added this to the 4.x milestone Apr 12, 2024
@akien-mga akien-mga modified the milestones: 4.x, 4.3 May 24, 2024
@akien-mga akien-mga merged commit 01629e1 into godotengine:master May 28, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the gltf-accessor-type branch May 28, 2024 19:13
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