godot icon indicating copy to clipboard operation
godot copied to clipboard

Add copyright to GLTFState

Open aaronfranke opened this issue 2 years ago • 2 comments

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

aaronfranke avatar Jul 10 '23 05:07 aaronfranke

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

aaronfranke avatar Jul 10 '23 15:07 aaronfranke

@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.

fire avatar Jul 10 '23 15:07 fire

Thanks!

akien-mga avatar Aug 02 '23 10:08 akien-mga