Merge pull request #47458 from akien-mga/fbx-fix-bone-suffix

FBX: Fix first bone getting unnecessary '_1' suffix
This commit is contained in:
Rémi Verschelde 2021-03-29 18:30:56 +02:00 committed by GitHub
commit 88f404f1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,7 @@ void FBXSkeleton::init_skeleton(const ImportState &state) {
// Make sure the bone name is unique.
const String bone_name = bone->bone_name;
int same_name_count = 0;
for (int y = x; y < skeleton_bone_count; y++) {
for (int y = x + 1; y < skeleton_bone_count; y++) {
Ref<FBXBone> other_bone = skeleton_bones[y];
if (other_bone.is_valid()) {
if (other_bone->bone_name == bone_name) {