Skip to content

Commit 9a93844

Browse files
committed
hook up UI to removing animation on skinned mesh
1 parent ba37c90 commit 9a93844

File tree

6 files changed

+27
-7
lines changed

6 files changed

+27
-7
lines changed

Assets/FbxExporters/Editor/ConvertToPrefabSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public override void OnInspectorGUI ()
5757
EditorGUILayout.LabelField(new GUIContent("Transfer Root Motion To", "Select bone to transfer root motion animation to."), GUILayout.Width(LabelWidth - FieldOffset));
5858
EditorGUILayout.Popup(0, new string[]{"<None>"});
5959
GUILayout.EndHorizontal();
60+
EditorGUI.EndDisabledGroup ();
6061

6162
exportSettings.animatedSkinnedMesh = EditorGUILayout.Toggle ("Animated Skinned Mesh", exportSettings.animatedSkinnedMesh);
62-
EditorGUI.EndDisabledGroup ();
6363

6464
exportSettings.mayaCompatibleNaming = EditorGUILayout.Toggle (
6565
new GUIContent ("Compatible Naming:",

Assets/FbxExporters/Editor/ExportModelSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public override void OnInspectorGUI ()
7373
EditorGUILayout.LabelField(new GUIContent("Transfer Root Motion To", "Select bone to transfer root motion animation to."), GUILayout.Width(LabelWidth - FieldOffset));
7474
EditorGUILayout.Popup(0, new string[]{"<None>"});
7575
GUILayout.EndHorizontal();
76+
EditorGUI.EndDisabledGroup ();
7677

7778
exportSettings.animatedSkinnedMesh = EditorGUILayout.Toggle ("Animated Skinned Mesh", exportSettings.animatedSkinnedMesh);
78-
EditorGUI.EndDisabledGroup ();
7979

8080
exportSettings.mayaCompatibleNaming = EditorGUILayout.Toggle (
8181
new GUIContent ("Compatible Naming:",

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ 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-
7067
const string Title =
7168
"exports static meshes with materials and textures";
7269

@@ -1810,9 +1807,9 @@ protected void ExportAnimationClip (AnimationClip uniAnimClip, GameObject uniRoo
18101807
}
18111808

18121809
// Do not create the curves if the component is a SkinnedMeshRenderer and if the option in FBX Export settings is toggled on.
1813-
if (removeAnimationsFromSkinnedMeshRenderer && (uniGO.GetComponent<SkinnedMeshRenderer>() != null || uniGO.GetComponentInChildren<SkinnedMeshRenderer>() != null))
1810+
if (!ExportOptions.AnimateSkinnedMesh && (uniGO.GetComponent<SkinnedMeshRenderer>() != null || uniGO.GetComponentInChildren<SkinnedMeshRenderer>() != null))
18141811
{
1815-
continue;
1812+
continue;
18161813
}
18171814

18181815
int index = QuaternionCurve.GetQuaternionIndex (uniCurveBinding.propertyName);

Assets/FbxExporters/Editor/UnitTests/ExportTimelineClipTest.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/FbxExporters/Editor/UnitTests/FbxCameraTests.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/FbxExporters/Editor/UnitTests/Models/Cowboy/cowboyMidPoly(riged).FBX.meta

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)