vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
458 stars 72 forks source link

Add access to Name and Extras on image #111

Closed ptasev closed 2 years ago

ptasev commented 2 years ago

Currently it is not possible to get or set these values on a gltf image.

The name value is useful for me because it makes it easier to preserve texture image names when converting between using gltf and other formats. Blender also always reads and writes that field so it helps with that workflow.

This is really helpful because I think it's the only way to preserve a texture name when using glb. In my workflow when I'm going from game format -> glTF -> Blender -> glTF -> game format, I am losing the image name information (when using glb). By adding the image name I can do a "lossless" loop.

vpenades commented 2 years ago

Schema2.Image has both Name and Extras, so, at what level of the API are you willing to support this?

ptasev commented 2 years ago

My mistake. I was relying on commit comments to track when it would be added and I missed that you had already done this. Looks good, thanks!