Skip to content

Commit cab86c3

Browse files
committed
dont assume rootbone is root of bone hierarchy
1 parent 1abeec6 commit cab86c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Packages/com.unity.formats.fbx/Editor/Scripts/FbxExporter.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,10 +2792,9 @@ private bool ExportGameObjectAndParents(
27922792
}
27932793

27942794
SkinnedMeshBoneInfo parentBoneInfo = null;
2795-
// if this object was a bone but not the skinned mesh rootbone, and it's parent is also a bone, then
2795+
// if this object was a bone and it's parent is also a bone, then
27962796
// pass the bone info when exporting the parent recursively.
2797-
if (boneInfo != null && boneInfo.skinnedMesh.rootBone != null &&
2798-
unityGo.transform != boneInfo.skinnedMesh.rootBone && boneInfo.boneDict.ContainsKey(unityGo.transform.parent))
2797+
if (boneInfo != null && boneInfo.boneDict.ContainsKey(unityGo.transform.parent))
27992798
{
28002799
parentBoneInfo = boneInfo;
28012800
}

0 commit comments

Comments
 (0)