Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhang95 committed Aug 8, 2024
1 parent 6b80d6d commit 3a30ee2
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 3a30ee2

Please sign in to comment.