diff options
author | Lyuma <xn.lyuma@gmail.com> | 2021-09-03 18:00:59 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2021-09-29 13:07:52 -0700 |
commit | 5ffda27ea9903eba5a0849633c8e049b77aeba76 (patch) | |
tree | c4ef49025c189ec0543f1d9be324a66ec7e0a479 /modules/gltf/gltf_state.h | |
parent | 2fc31fdfca29753977b36180e6aab9c28e84cddc (diff) |
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 <ernest.lee@chibifire.com>
Diffstat (limited to 'modules/gltf/gltf_state.h')
-rw-r--r-- | modules/gltf/gltf_state.h | 5 |
1 files changed, 5 insertions, 0 deletions
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<Ref<GLTFAnimation>> animations; Map<GLTFNodeIndex, Node *> scene_nodes; + Map<ObjectID, GLTFSkeletonIndex> skeleton3d_to_gltf_skeleton; + Map<ObjectID, Map<ObjectID, GLTFSkinIndex>> skin_and_skeleton3d_to_gltf_skin; + protected: static void _bind_methods(); |