void UpdateClipCaps(TimelineClip clip)
 {
     supportsBlending        &= clip.SupportsBlending();
     supportsClipIn          &= clip.SupportsClipIn();
     supportsExtrapolation   &= clip.SupportsExtrapolation();
     supportsSpeedMultiplier &= clip.SupportsSpeedMultiplier();
 }
Ejemplo n.º 2
0
        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);
        }