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

Add copyright to GLTFState #79267

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Jul 10, 2023

This PR adds a copyright property to GLTFState which can be used to set the GLTF copyright string in the asset header (asset.copyright). https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/asset.schema.json

I also organized the asset header code, adding a new method _parse_asset_header and renaming _serialize_version to _serialize_asset_header.

For example, during export this can be done:

gltf_state.copyright = "2014 Godette"

Which results in the GLTF containing this text:

"asset": {
	"copyright": "2014 Godette",
	"version": "2.0"
},

And it can be read back at import time:

print("Copyright " + gltf_state.copyright) # Copyright 2014 Godette

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.

Looks good design proposal wise.

Do we also want to adjust the exporter tag?

@aaronfranke
Copy link
Member Author

@fire I am working on a system for specifying export settings like copyright, this PR is a part of that work actually.

@fire
Copy link
Member

fire commented Jul 10, 2023

@aaronfranke I want to mention that the xmp extension is what khronos and adobe, and all the stores recommend for this usage.

Exporting field didn’t fit their needs.

@akien-mga akien-mga merged commit c000b0c into godotengine:master Aug 2, 2023
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the gltf-copyright branch August 2, 2023 16:06
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.

3 participants