summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes
diff options
context:
space:
mode:
Diffstat (limited to 'Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes')
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs14
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs37
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs71
-rw-r--r--Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta11
6 files changed, 0 insertions, 155 deletions
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs
deleted file mode 100644
index 3032bc5..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-
-namespace UnityEditor.Timeline
-{
- [AttributeUsage(AttributeTargets.Class)]
- class ActiveInModeAttribute : Attribute
- {
- public TimelineModes modes { get; private set; }
- public ActiveInModeAttribute(TimelineModes timelineModes)
- {
- modes = timelineModes;
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta
deleted file mode 100644
index 63fafba..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3a784fb721704576b3b4c3a7f3324264
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs
deleted file mode 100644
index 29623d2..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace UnityEditor.Timeline
-{
- /// <summary>
- /// Used to indicate path and priority of classes that are auto added to the menu
- /// </summary>
- [AttributeUsage(AttributeTargets.Class)]
- internal class MenuEntryAttribute : Attribute
- {
- public readonly int priority;
- public readonly string name;
- public readonly string subMenuPath;
-
- public MenuEntryAttribute(string path, int priority)
- {
- path = path ?? string.Empty;
- path = L10n.Tr(path);
- this.priority = priority;
-
- int index = path.LastIndexOf('/');
- if (index >= 0)
- {
- name = (index == path.Length - 1) ? string.Empty : path.Substring(index + 1);
- subMenuPath = path.Substring(0, index + 1);
- }
- else
- {
- name = path;
- subMenuPath = string.Empty;
- }
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta
deleted file mode 100644
index 39a11ce..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: e6870f707805737429a719f575621041
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs
deleted file mode 100644
index 756a092..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System;
-using System.Linq;
-using UnityEditor.ShortcutManagement;
-using UnityEngine;
-
-namespace UnityEditor.Timeline
-{
- [AttributeUsage(AttributeTargets.Class, Inherited = false)]
- class ShortcutAttribute : Attribute
- {
- readonly string m_Identifier;
- readonly string m_EventCommandName;
- readonly string m_MenuShortcut;
-
- public ShortcutAttribute(string identifier)
- {
- m_Identifier = identifier;
- m_EventCommandName = identifier;
- }
-
- public ShortcutAttribute(string identifier, string commandName)
- {
- m_Identifier = identifier;
- m_EventCommandName = commandName;
- }
-
- public ShortcutAttribute(KeyCode key, ShortcutModifiers modifiers = ShortcutModifiers.None)
- {
- m_MenuShortcut = new KeyCombination(key, modifiers).ToMenuShortcutString();
- }
-
- public string GetMenuShortcut()
- {
- if (m_MenuShortcut != null)
- return m_MenuShortcut;
-
- //find the mapped shortcut in the shortcut manager
- var shortcut = ShortcutIntegration.instance.directory.FindShortcutEntry(m_Identifier);
- if (shortcut != null && shortcut.combinations.Any())
- {
- return KeyCombination.SequenceToMenuString(shortcut.combinations);
- }
-
- return string.Empty;
- }
-
- public bool MatchesEvent(Event evt)
- {
- if (evt.type != EventType.ExecuteCommand)
- return false;
- return evt.commandName == m_EventCommandName;
- }
- }
-
- [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
- class ShortcutPlatformOverrideAttribute : ShortcutAttribute
- {
- RuntimePlatform platform { get; }
-
- public ShortcutPlatformOverrideAttribute(RuntimePlatform platform, KeyCode key, ShortcutModifiers modifiers = ShortcutModifiers.None)
- : base(key, modifiers)
- {
- this.platform = platform;
- }
-
- public bool MatchesCurrentPlatform()
- {
- return Application.platform == platform;
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta
deleted file mode 100644
index 2d02db9..0000000
--- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: c50a694a8232898498c1cdd47ce9873f
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant: