Skip to content

Commit 717a515

Browse files
authored
Merge pull request #333 from Unity-Technologies/Uni-32833-ExportSkinnedMeshWithoutAnimation
Uni 32833 export skinned mesh without animation
2 parents 0afcfd2 + 7bd50f5 commit 717a515

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ namespace Editor
6464

6565
public class ModelExporter : System.IDisposable
6666
{
67+
// To be replaced by checkbox in Fbx Export settings
68+
bool removeAnimationsFromSkinnedMeshRenderer = true;
69+
6770
const string Title =
6871
"exports static meshes with materials and textures";
6972

@@ -1784,6 +1787,12 @@ protected void ExportAnimationClip (AnimationClip uniAnimClip, GameObject uniRoo
17841787
if (!uniGO) {
17851788
continue;
17861789
}
1790+
1791+
// Do not create the curves if the component is a SkinnedMeshRenderer and if the option in FBX Export settings is toggled on.
1792+
if (removeAnimationsFromSkinnedMeshRenderer && (uniGO.GetComponent<SkinnedMeshRenderer>() != null || uniGO.GetComponentInChildren<SkinnedMeshRenderer>() != null))
1793+
{
1794+
continue;
1795+
}
17871796

17881797
int index = QuaternionCurve.GetQuaternionIndex (uniCurveBinding.propertyName);
17891798
if (index >= 0) {

0 commit comments

Comments
 (0)