Open lyuma opened 3 years ago
Still valid in 2ec379e Why is this labelled as regression though?
It's a regression because the initial blend weights set by imported glTF files, such as the 0.5 in the example, are being ignored, while it used to work with the old ArrayMesh api.
Without fixing ImporterMeshInstance3D, there isn't an obvious way to store the default blend weights during the import process, up until the final ArrayMesh is generated. ImporterMeshInstance3D is the place that makes sense.
Godot version: 4.0.dev 45d3b965bb55f3111478306070034ed18e8fa5e4
OS/device including version: Windows 10.0.19041.985
Issue description: glTF 2.0 permits meshes to assign "weights" to set blend shapes at a default value.
However, EditorSceneImporterMesh does not have an API to assign weights. This problem affects at least glTF. It could also affect COLLADA or FBX if those store the default blend weights.
The code in
GLTFDocument::_generate_mesh_instance
does the following to assign the blend shape weights onto the mesh:I have verified with a debugger that this code all works. However,
mi
is anEditorSceneImporterMesh
, which does not define properties forblend_shapes/
... so that set() call is ignored.The sample glTF model uses the following JSON:
Steps to reproduce:
Minimal reproduction project: gltf_khronos_morph_primitives.zip