Merge pull request #96136 from SaracenOne/auto_mapper_fix
Prevent automapper throwing obscure error.
This commit is contained in:
commit
23a0dac7d8
1 changed files with 5 additions and 3 deletions
|
@ -1229,9 +1229,11 @@ void BoneMapper::auto_mapping_process(Ref<BoneMap> &p_bone_map) {
|
||||||
picklist.push_back("face");
|
picklist.push_back("face");
|
||||||
int head = search_bone_by_name(skeleton, picklist, BONE_SEGREGATION_NONE, neck);
|
int head = search_bone_by_name(skeleton, picklist, BONE_SEGREGATION_NONE, neck);
|
||||||
if (head == -1) {
|
if (head == -1) {
|
||||||
search_path = skeleton->get_bone_children(neck);
|
if (neck != -1) {
|
||||||
if (search_path.size() == 1) {
|
search_path = skeleton->get_bone_children(neck);
|
||||||
head = search_path[0]; // Maybe only one child of the Neck is Head.
|
if (search_path.size() == 1) {
|
||||||
|
head = search_path[0]; // Maybe only one child of the Neck is Head.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (head == -1) {
|
if (head == -1) {
|
||||||
|
|
Loading…
Reference in a new issue