forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationMode.cs
More file actions
291 lines (239 loc) · 10.5 KB
/
Copy pathAnimationMode.cs
File metadata and controls
291 lines (239 loc) · 10.5 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
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Scripting;
namespace UnityEditor
{
public sealed class AnimationMode
{
private static bool s_InAnimationPlaybackMode = false;
private static bool s_InAnimationRecordMode = false;
private static PrefColor s_AnimatedPropertyColor = new PrefColor("Animation/Property Animated", 0.82f, 0.97f, 1f, 1f, 0.54f, 0.85f, 1f, 1f);
private static PrefColor s_RecordedPropertyColor = new PrefColor("Animation/Property Recorded", 1f, 0.6f, 0.6f, 1f, 1f, 0.5f, 0.5f, 1f);
private static PrefColor s_CandidatePropertyColor = new PrefColor("Animation/Property Candidate", 1f, 0.7f, 0.6f, 1f, 1f, 0.67f, 0.43f, 1f);
private static AnimationModeDriver s_DummyDriver;
public static Color animatedPropertyColor
{
get
{
return AnimationMode.s_AnimatedPropertyColor;
}
}
public static Color recordedPropertyColor
{
get
{
return AnimationMode.s_RecordedPropertyColor;
}
}
public static Color candidatePropertyColor
{
get
{
return AnimationMode.s_CandidatePropertyColor;
}
}
private static AnimationModeDriver DummyDriver()
{
if (AnimationMode.s_DummyDriver == null)
{
AnimationMode.s_DummyDriver = ScriptableObject.CreateInstance<AnimationModeDriver>();
AnimationMode.s_DummyDriver.name = "DummyDriver";
}
return AnimationMode.s_DummyDriver;
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool IsPropertyAnimated(UnityEngine.Object target, string propertyPath);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool IsPropertyCandidate(UnityEngine.Object target, string propertyPath);
public static void StopAnimationMode()
{
AnimationMode.StopAnimationMode(AnimationMode.DummyDriver());
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void StopAnimationMode(UnityEngine.Object driver);
public static bool InAnimationMode()
{
return AnimationMode.Internal_InAnimationModeNoDriver();
}
internal static bool InAnimationMode(UnityEngine.Object driver)
{
return AnimationMode.Internal_InAnimationMode(driver);
}
public static void StartAnimationMode()
{
AnimationMode.StartAnimationMode(AnimationMode.DummyDriver());
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void StartAnimationMode(UnityEngine.Object driver);
internal static void StopAnimationPlaybackMode()
{
AnimationMode.s_InAnimationPlaybackMode = false;
}
internal static bool InAnimationPlaybackMode()
{
return AnimationMode.s_InAnimationPlaybackMode;
}
internal static void StartAnimationPlaybackMode()
{
AnimationMode.s_InAnimationPlaybackMode = true;
}
internal static void StopAnimationRecording()
{
AnimationMode.s_InAnimationRecordMode = false;
}
internal static bool InAnimationRecording()
{
return AnimationMode.s_InAnimationRecordMode;
}
internal static void StartAnimationRecording()
{
AnimationMode.s_InAnimationRecordMode = true;
}
internal static void StartCandidateRecording(UnityEngine.Object driver)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.StartCandidateRecording may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_StartCandidateRecording(driver);
}
internal static void AddCandidate(EditorCurveBinding binding, PropertyModification modification, bool keepPrefabOverride)
{
if (!AnimationMode.IsRecordingCandidates())
{
throw new InvalidOperationException("AnimationMode.AddCandidate may only be called when recording candidates. See AnimationMode.StartCandidateRecording.");
}
AnimationMode.Internal_AddCandidate(binding, modification, keepPrefabOverride);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void StopCandidateRecording();
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool IsRecordingCandidates();
public static void BeginSampling()
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.BeginSampling may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_BeginSampling();
}
public static void EndSampling()
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.EndSampling may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_EndSampling();
}
public static void SampleAnimationClip(GameObject gameObject, AnimationClip clip, float time)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.SampleAnimationClip may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_SampleAnimationClip(gameObject, clip, time);
}
internal static void SampleCandidateClip(GameObject gameObject, AnimationClip clip, float time)
{
if (!AnimationMode.IsRecordingCandidates())
{
throw new InvalidOperationException("AnimationMode.SampleCandidateClip may only be called when recording candidates. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_SampleCandidateClip(gameObject, clip, time);
}
public static void AddPropertyModification(EditorCurveBinding binding, PropertyModification modification, bool keepPrefabOverride)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.AddPropertyModification may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_AddPropertyModification(binding, modification, keepPrefabOverride);
}
internal static void InitializePropertyModificationForGameObject(GameObject gameObject, AnimationClip clip)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.InitializePropertyModificationForGameObject may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_InitializePropertyModificationForGameObject(gameObject, clip);
}
internal static void InitializePropertyModificationForObject(UnityEngine.Object target, AnimationClip clip)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.InitializePropertyModificationForObject may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_InitializePropertyModificationForObject(target, clip);
}
internal static void RevertPropertyModificationsForGameObject(GameObject gameObject)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.RevertPropertyModificationsForGameObject may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_RevertPropertyModificationsForGameObject(gameObject);
}
internal static void RevertPropertyModificationsForObject(UnityEngine.Object target)
{
if (!AnimationMode.InAnimationMode())
{
throw new InvalidOperationException("AnimationMode.RevertPropertyModificationsForObject may only be called in animation mode. See AnimationMode.StartAnimationMode.");
}
AnimationMode.Internal_RevertPropertyModificationsForObject(target);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool Internal_InAnimationMode(UnityEngine.Object driver);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool Internal_InAnimationModeNoDriver();
private static void Internal_AddCandidate(EditorCurveBinding binding, PropertyModification modification, bool keepPrefabOverride)
{
AnimationMode.INTERNAL_CALL_Internal_AddCandidate(ref binding, modification, keepPrefabOverride);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_Internal_AddCandidate(ref EditorCurveBinding binding, PropertyModification modification, bool keepPrefabOverride);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_StartCandidateRecording(UnityEngine.Object driver);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_BeginSampling();
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_EndSampling();
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_SampleAnimationClip(GameObject gameObject, AnimationClip clip, float time);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_SampleCandidateClip(GameObject gameObject, AnimationClip clip, float time);
private static void Internal_AddPropertyModification(EditorCurveBinding binding, PropertyModification modification, bool keepPrefabOverride)
{
AnimationMode.INTERNAL_CALL_Internal_AddPropertyModification(ref binding, modification, keepPrefabOverride);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_Internal_AddPropertyModification(ref EditorCurveBinding binding, PropertyModification modification, bool keepPrefabOverride);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_InitializePropertyModificationForGameObject(GameObject gameObject, AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_InitializePropertyModificationForObject(UnityEngine.Object target, AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_RevertPropertyModificationsForGameObject(GameObject gameObject);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_RevertPropertyModificationsForObject(UnityEngine.Object target);
}
}