Skip to content

Commit 5cf8d01

Browse files
committed
fix so when exporting anim only, destination is exported
- also that the transforms are still reset when necessary
1 parent 0bc2604 commit 5cf8d01

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2431,8 +2431,14 @@ protected int ExportAnimationOnly(
24312431
}
24322432
}
24332433

2434+
// make sure anim destination node is exported as well
2435+
var exportSet = exportData.goExportSet;
2436+
if (ExportOptions.AnimationDest && ExportOptions.AnimationSource) {
2437+
exportSet.Add (ExportOptions.AnimationDest.gameObject);
2438+
}
2439+
24342440
// export everything else
2435-
foreach (var go in exportData.goExportSet) {
2441+
foreach (var go in exportSet) {
24362442
FbxNode node;
24372443
if (!ExportGameObjectAndParents (
24382444
go, unityGO, fbxScene, out node, newCenter, exportType, ref numObjectsExported, objectCount
@@ -2529,6 +2535,9 @@ private bool ExportGameObjectAndParents(
25292535

25302536
// export regular transform if we are not a bone or failed to export as a bone
25312537
if(!exportedBoneTransform){
2538+
if (TransformShouldBeReset (unityGo.transform)) {
2539+
exportType = TransformExportType.Reset;
2540+
}
25322541
ExportTransform (unityGo.transform, fbxNode, newCenter, exportType);
25332542
}
25342543

0 commit comments

Comments
 (0)