summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-01-10 13:01:30 +0100
committerGitHub <noreply@github.com>2022-01-10 13:01:30 +0100
commitcf25090cc8aa9fa628e56fc50a6affb22ea2a9ae (patch)
tree7e393c10be8f63254b92a9b628f9cfe1b7009c00 /modules
parent5f7bbf4d333ec4a7473a8e720de57bc8cbadd469 (diff)
parentaf67e4c2919cb12ec257ca6bc3bb264933e4e2a4 (diff)
downloadredot-engine-cf25090cc8aa9fa628e56fc50a6affb22ea2a9ae.tar.gz
Merge pull request #56662 from timothyqiu/fbx-fixes
Diffstat (limited to 'modules')
-rw-r--r--modules/fbx/data/fbx_mesh_data.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/fbx/data/fbx_mesh_data.cpp b/modules/fbx/data/fbx_mesh_data.cpp
index 2b29f4d97e..643a74f83e 100644
--- a/modules/fbx/data/fbx_mesh_data.cpp
+++ b/modules/fbx/data/fbx_mesh_data.cpp
@@ -1092,7 +1092,7 @@ HashMap<int, R> FBXMeshData::extract_per_vertex_data(
const int vertex_index = get_vertex_from_polygon_vertex(p_mesh_indices, polygon_vertex_index);
ERR_FAIL_COND_V_MSG(vertex_index < 0, (HashMap<int, R>()), "FBX file corrupted: #ERR05");
ERR_FAIL_COND_V_MSG(vertex_index >= p_vertex_count, (HashMap<int, R>()), "FBX file corrupted: #ERR06");
- const int index_to_direct = p_mapping_data.index[polygon_vertex_index];
+ const int index_to_direct = get_vertex_from_polygon_vertex(p_mapping_data.index, polygon_vertex_index);
T value = p_mapping_data.data[index_to_direct];
aggregate_vertex_data[vertex_index].push_back({ polygon_id, value });
}
@@ -1297,7 +1297,7 @@ HashMap<int, T> FBXMeshData::extract_per_polygon(
} else {
ERR_FAIL_INDEX_V_MSG(polygon_index, (int)p_fbx_data.index.size(), (HashMap<int, T>()), "FBX file is corrupted: #ERR62");
- const int index_to_direct = p_fbx_data.index[polygon_index];
+ const int index_to_direct = get_vertex_from_polygon_vertex(p_fbx_data.index, polygon_index);
T value = p_fbx_data.data[index_to_direct];
aggregate_polygon_data[polygon_index].push_back(value);
}