summaryrefslogtreecommitdiffstats
path: root/modules/fbx/fbx_document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/fbx/fbx_document.cpp')
-rw-r--r--modules/fbx/fbx_document.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/fbx/fbx_document.cpp b/modules/fbx/fbx_document.cpp
index ce097092fb..d6c304d056 100644
--- a/modules/fbx/fbx_document.cpp
+++ b/modules/fbx/fbx_document.cpp
@@ -369,21 +369,25 @@ Error FBXDocument::_parse_nodes(Ref<FBXState> p_state) {
// all skin clusters connected to the bone.
for (const ufbx_connection &child_conn : fbx_node->element.connections_src) {
ufbx_skin_cluster *child_cluster = ufbx_as_skin_cluster(child_conn.dst);
- if (!child_cluster)
+ if (!child_cluster) {
continue;
+ }
ufbx_skin_deformer *child_deformer = _find_skin_deformer(child_cluster);
- if (!child_deformer)
+ if (!child_deformer) {
continue;
+ }
// Found a skin cluster: Now iterate through all the skin clusters of the parent and
// try to find one that used by the same deformer.
for (const ufbx_connection &parent_conn : fbx_node->parent->element.connections_src) {
ufbx_skin_cluster *parent_cluster = ufbx_as_skin_cluster(parent_conn.dst);
- if (!parent_cluster)
+ if (!parent_cluster) {
continue;
+ }
ufbx_skin_deformer *parent_deformer = _find_skin_deformer(parent_cluster);
- if (parent_deformer != child_deformer)
+ if (parent_deformer != child_deformer) {
continue;
+ }
// Success: Found two skin clusters from the same deformer, now we can resolve the
// local bind pose from the difference between the two world-space bind poses.
@@ -1389,7 +1393,7 @@ Error FBXDocument::_parse_animations(Ref<FBXState> p_state) {
for (const ufbx_baked_node &fbx_baked_node : fbx_baked_anim->nodes) {
const GLTFNodeIndex node = fbx_baked_node.typed_id;
- GLTFAnimation::Track &track = animation->get_tracks()[node];
+ GLTFAnimation::NodeTrack &track = animation->get_node_tracks()[node];
for (const ufbx_baked_vec3 &key : fbx_baked_node.translation_keys) {
track.position_track.times.push_back(float(key.time));
@@ -1779,8 +1783,8 @@ void FBXDocument::_import_animation(Ref<FBXState> p_state, AnimationPlayer *p_an
double anim_start_offset = p_trimming ? double(additional_animation_data["time_begin"]) : 0.0;
- for (const KeyValue<int, GLTFAnimation::Track> &track_i : anim->get_tracks()) {
- const GLTFAnimation::Track &track = track_i.value;
+ for (const KeyValue<int, GLTFAnimation::NodeTrack> &track_i : anim->get_node_tracks()) {
+ const GLTFAnimation::NodeTrack &track = track_i.value;
//need to find the path: for skeletons, weight tracks will affect the mesh
NodePath node_path;
//for skeletons, transform tracks always affect bones