private ClipInspector.SelectionInfo BuildSelectionInfo()
        {
            ClipInspector.SelectionInfo result = new ClipInspector.SelectionInfo
            {
                supportsBlending        = true,
                supportsClipIn          = true,
                supportsExtrapolation   = true,
                supportsSpeedMultiplier = true,
                hasBlendIn  = true,
                hasBlendOut = true,
                selectedAssetTypesAreHomogeneous = true
            };
            HashSet <TrackAsset> hashSet = new HashSet <TrackAsset>();
            Object @object = (!this.m_SelectionCache.Any <ClipInspector.EditorClipSelection>()) ? null : this.m_SelectionCache.First <ClipInspector.EditorClipSelection>().clip.asset;
            Type   type    = (!(@object != null)) ? null : @object.GetType();

            foreach (ClipInspector.EditorClipSelection current in this.m_SelectionCache)
            {
                TimelineClip clip = current.clip;
                result.supportsBlending        &= clip.SupportsBlending();
                result.supportsClipIn          &= clip.SupportsClipIn();
                result.supportsExtrapolation   &= clip.SupportsExtrapolation();
                result.supportsSpeedMultiplier &= clip.SupportsSpeedMultiplier();
                result.hasBlendIn  &= clip.hasBlendIn;
                result.hasBlendOut &= clip.hasBlendOut;
                result.selectedAssetTypesAreHomogeneous &= (clip.asset.GetType() == type);
                hashSet.Add(clip.parentTrack);
            }
            result.selectionContainsAtLeastTwoClipsOnTheSameTrack = (hashSet.Count != this.m_SelectionCache.Count <ClipInspector.EditorClipSelection>());
            return(result);
        }
 public void OnEnable()
 {
     this.m_ClipCurveEditor = new ClipInspectorCurveEditor();
     this.m_DefaultIcon     = EditorGUIUtility.FindTexture("DefaultAsset Icon");
     this.m_SelectionCache  = new List <ClipInspector.EditorClipSelection>();
     Object[] targets = base.get_targets();
     for (int i = 0; i < targets.Length; i++)
     {
         Object     @object    = targets[i];
         EditorClip editorClip = @object as EditorClip;
         if (editorClip != null)
         {
             if (!this.IsTimelineAssetValidForEditorClip(editorClip))
             {
                 this.m_SelectionCache.Clear();
                 return;
             }
             this.m_SelectionCache.Add(new ClipInspector.EditorClipSelection(editorClip));
         }
     }
     this.m_SelectionInfo = this.BuildSelectionInfo();
     if (this.m_SelectionInfo.selectedAssetTypesAreHomogeneous)
     {
         Object[] objects = (from e in this.m_SelectionCache
                             select e.clip.asset).ToArray <Object>();
         this.m_SelectedPlayableAssetsInspector = TimelineInspectorUtility.GetInspectorForObjects(objects);
     }
     this.m_MultiselectionHeaderTitle = this.m_SelectionCache.Count + " " + ClipInspector.Styles.MultipleSelectionTitle.get_text();
     this.m_ClipAssetTitle.set_text(this.PlayableAssetSectionTitle());
     this.InitializeProperties();
 }