summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
commit3af4c218c0e70167db23a6303d2af30aff37d2fe (patch)
tree927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs
parentb6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff)
downloadProject-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs')
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs79
1 files changed, 0 insertions, 79 deletions
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs
deleted file mode 100644
index fbb3648..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.Playables;
-using UnityEngine.Timeline;
-
-namespace UnityEditor.Timeline
-{
- partial class TimelineWindow
- {
- PlayableLookup m_PlayableLookup = new PlayableLookup();
-
- class PlayableLookup
- {
- const int k_InitialDictionarySize = 10;
-
- readonly Dictionary<AnimationClip, Playable> m_AnimationClipToPlayable =
- new Dictionary<AnimationClip, Playable>(k_InitialDictionarySize);
- readonly Dictionary<AnimationClip, TimelineClip> m_AnimationClipToTimelineClip =
- new Dictionary<AnimationClip, TimelineClip>(k_InitialDictionarySize);
-
- public void UpdatePlayableLookup(TimelineClip clip, GameObject go, Playable p)
- {
- if (clip == null || go == null || !p.IsValid())
- return;
-
- if (clip.curves != null)
- m_AnimationClipToTimelineClip[clip.curves] = clip;
-
- UpdatePlayableLookup(clip.parentTrack.timelineAsset, clip, go, p);
- }
-
- public void UpdatePlayableLookup(TrackAsset track, GameObject go, Playable p)
- {
- if (track == null || go == null || !p.IsValid())
- return;
-
- UpdatePlayableLookup(track.timelineAsset, track, go, p);
- }
-
- void UpdatePlayableLookup(TimelineAsset timelineAsset, ICurvesOwner curvesOwner, GameObject go, Playable p)
- {
- var director = go.GetComponent<PlayableDirector>();
- var editingDirector = instance.state.editSequence.director;
- // No Asset mode update
- if (curvesOwner.curves != null && director != null && director == editingDirector &&
- timelineAsset == instance.state.editSequence.asset)
- {
- m_AnimationClipToPlayable[curvesOwner.curves] = p;
- }
- }
-
- public bool GetPlayableFromAnimClip(AnimationClip clip, out Playable p)
- {
- if (clip == null)
- {
- p = Playable.Null;
- return false;
- }
-
- return m_AnimationClipToPlayable.TryGetValue(clip, out p);
- }
-
- public TimelineClip GetTimelineClipFromCurves(AnimationClip clip)
- {
- if (clip == null)
- return null;
-
- TimelineClip timelineClip = null;
- m_AnimationClipToTimelineClip.TryGetValue(clip, out timelineClip);
- return timelineClip;
- }
-
- public void ClearPlayableLookup()
- {
- m_AnimationClipToPlayable.Clear();
- }
- }
- }
-}