private void AnimationSplitTable()
{
if (this.m_ClipList == null)
{
this.m_ClipList = new ReorderableList(new List<AnimationClipInfoProperties>(), typeof(string), false, true, true, true);
this.m_ClipList.onAddCallback = new ReorderableList.AddCallbackDelegate(this.AddClipInList);
this.m_ClipList.onSelectCallback = new ReorderableList.SelectCallbackDelegate(this.SelectClipInList);
this.m_ClipList.onRemoveCallback = new ReorderableList.RemoveCallbackDelegate(this.RemoveClipInList);
this.m_ClipList.drawElementCallback = new ReorderableList.ElementCallbackDelegate(this.DrawClipElement);
this.m_ClipList.drawHeaderCallback = new ReorderableList.HeaderCallbackDelegate(this.DrawClipHeader);
this.m_ClipList.elementHeight = 16f;
this.UpdateList();
this.m_ClipList.index = this.selectedClipIndex;
}
this.m_ClipList.DoLayoutList();
EditorGUI.BeginChangeCheck();
AnimationClipInfoProperties selectedClipInfo = this.GetSelectedClipInfo();
if (selectedClipInfo != null)
{
if ((this.m_AnimationClipEditor != null) && (this.selectedClipIndex != -1))
{
GUILayout.Space(5f);
AnimationClip target = this.m_AnimationClipEditor.target as AnimationClip;
if (!target.legacy)
{
this.GetSelectedClipInfo().AssignToPreviewClip(target);
}
TakeInfo[] importedTakeInfos = this.singleImporter.importedTakeInfos;
string[] array = new string[importedTakeInfos.Length];
for (int i = 0; i < importedTakeInfos.Length; i++)
{
array[i] = importedTakeInfos[i].name;
}
EditorGUI.BeginChangeCheck();
string name = selectedClipInfo.name;
int index = ArrayUtility.IndexOf<string>(array, selectedClipInfo.takeName);
this.m_AnimationClipEditor.takeNames = array;
this.m_AnimationClipEditor.takeIndex = ArrayUtility.IndexOf<string>(array, selectedClipInfo.takeName);
this.m_AnimationClipEditor.DrawHeader();
if (EditorGUI.EndChangeCheck())
{
if (selectedClipInfo.name != name)
{
this.TransferDefaultClipsToCustomClips();
PatchImportSettingRecycleID.Patch(base.serializedObject, 0x4a, name, selectedClipInfo.name);
}
int takeIndex = this.m_AnimationClipEditor.takeIndex;
if ((takeIndex != -1) && (takeIndex != index))
{
selectedClipInfo.name = this.MakeUniqueClipName(array[takeIndex], -1);
this.SetupTakeNameAndFrames(selectedClipInfo, importedTakeInfos[takeIndex]);
GUIUtility.keyboardControl = 0;
this.SelectClip(this.selectedClipIndex);
target = this.m_AnimationClipEditor.target as AnimationClip;
}
}
this.m_AnimationClipEditor.OnInspectorGUI();
if (!target.legacy)
{
this.GetSelectedClipInfo().ExtractFromPreviewClip(target);
}
}
if (EditorGUI.EndChangeCheck())
{
this.TransferDefaultClipsToCustomClips();
}
}
}