Skip to content

Commit

Permalink
Merge pull request #1981 from zenustech/improve-fbx
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
ShuliangLu authored Aug 8, 2024
2 parents 6b80d6d + 3a30ee2 commit 2ff2968
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/FBX/FBXSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,10 +833,10 @@ struct NewFBXImportSkeleton : INode {
std::vector<int> bone_connects;
for (auto bone_name: bone_names) {
if (parent_mapping.count(bone_name)) {
auto self_index = std::find(bone_names.begin(), bone_names.end(), bone_name) - bone_names.begin();
auto parent_name = parent_mapping[bone_name];
auto parent_index = std::find(bone_names.begin(), bone_names.end(), parent_name) - bone_names.begin();
if (self_index >= 0 && parent_index >= 0) {
if (std::count(bone_names.begin(), bone_names.end(), parent_name)) {
auto self_index = std::find(bone_names.begin(), bone_names.end(), bone_name) - bone_names.begin();
auto parent_index = std::find(bone_names.begin(), bone_names.end(), parent_name) - bone_names.begin();
bone_connects.push_back(parent_index);
bone_connects.push_back(self_index);
}
Expand Down

0 comments on commit 2ff2968

Please sign in to comment.