MenuPriority.cs
11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
using System;
using UnityEngine;
namespace UnityEditor.Timeline.Actions
{
/// <summary>
/// Priorities for menu item ordering. See <see cref="MenuEntryAttribute"/>.
/// </summary>
public static class MenuPriority
{
/// <summary>
/// Default priority for a menu. It will add at the end of the context menu before the 'add' menus.
/// </summary>
public const int defaultPriority = 9000;
/// <summary>
/// This value is the separator difference that will be needed to create a separator between menu item.
/// </summary>
public const int separatorAt = 1000;
/// <summary>
/// Priorities for Timeline Action menu items.
/// </summary>
public static class TimelineActionSection
{
/// <summary>
/// First Timeline action menu item priority.
/// </summary>
public const int start = 1000;
/// <summary>
/// Copy menu item priority.
/// </summary>
public const int copy = start + 100;
/// <summary>
/// Paste menu item priority.
/// </summary>
public const int paste = start + 200;
/// <summary>
/// Duplicate menu item priority.
/// </summary>
public const int duplicate = start + 300;
/// <summary>
/// Delete menu item priority.
/// </summary>
public const int delete = start + 400;
/// <summary>
/// Match Content menu item priority.
/// </summary>
public const int matchContent = start + 500;
}
/// <summary>
/// Priorities for Track action menu items.
/// </summary>
public static class TrackActionSection
{
/// <summary>
/// First Track action menu item priority.
/// </summary>
public const int start = TimelineActionSection.start + separatorAt;
/// <summary>
/// Lock track menu item priority.
/// </summary>
public const int lockTrack = start + 100;
/// <summary>
/// Lock selected track menu item priority.
/// </summary>
public const int lockSelected = start + 150;
/// <summary>
/// Mute track menu item priority.
/// </summary>
public const int mute = start + 200;
/// <summary>
/// Mute selected track menu item priority.
/// </summary>
public const int muteSelected = start + 250;
/// <summary>
/// Show hide marker menu item priority.
/// </summary>
public const int showHideMarkers = start + 300;
/// <summary>
/// Remove Invalid Markers menu item priority.
/// </summary>
public const int removeInvalidMarkers = start + 400;
/// <summary>
/// Edit Track In Animation Window menu item priority.
/// </summary>
public const int editInAnimationWindow = start + 800;
}
/// <summary>
/// Priorities for Add Tracks menu items.
/// </summary>
public static class AddTrackMenu
{
/// <summary>
/// First Add Track menu item priority.
/// </summary>
public const int start = TrackActionSection.start + separatorAt;
/// <summary>
/// Add Layer Track menu item priority.
/// </summary>
public const int addLayerTrack = start;
}
/// <summary>
/// Priorities for Clip edition menu items.
/// </summary>
public static class ClipEditActionSection
{
/// <summary>
/// First Edit Clip menu item priority.
/// </summary>
public const int start = AddTrackMenu.start + separatorAt;
/// <summary>
/// Edit Clip In Animation Window menu item priority.
/// </summary>
public const int editInAnimationWindow = start + 100;
/// <summary>
/// Edit Clip Sub Timeline menu item priority.
/// </summary>
public const int editSubTimeline = start + 200;
}
/// <summary>
/// Priorities for Clip action menu items.
/// </summary>
public static class ClipActionSection
{
/// <summary>
/// First Clip action menu item priority.
/// </summary>
public const int start = ClipEditActionSection.start + separatorAt;
/// <summary>
/// Trim start menu item priority.
/// </summary>
public const int trimStart = start + 100;
/// <summary>
/// Trim end menu item priority.
/// </summary>
public const int trimEnd = start + 110;
/// <summary>
/// Split menu item priority.
/// </summary>
public const int split = start + 120;
/// <summary>
/// Complete Last Loop menu item priority.
/// </summary>
public const int completeLastLoop = start + separatorAt;
/// <summary>
/// Trim Last Loop menu item priority.
/// </summary>
public const int trimLastLoop = start + separatorAt + 110;
/// <summary>
/// Match duration menu item priority.
/// </summary>
public const int matchDuration = start + separatorAt + 120;
/// <summary>
/// Double Speed menu item priority.
/// </summary>
public const int doubleSpeed = start + 2 * separatorAt;
/// <summary>
/// Half Speed menu item priority.
/// </summary>
public const int halfSpeed = start + 2 * separatorAt + 110;
/// <summary>
/// Reset Duration menu item priority.
/// </summary>
public const int resetDuration = start + 3 * separatorAt;
/// <summary>
/// Reset Speed menu item priority.
/// </summary>
public const int resetSpeed = start + 3 * separatorAt + 110;
/// <summary>
/// Reset All menu item priority.
/// </summary>
public const int resetAll = start + 3 * separatorAt + 120;
/// <summary>
/// Tile menu item priority.
/// </summary>
public const int tile = start + 300;
/// <summary>
/// Find source asset menu item priority.
/// </summary>
public const int findSourceAsset = start + 400;
}
/// <summary>
/// Priorities for Marker action menu items.
/// </summary>
public static class MarkerActionSection
{
/// <summary>
/// First Marker action menu item priority.
/// </summary>
public const int start = ClipActionSection.start + separatorAt;
}
/// <summary>
/// Priorities for custom Timeline action menu items.
/// </summary>
public static class CustomTimelineActionSection
{
/// <summary>
/// First custom Timeline action menu item priority.
/// </summary>
public const int start = MarkerActionSection.start + separatorAt;
}
/// <summary>
/// Priorities for Custom Track action menu items.
/// </summary>
public static class CustomTrackActionSection
{
/// <summary>
/// First custom track action menu item priority.
/// </summary>
public const int start = CustomTimelineActionSection.start + separatorAt;
/// <summary>
/// Convert Animation to clip menu item priority.
/// </summary>
public const int convertToClipMode = start + 100;
/// <summary>
/// Convert Clip to animation menu item priority.
/// </summary>
public const int convertFromClipMode = start + 200;
/// <summary>
/// Apply Track offset menu item priority.
/// </summary>
public const int applyTrackOffset = start + 300;
/// <summary>
/// Apply Scene offset menu item priority.
/// </summary>
public const int applySceneOffset = start + 310;
/// <summary>
/// Apply Auto offset menu item priority.
/// </summary>
public const int applyAutoOffset = start + 320;
/// <summary>
/// Add override track menu item priority.
/// </summary>
public const int addOverrideTrack = start + 500;
/// <summary>
/// User custom track action menu item priority.
/// </summary>
public const int customTrackAction = start + 900;
}
/// <summary>
/// Custom clip action menu item priority.
/// </summary>
public static class CustomClipActionSection
{
/// <summary>
/// First custom clip action menu item priority.
/// </summary>
public const int start = CustomTrackActionSection.start + separatorAt;
/// <summary>
/// Match previous menu item priority.
/// </summary>
public const int matchPrevious = start + 100;
/// <summary>
/// Match next menu item priority.
/// </summary>
public const int matchNext = start + 110;
/// <summary>
/// Reset offset menu item priority.
/// </summary>
public const int resetOffset = start + 120;
/// <summary>
/// User custom clip action menu item priority.
/// </summary>
public const int customClipAction = start + 900;
}
/// <summary>
/// Priorities for menu entries to create Timeline items.
/// </summary>
public static class AddItem
{
/// <summary>
/// Add group menu item priority.
/// </summary>
public const int addGroup = defaultPriority + separatorAt;
/// <summary>
/// Add track menu item priority.
/// </summary>
public const int addTrack = addGroup + separatorAt;
/// <summary>
/// Add custom track menu item priority.
/// </summary>
public const int addCustomTrack = addTrack + separatorAt;
/// <summary>
/// Add clip menu item priority.
/// </summary>
public const int addClip = addCustomTrack + separatorAt;
/// <summary>
/// Add custom clip menu item priority.
/// </summary>
public const int addCustomClip = addClip + separatorAt;
/// <summary>
/// Add marker menu item priority.
/// </summary>
public const int addMarker = addCustomClip + separatorAt;
/// <summary>
/// Add custom marker menu item priority.
/// </summary>
public const int addCustomMarker = addMarker + separatorAt;
}
}
}