From 5ffda27ea9903eba5a0849633c8e049b77aeba76 Mon Sep 17 00:00:00 2001 From: Lyuma Date: Fri, 3 Sep 2021 18:00:59 -0700 Subject: gltf export: Fix export of skeletons, skins and blend shapes. Create GLTFSkeleton at the same time we create GLTFNode objects. Create GLTFSkin at the same time we export MeshInstance3D Fixes export of blend shape arrays for meshes with multiple surfaces. Fixes array indexing issues in export of glTF morph target animations. Converts BoneAttachment3D nodes during normal node creation: this avoids special cases during mesh export, and especially exporting skeletons or meshes which are children of BoneAttachment3D. Co-authored-by: K. S. Ernest (iFire) Lee --- modules/gltf/gltf_state.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/gltf/gltf_state.h') diff --git a/modules/gltf/gltf_state.h b/modules/gltf/gltf_state.h index 896ea5fc56..d6614da804 100644 --- a/modules/gltf/gltf_state.h +++ b/modules/gltf/gltf_state.h @@ -44,6 +44,8 @@ #include "gltf_texture.h" #include "core/io/resource.h" +#include "core/templates/map.h" +#include "core/templates/pair.h" #include "core/templates/vector.h" #include "scene/animation/animation_player.h" #include "scene/resources/texture.h" @@ -87,6 +89,9 @@ class GLTFState : public Resource { Vector> animations; Map scene_nodes; + Map skeleton3d_to_gltf_skeleton; + Map> skin_and_skeleton3d_to_gltf_skin; + protected: static void _bind_methods(); -- cgit v1.2.3