godot
godot copied to clipboard
Add copyright to GLTFState
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
@fire I am working on a system for specifying export settings like copyright, this PR is a part of that work actually.
@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.
Thanks!