2
0
Fork 0

Merge pull request #58711 from lyuma/fix_gltf_blend_export

glTF export for new TYPE_BLEND_SHAPE tracks
4.0
Rémi Verschelde 2022-03-03 17:30:47 +07:00 committed by GitHub
commit 3f69ea4f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

@ -6470,8 +6470,8 @@ void GLTFDocument::_convert_animation(Ref<GLTFState> state, AnimationPlayer *ap,
gltf_animation->get_tracks().insert(transform_track_i.key, track); gltf_animation->get_tracks().insert(transform_track_i.key, track);
} }
} }
} else if (String(orig_track_path).contains(":blend_shapes/")) { } else if (String(orig_track_path).contains(":") && animation->track_get_type(track_i) == Animation::TYPE_BLEND_SHAPE) {
const Vector<String> node_suffix = String(orig_track_path).split(":blend_shapes/"); const Vector<String> node_suffix = String(orig_track_path).split(":");
const NodePath path = node_suffix[0]; const NodePath path = node_suffix[0];
const String suffix = node_suffix[1]; const String suffix = node_suffix[1];
Node *node = ap->get_parent()->get_node_or_null(path); Node *node = ap->get_parent()->get_node_or_null(path);