summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.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/inspectors/TimelineAssetInspector.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/inspectors/TimelineAssetInspector.cs')
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs78
1 files changed, 0 insertions, 78 deletions
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs
deleted file mode 100644
index 9229464..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using UnityEngine;
-using UnityEngine.Timeline;
-
-namespace UnityEditor.Timeline
-{
- [CustomEditor(typeof(TimelineAsset)), CanEditMultipleObjects]
- class TimelineAssetInspector : Editor
- {
- static class Styles
- {
- public static readonly GUIContent FrameRate = EditorGUIUtility.TrTextContent("Frame Rate", "The frame rate at which this sequence updates");
- public static readonly GUIContent DurationMode = EditorGUIUtility.TrTextContent("Duration Mode", "Specified how the duration of the sequence is calculated");
- public static readonly GUIContent Duration = EditorGUIUtility.TrTextContent("Duration", "The length of the sequence");
- public static readonly GUIContent HeaderTitleMultiselection = EditorGUIUtility.TrTextContent("Timeline Assets");
- }
-
- SerializedProperty m_FrameRateProperty;
- SerializedProperty m_DurationModeProperty;
- SerializedProperty m_FixedDurationProperty;
-
- void InitializeProperties()
- {
- m_FrameRateProperty = serializedObject.FindProperty("m_EditorSettings").FindPropertyRelative("m_Framerate");
- m_DurationModeProperty = serializedObject.FindProperty("m_DurationMode");
- m_FixedDurationProperty = serializedObject.FindProperty("m_FixedDuration");
- }
-
- public void OnEnable()
- {
- InitializeProperties();
- }
-
- internal override bool IsEnabled()
- {
- return !FileUtil.HasReadOnly(targets) && base.IsEnabled();
- }
-
- protected override void OnHeaderGUI()
- {
- string headerTitle;
- if (targets.Length == 1)
- headerTitle = target.name;
- else
- headerTitle = targets.Length.ToString() + " " + Styles.HeaderTitleMultiselection.text;
-
- DrawHeaderGUI(this, headerTitle, 0);
- }
-
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
-
- EditorGUI.BeginChangeCheck();
-
- EditorGUILayout.PropertyField(m_FrameRateProperty, Styles.FrameRate, GUILayout.MinWidth(140));
- var frameRate = m_FrameRateProperty.doubleValue;
-
- EditorGUILayout.PropertyField(m_DurationModeProperty, Styles.DurationMode, GUILayout.MinWidth(140));
-
- var durationMode = (TimelineAsset.DurationMode)m_DurationModeProperty.enumValueIndex;
- var inputEvent = InputEvent.None;
- if (durationMode == TimelineAsset.DurationMode.FixedLength)
- TimelineInspectorUtility.TimeField(m_FixedDurationProperty, Styles.Duration, false, frameRate, double.Epsilon, TimelineClip.kMaxTimeValue * 2, ref inputEvent);
- else
- {
- var isMixed = targets.Length > 1;
- TimelineInspectorUtility.TimeField(Styles.Duration, ((TimelineAsset)target).duration, true, isMixed, frameRate, double.MinValue, double.MaxValue, ref inputEvent);
- }
-
- bool changed = EditorGUI.EndChangeCheck();
-
- serializedObject.ApplyModifiedProperties();
-
- if (changed)
- TimelineWindow.RepaintIfEditingTimelineAsset((TimelineAsset)target);
- }
- }
-}