Skip to content

Commit 15ca76b

Browse files
committed
add transfer root motion UI
1 parent e366f21 commit 15ca76b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Assets/FbxExporters/Editor/ExportModelSettings.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ public override void OnInspectorGUI ()
6767
EditorGUI.EndDisabledGroup ();
6868
GUILayout.EndHorizontal();
6969

70-
// TODO: add implementation for these options, grey out in the meantime
71-
EditorGUI.BeginDisabledGroup (true);
7270
GUILayout.BeginHorizontal();
73-
EditorGUILayout.LabelField(new GUIContent("Transfer Root Motion To", "Select bone to transfer root motion animation to."), GUILayout.Width(LabelWidth - FieldOffset));
74-
EditorGUILayout.Popup(0, new string[]{"<None>"});
71+
EditorGUILayout.LabelField(new GUIContent("Transfer Animation", "Select bone to transfer root motion animation to."), GUILayout.Width(LabelWidth - FieldOffset));
7572
GUILayout.EndHorizontal();
73+
EditorGUI.indentLevel++;
74+
exportSettings.animSource = EditorGUILayout.ObjectField ("Source", exportSettings.animSource, typeof(Transform), allowSceneObjects: true) as Transform;
75+
exportSettings.animDest = EditorGUILayout.ObjectField ("Destination", exportSettings.animDest, typeof(Transform), allowSceneObjects: true) as Transform;
76+
EditorGUI.indentLevel--;
7677

7778
exportSettings.animatedSkinnedMesh = EditorGUILayout.Toggle ("Animated Skinned Mesh", exportSettings.animatedSkinnedMesh);
7879
EditorGUI.EndDisabledGroup ();
@@ -125,6 +126,11 @@ public abstract class ExportOptionsSettingsSerializeBase : IExportOptions
125126
public bool animatedSkinnedMesh = true;
126127
public bool mayaCompatibleNaming = true;
127128

129+
[System.NonSerialized]
130+
public Transform animSource;
131+
[System.NonSerialized]
132+
public Transform animDest;
133+
128134
public ExportSettings.ExportFormat ExportFormat { get { return exportFormat; } }
129135
public void SetExportFormat(ExportSettings.ExportFormat format){ this.exportFormat = format; }
130136
public bool AnimateSkinnedMesh { get { return animatedSkinnedMesh; } }

0 commit comments

Comments
 (0)