You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
FBX Import: Check bone map access for valid cluster target node id
fix #47184
This commit is contained in:
@@ -417,6 +417,7 @@ void FBXMeshData::sanitize_vertex_weights(const ImportState &state) {
|
|||||||
|
|
||||||
int bind_id = 0;
|
int bind_id = 0;
|
||||||
for (const FBXDocParser::Cluster *cluster : fbx_skin->Clusters()) {
|
for (const FBXDocParser::Cluster *cluster : fbx_skin->Clusters()) {
|
||||||
|
ERR_CONTINUE_MSG(!state.fbx_bone_map.has(cluster->TargetNode()->ID()), "Missing bone map for cluster target node with id " + uitos(cluster->TargetNode()->ID()) + ".");
|
||||||
Ref<FBXBone> bone = state.fbx_bone_map[cluster->TargetNode()->ID()];
|
Ref<FBXBone> bone = state.fbx_bone_map[cluster->TargetNode()->ID()];
|
||||||
skeleton_to_skin_bind_id.insert(bone->godot_bone_id, bind_id);
|
skeleton_to_skin_bind_id.insert(bone->godot_bone_id, bind_id);
|
||||||
bind_id++;
|
bind_id++;
|
||||||
|
|||||||
Reference in New Issue
Block a user