CLI: Using `-meshopt`, the output glTF file may have an `"animations": null` JSON entry, which is not valid glTF.
Hi,
When using a command such as CompressonatorCLI.exe -meshopt in.gltf out.gltf, if the in.gltf file does not specify animations, then the out.gltf file will be written with an "animations": null entry, which is not valid glTF; the entry should be omitted altogether instead.
This problem is reported by the official glTF extension for Visual Studio Code, and also this causes the glTF file to be unreadable by some loaders such as gltf-rs.
Expected result:
If the input glTF does not have any animations, then the output glTF file should either omit the "animations" attribute, ~~OR specify it with a value of [] instead of null.~~ EDIT: actually, [] is not valid either.
I guess the issue would also occur with other root attributes such as "scenes", however rare that may be.
@yoanlcq Good catch! This will be fixed in the next release.
The issue has been resolved in current release v4.4