AssignToPreviewClip() 공개 메소드

public AssignToPreviewClip ( AnimationClip clip ) : void
clip AnimationClip
리턴 void
		public void ShowRange(AnimationClipInfoProperties info)
		{
			this.UpdateEventsPopupClipInfo(info);
			this.m_ClipInfo = info;
			info.AssignToPreviewClip(this.m_Clip);
		}
        void AnimationSplitTable()
        {
            m_ClipList.DoLayoutList();

            EditorGUI.BeginChangeCheck();

            // Show selected clip info
            {
                AnimationClipInfoProperties clip = GetSelectedClipInfo();
                if (clip == null)
                {
                    return;
                }

                if (m_AnimationClipEditor != null)
                {
                    GUILayout.Space(5);

                    AnimationClip actualClip = m_AnimationClipEditor.target as AnimationClip;

                    if (!actualClip.legacy)
                    {
                        clip.AssignToPreviewClip(actualClip);
                    }

                    TakeInfo[] importedTakeInfos = singleImporter.importedTakeInfos;
                    string[]   takeNames         = new string[importedTakeInfos.Length];
                    for (int i = 0; i < importedTakeInfos.Length; i++)
                    {
                        takeNames[i] = importedTakeInfos[i].name;
                    }

                    EditorGUI.BeginChangeCheck();
                    string currentName = clip.name;
                    int    takeIndex   = ArrayUtility.IndexOf(takeNames, clip.takeName);
                    m_AnimationClipEditor.takeNames = takeNames;
                    m_AnimationClipEditor.takeIndex = ArrayUtility.IndexOf(takeNames, clip.takeName);
                    m_AnimationClipEditor.DrawHeader();

                    if (EditorGUI.EndChangeCheck())
                    {
                        clip.name = clip.name.Trim();
                        if (clip.name == String.Empty)
                        {
                            clip.name = currentName;
                        }
                        // We renamed the clip name, try to maintain the localIdentifierInFile so we don't lose any data.
                        if (clip.name != currentName)
                        {
                            var newName = clip.name;
                            clip.name = currentName;
                            clip.name = MakeUniqueClipName(newName);

                            TransferDefaultClipsToCustomClips();
                            UnityType animationClipType = UnityType.FindTypeByName("AnimationClip");
                            ImportSettingInternalID.Rename(serializedObject, animationClipType, currentName, clip.name);
                        }

                        int newTakeIndex = m_AnimationClipEditor.takeIndex;
                        if (newTakeIndex != -1 && newTakeIndex != takeIndex)
                        {
                            clip.name = MakeUniqueClipName(takeNames[newTakeIndex]);
                            SetupTakeNameAndFrames(clip, importedTakeInfos[newTakeIndex]);
                            GUIUtility.keyboardControl = 0;
                            SelectClip(m_ClipList.index);

                            // actualClip has been changed by SelectClip
                            actualClip = m_AnimationClipEditor.target as AnimationClip;
                        }
                    }

                    m_AnimationClipEditor.OnInspectorGUI();

                    AvatarMaskSettings(clip);

                    if (!actualClip.legacy)
                    {
                        clip.ExtractFromPreviewClip(actualClip);
                    }

                    if (EditorGUI.EndChangeCheck() || m_AnimationClipEditor.needsToGenerateClipInfo)
                    {
                        TransferDefaultClipsToCustomClips();
                        m_AnimationClipEditor.needsToGenerateClipInfo = false;
                    }
                }
            }
        }