Ensure `ensure_tangents` option actually creates tangent array. Even if it is just a dummy array.
Allow mesh to generate its own tangents when using compression. This allows users to compress meshes without tangents.
Warn users if they are trying to read from tangents without providing tangents.
Assign bone_idx to GLTF importer to fix serialization.
Notifies Skeletons and BoneAttachments when reimporting.
Removes usage of NOTIFICATION_NODE_RECACHE_REQUESTED
This allows Godot to automatically compress meshes to save a lot of bandwidth.
In general, this requires no interaction from the user and should result in
no noticable quality loss.
This scheme is not backwards compatible, so we have provided an upgrade
mechanism, and a mesh versioning mechanism.
Existing meshes can still be used as a result, but users can get a
performance boost by reimporting assets.
Fixes#76338.
Blender 3.6 imports fail with:
```
TypeError: Converting py args to operator properties: : keyword "export_nla_strips" unrecognized
```
The `export_nla_strips` flag was removed and replaced with `export_animation_mode`.
In 3.6.0-3.6.21, this option does not exist at all and causes the failure above.
In 3.6.22, this option was re-added, but does nothing.
See 96a73cb664.
We now need to check the blender version to determine what flags to use.
This adds an additional shell command before every import.
We might consider caching the version, but we'd have to invalidate the cache if the blender version or path changes.
As an aside, the "group animations" setting in Godot does the opposite of what I'd expect.
When `group_tracks=true`, each animation is exported individually.
When `group_tracks=false`, all animations are exported as a single track.
This seems backwards, but I've kept the 3.6 behavior consistent with 3.5.
From https://docs.blender.org/api/3.6/bpy.ops.export_scene.html:
> ACTIONS Actions – Export actions (actives and on NLA tracks) as separate animations.
> ACTIVE_ACTIONS Active actions merged – All the currently assigned actions become one glTF animation.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
The importer already checks if a mesh has vertex colors and enables
vertex colors on the material using it.
Before this fix, GLTF importer would force shader generation to use
vertex colors even if the scene did not have vertex colors at all, or
did not need them; causing inefficient shader and PSO generation.