Skip to content

Commit 0a4dfb3

Browse files
committed
remove commented out code
1 parent f1664d0 commit 0a4dfb3

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -874,39 +874,6 @@ private bool ExportSkeleton (SkinnedMeshRenderer skinnedMesh, FbxScene fbxScene)
874874
pose = boneToBindPose [unityBone.parent] * bindPose.inverse;
875875
}
876876

877-
/*for (int boneIndex = 0, n = boneList.Length; boneIndex < n; boneIndex++) {
878-
var unityBone = boneList [boneIndex];
879-
var fbxBone = MapUnityObjectToFbxNode [unityBone.gameObject];
880-
881-
Matrix4x4 pose;
882-
if (index.ContainsKey(unityBone)) {
883-
int i = index[unityBone];
884-
885-
if (fbxBone.GetSkeleton().GetSkeletonType() == FbxSkeleton.EType.eRoot) {
886-
// bind pose is local -> root. We want root -> local, so invert.
887-
var parentTransform = skinnedMesh.transform;
888-
var parentMatrix = Matrix4x4.TRS (parentTransform.localPosition, parentTransform.localRotation, parentTransform.localScale);
889-
890-
pose = parentMatrix * bindPoses[i].inverse;
891-
} else {
892-
if (index.ContainsKey (unityBone.parent)) {
893-
// Bind pose is local -> parent -> ... -> root.
894-
// We want parent -> local.
895-
// Invert our bind pose to get root -> local.
896-
// The apply parent -> root to leave just parent -> local.
897-
pose = bindPoses [index [unityBone.parent]] * bindPoses [i].inverse;
898-
} else if (unityBone.parent != null) {
899-
//var parentPose = Matrix4x4.TRS (unityBone.parent.localPosition, unityBone.parent.localRotation, unityBone.parent.localScale);
900-
var parentPose = unityBone.parent.worldToLocalMatrix * skinnedMesh.transform.localToWorldMatrix;
901-
pose = parentPose * bindPoses [i].inverse;
902-
} else {
903-
pose = Matrix4x4.identity;
904-
}
905-
}
906-
} else {
907-
pose = Matrix4x4.TRS (unityBone.localPosition, unityBone.localRotation, unityBone.localScale);
908-
}*/
909-
910877
// FBX is transposed relative to Unity: transpose as we convert.
911878
FbxMatrix matrix = new FbxMatrix ();
912879
matrix.SetColumn (0, new FbxVector4 (pose.GetRow (0).x, pose.GetRow (0).y, pose.GetRow (0).z, pose.GetRow (0).w));

0 commit comments

Comments
 (0)