forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimationUtility.cs
More file actions
591 lines (506 loc) · 22.4 KB
/
AnimationUtility.cs
File metadata and controls
591 lines (506 loc) · 22.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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Internal;
using UnityEngine.Scripting;
namespace UnityEditor
{
public sealed class AnimationUtility
{
public enum CurveModifiedType
{
CurveDeleted,
CurveModified,
ClipModified
}
public delegate void OnCurveWasModified(AnimationClip clip, EditorCurveBinding binding, AnimationUtility.CurveModifiedType deleted);
public enum TangentMode
{
Free,
Auto,
Linear,
Constant,
ClampedAuto
}
public static AnimationUtility.OnCurveWasModified onCurveWasModified;
private static int kBrokenMask = 1;
private static int kLeftTangentMask = 30;
private static int kRightTangentMask = 480;
[Obsolete("GetAnimationClips(Animation) is deprecated. Use GetAnimationClips(GameObject) instead.")]
public static AnimationClip[] GetAnimationClips(Animation component)
{
return AnimationUtility.GetAnimationClips(component.gameObject);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern AnimationClip[] GetAnimationClips(GameObject gameObject);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void SetAnimationClips(Animation animation, AnimationClip[] clips);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern EditorCurveBinding[] GetAnimatableBindings(GameObject targetObject, GameObject root);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern EditorCurveBinding[] GetScriptableObjectAnimatableBindings(ScriptableObject scriptableObject);
public static bool GetFloatValue(GameObject root, EditorCurveBinding binding, out float data)
{
return AnimationUtility.INTERNAL_CALL_GetFloatValue(root, ref binding, out data);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool INTERNAL_CALL_GetFloatValue(GameObject root, ref EditorCurveBinding binding, out float data);
public static Type GetEditorCurveValueType(GameObject root, EditorCurveBinding binding)
{
return AnimationUtility.INTERNAL_CALL_GetEditorCurveValueType(root, ref binding);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Type INTERNAL_CALL_GetEditorCurveValueType(GameObject root, ref EditorCurveBinding binding);
internal static Type GetScriptableObjectEditorCurveValueType(ScriptableObject scriptableObject, EditorCurveBinding binding)
{
return AnimationUtility.INTERNAL_CALL_GetScriptableObjectEditorCurveValueType(scriptableObject, ref binding);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern Type INTERNAL_CALL_GetScriptableObjectEditorCurveValueType(ScriptableObject scriptableObject, ref EditorCurveBinding binding);
public static bool GetObjectReferenceValue(GameObject root, EditorCurveBinding binding, out UnityEngine.Object targetObject)
{
return AnimationUtility.INTERNAL_CALL_GetObjectReferenceValue(root, ref binding, out targetObject);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool INTERNAL_CALL_GetObjectReferenceValue(GameObject root, ref EditorCurveBinding binding, out UnityEngine.Object targetObject);
public static UnityEngine.Object GetAnimatedObject(GameObject root, EditorCurveBinding binding)
{
return AnimationUtility.INTERNAL_CALL_GetAnimatedObject(root, ref binding);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern UnityEngine.Object INTERNAL_CALL_GetAnimatedObject(GameObject root, ref EditorCurveBinding binding);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern Type PropertyModificationToEditorCurveBinding(PropertyModification modification, GameObject gameObject, out EditorCurveBinding binding);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern EditorCurveBinding[] GetCurveBindings(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern EditorCurveBinding[] GetObjectReferenceCurveBindings(AnimationClip clip);
public static ObjectReferenceKeyframe[] GetObjectReferenceCurve(AnimationClip clip, EditorCurveBinding binding)
{
return AnimationUtility.INTERNAL_CALL_GetObjectReferenceCurve(clip, ref binding);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern ObjectReferenceKeyframe[] INTERNAL_CALL_GetObjectReferenceCurve(AnimationClip clip, ref EditorCurveBinding binding);
private static void Internal_SetObjectReferenceCurve(AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes)
{
AnimationUtility.INTERNAL_CALL_Internal_SetObjectReferenceCurve(clip, ref binding, keyframes);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_Internal_SetObjectReferenceCurve(AnimationClip clip, ref EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes);
public static AnimationCurve GetEditorCurve(AnimationClip clip, EditorCurveBinding binding)
{
return AnimationUtility.INTERNAL_CALL_GetEditorCurve(clip, ref binding);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern AnimationCurve INTERNAL_CALL_GetEditorCurve(AnimationClip clip, ref EditorCurveBinding binding);
private static void Internal_SetEditorCurve(AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve, bool syncEditorCurve)
{
AnimationUtility.INTERNAL_CALL_Internal_SetEditorCurve(clip, ref binding, curve, syncEditorCurve);
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_Internal_SetEditorCurve(AnimationClip clip, ref EditorCurveBinding binding, AnimationCurve curve, bool syncEditorCurve);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_SyncEditorCurves(AnimationClip clip);
[RequiredByNativeCode]
private static void Internal_CallAnimationClipAwake(AnimationClip clip)
{
if (AnimationUtility.onCurveWasModified != null)
{
AnimationUtility.onCurveWasModified(clip, default(EditorCurveBinding), AnimationUtility.CurveModifiedType.ClipModified);
}
}
public static void SetEditorCurve(AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve)
{
AnimationUtility.Internal_SetEditorCurve(clip, binding, curve, true);
if (AnimationUtility.onCurveWasModified != null)
{
AnimationUtility.onCurveWasModified(clip, binding, (curve == null) ? AnimationUtility.CurveModifiedType.CurveDeleted : AnimationUtility.CurveModifiedType.CurveModified);
}
}
internal static void SetEditorCurves(AnimationClip clip, EditorCurveBinding[] bindings, AnimationCurve[] curves)
{
if (clip == null)
{
throw new ArgumentNullException("clip");
}
if (curves == null)
{
throw new ArgumentNullException("curves");
}
if (bindings == null)
{
throw new ArgumentNullException("bindings");
}
if (bindings.Length != curves.Length)
{
throw new ArgumentException("bindings and curves array sizes do not match");
}
for (int i = 0; i < bindings.Length; i++)
{
AnimationUtility.Internal_SetEditorCurve(clip, bindings[i], curves[i], false);
if (AnimationUtility.onCurveWasModified != null)
{
AnimationUtility.onCurveWasModified(clip, bindings[i], (curves[i] == null) ? AnimationUtility.CurveModifiedType.CurveDeleted : AnimationUtility.CurveModifiedType.CurveModified);
}
}
AnimationUtility.Internal_SyncEditorCurves(clip);
}
public static void SetObjectReferenceCurve(AnimationClip clip, EditorCurveBinding binding, ObjectReferenceKeyframe[] keyframes)
{
AnimationUtility.Internal_SetObjectReferenceCurve(clip, binding, keyframes);
if (AnimationUtility.onCurveWasModified != null)
{
AnimationUtility.onCurveWasModified(clip, binding, (keyframes == null) ? AnimationUtility.CurveModifiedType.CurveDeleted : AnimationUtility.CurveModifiedType.CurveModified);
}
}
private static float Internal_CalculateLinearTangent(AnimationCurve curve, int index, int toIndex)
{
float num = curve[index].time - curve[toIndex].time;
float result;
if (Mathf.Approximately(num, 0f))
{
result = 0f;
}
else
{
result = (curve[index].value - curve[toIndex].value) / num;
}
return result;
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_CalculateAutoTangent(AnimationCurve curve, int index);
private static void Internal_UpdateTangents(AnimationCurve curve, int index)
{
if (index >= 0 && index < curve.length)
{
Keyframe key = curve[index];
if (AnimationUtility.GetKeyLeftTangentMode(key) == AnimationUtility.TangentMode.Linear && index >= 1)
{
key.inTangent = AnimationUtility.Internal_CalculateLinearTangent(curve, index, index - 1);
curve.MoveKey(index, key);
}
if (AnimationUtility.GetKeyRightTangentMode(key) == AnimationUtility.TangentMode.Linear && index + 1 < curve.length)
{
key.outTangent = AnimationUtility.Internal_CalculateLinearTangent(curve, index, index + 1);
curve.MoveKey(index, key);
}
if (AnimationUtility.GetKeyLeftTangentMode(key) == AnimationUtility.TangentMode.ClampedAuto || AnimationUtility.GetKeyRightTangentMode(key) == AnimationUtility.TangentMode.ClampedAuto)
{
AnimationUtility.Internal_CalculateAutoTangent(curve, index);
}
if (AnimationUtility.GetKeyLeftTangentMode(key) == AnimationUtility.TangentMode.Auto || AnimationUtility.GetKeyRightTangentMode(key) == AnimationUtility.TangentMode.Auto)
{
curve.SmoothTangents(index, 0f);
}
if (AnimationUtility.GetKeyLeftTangentMode(key) == AnimationUtility.TangentMode.Free && AnimationUtility.GetKeyRightTangentMode(key) == AnimationUtility.TangentMode.Free && !AnimationUtility.GetKeyBroken(key))
{
key.outTangent = key.inTangent;
curve.MoveKey(index, key);
}
if (AnimationUtility.GetKeyLeftTangentMode(key) == AnimationUtility.TangentMode.Constant)
{
key.inTangent = float.PositiveInfinity;
curve.MoveKey(index, key);
}
if (AnimationUtility.GetKeyRightTangentMode(key) == AnimationUtility.TangentMode.Constant)
{
key.outTangent = float.PositiveInfinity;
curve.MoveKey(index, key);
}
}
}
internal static void UpdateTangentsFromModeSurrounding(AnimationCurve curve, int index)
{
AnimationUtility.Internal_UpdateTangents(curve, index - 2);
AnimationUtility.Internal_UpdateTangents(curve, index - 1);
AnimationUtility.Internal_UpdateTangents(curve, index);
AnimationUtility.Internal_UpdateTangents(curve, index + 1);
AnimationUtility.Internal_UpdateTangents(curve, index + 2);
}
internal static void UpdateTangentsFromMode(AnimationCurve curve)
{
for (int i = 0; i < curve.length; i++)
{
AnimationUtility.Internal_UpdateTangents(curve, i);
}
}
internal static AnimationUtility.TangentMode GetKeyLeftTangentMode(Keyframe key)
{
return (AnimationUtility.TangentMode)((key.tangentMode & AnimationUtility.kLeftTangentMask) >> 1);
}
internal static AnimationUtility.TangentMode GetKeyRightTangentMode(Keyframe key)
{
return (AnimationUtility.TangentMode)((key.tangentMode & AnimationUtility.kRightTangentMask) >> 5);
}
internal static bool GetKeyBroken(Keyframe key)
{
return (key.tangentMode & AnimationUtility.kBrokenMask) != 0;
}
internal static void SetKeyLeftTangentMode(ref Keyframe key, AnimationUtility.TangentMode tangentMode)
{
key.tangentMode &= ~AnimationUtility.kLeftTangentMask;
key.tangentMode |= (int)((int)tangentMode << 1);
}
internal static void SetKeyRightTangentMode(ref Keyframe key, AnimationUtility.TangentMode tangentMode)
{
key.tangentMode &= ~AnimationUtility.kRightTangentMask;
key.tangentMode |= (int)((int)tangentMode << 5);
}
internal static void SetKeyBroken(ref Keyframe key, bool broken)
{
if (broken)
{
key.tangentMode |= AnimationUtility.kBrokenMask;
}
else
{
key.tangentMode &= ~AnimationUtility.kBrokenMask;
}
}
public static void SetKeyBroken(AnimationCurve curve, int index, bool broken)
{
if (curve == null)
{
throw new ArgumentNullException("curve");
}
if (index < 0 || index >= curve.length)
{
throw new ArgumentOutOfRangeException("index", string.Format("Index ({0}) must be in the range of 0 to {1}.", index, curve.length - 1));
}
Keyframe key = curve[index];
AnimationUtility.SetKeyBroken(ref key, broken);
curve.MoveKey(index, key);
AnimationUtility.UpdateTangentsFromModeSurrounding(curve, index);
}
public static void SetKeyLeftTangentMode(AnimationCurve curve, int index, AnimationUtility.TangentMode tangentMode)
{
if (curve == null)
{
throw new ArgumentNullException("curve");
}
if (index < 0 || index >= curve.length)
{
throw new ArgumentOutOfRangeException("index", string.Format("Index ({0}) must be in the range of 0 to {1}.", index, curve.length - 1));
}
Keyframe key = curve[index];
if (tangentMode != AnimationUtility.TangentMode.Free)
{
AnimationUtility.SetKeyBroken(ref key, true);
}
AnimationUtility.SetKeyLeftTangentMode(ref key, tangentMode);
curve.MoveKey(index, key);
AnimationUtility.UpdateTangentsFromModeSurrounding(curve, index);
}
public static void SetKeyRightTangentMode(AnimationCurve curve, int index, AnimationUtility.TangentMode tangentMode)
{
if (curve == null)
{
throw new ArgumentNullException("curve");
}
if (index < 0 || index >= curve.length)
{
throw new ArgumentOutOfRangeException("index", string.Format("Index ({0}) must be in the range of 0 to {1}.", index, curve.length - 1));
}
Keyframe key = curve[index];
if (tangentMode != AnimationUtility.TangentMode.Free)
{
AnimationUtility.SetKeyBroken(ref key, true);
}
AnimationUtility.SetKeyRightTangentMode(ref key, tangentMode);
curve.MoveKey(index, key);
AnimationUtility.UpdateTangentsFromModeSurrounding(curve, index);
}
public static bool GetKeyBroken(AnimationCurve curve, int index)
{
if (curve == null)
{
throw new ArgumentNullException("curve");
}
if (index < 0 || index >= curve.length)
{
throw new ArgumentOutOfRangeException("index", string.Format("Index ({0}) must be in the range of 0 to {1}.", index, curve.length - 1));
}
Keyframe key = curve[index];
return AnimationUtility.GetKeyBroken(key);
}
public static AnimationUtility.TangentMode GetKeyLeftTangentMode(AnimationCurve curve, int index)
{
if (curve == null)
{
throw new ArgumentNullException("curve");
}
if (index < 0 || index >= curve.length)
{
throw new ArgumentOutOfRangeException("index", string.Format("Index ({0}) must be in the range of 0 to {1}.", index, curve.length - 1));
}
Keyframe key = curve[index];
return AnimationUtility.GetKeyLeftTangentMode(key);
}
public static AnimationUtility.TangentMode GetKeyRightTangentMode(AnimationCurve curve, int index)
{
if (curve == null)
{
throw new ArgumentNullException("curve");
}
if (index < 0 || index >= curve.length)
{
throw new ArgumentOutOfRangeException("index", string.Format("Index ({0}) must be in the range of 0 to {1}.", index, curve.length - 1));
}
Keyframe key = curve[index];
return AnimationUtility.GetKeyRightTangentMode(key);
}
[Obsolete("GetAllCurves is deprecated. Use GetCurveBindings and GetObjectReferenceCurveBindings instead."), ExcludeFromDocs]
public static AnimationClipCurveData[] GetAllCurves(AnimationClip clip)
{
bool includeCurveData = true;
return AnimationUtility.GetAllCurves(clip, includeCurveData);
}
[Obsolete("GetAllCurves is deprecated. Use GetCurveBindings and GetObjectReferenceCurveBindings instead.")]
public static AnimationClipCurveData[] GetAllCurves(AnimationClip clip, [DefaultValue("true")] bool includeCurveData)
{
EditorCurveBinding[] curveBindings = AnimationUtility.GetCurveBindings(clip);
AnimationClipCurveData[] array = new AnimationClipCurveData[curveBindings.Length];
for (int i = 0; i < array.Length; i++)
{
array[i] = new AnimationClipCurveData(curveBindings[i]);
if (includeCurveData)
{
array[i].curve = AnimationUtility.GetEditorCurve(clip, curveBindings[i]);
}
}
return array;
}
[Obsolete("This overload is deprecated. Use the one with EditorCurveBinding instead.")]
public static bool GetFloatValue(GameObject root, string relativePath, Type type, string propertyName, out float data)
{
return AnimationUtility.GetFloatValue(root, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), out data);
}
[Obsolete("This overload is deprecated. Use the one with EditorCurveBinding instead.")]
public static void SetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName, AnimationCurve curve)
{
AnimationUtility.SetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), curve);
}
[Obsolete("This overload is deprecated. Use the one with EditorCurveBinding instead.")]
public static AnimationCurve GetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName)
{
return AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName));
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern AnimationEvent[] GetAnimationEvents(AnimationClip clip);
public static void SetAnimationEvents(AnimationClip clip, AnimationEvent[] events)
{
if (clip == null)
{
throw new ArgumentNullException("clip");
}
if (events == null)
{
throw new ArgumentNullException("events");
}
AnimationUtility.Internal_SetAnimationEvents(clip, events);
if (AnimationUtility.onCurveWasModified != null)
{
AnimationUtility.onCurveWasModified(clip, default(EditorCurveBinding), AnimationUtility.CurveModifiedType.ClipModified);
}
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void Internal_SetAnimationEvents(AnimationClip clip, AnimationEvent[] events);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern string CalculateTransformPath(Transform targetTransform, Transform root);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern AnimationClipSettings GetAnimationClipSettings(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void SetAnimationClipSettings(AnimationClip clip, AnimationClipSettings srcClipInfo);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void SetAnimationClipSettingsNoDirty(AnimationClip clip, AnimationClipSettings srcClipInfo);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void SetAdditiveReferencePose(AnimationClip clip, AnimationClip referenceClip, float time);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern bool IsValidPolynomialCurve(AnimationCurve curve);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void ConstrainToPolynomialCurve(AnimationCurve curve);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool CurveSupportsProcedural(AnimationCurve curve);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern AnimationClipStats GetAnimationClipStats(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool GetGenerateMotionCurves(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern void SetGenerateMotionCurves(AnimationClip clip, bool value);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool HasGenericRootTransform(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool HasMotionFloatCurves(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool HasMotionCurves(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool HasRootCurves(AnimationClip clip);
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern bool AmbiguousBinding(string path, int classID, Transform root);
internal static Vector3 GetClosestEuler(Quaternion q, Vector3 eulerHint, RotationOrder rotationOrder)
{
Vector3 result;
AnimationUtility.INTERNAL_CALL_GetClosestEuler(ref q, ref eulerHint, rotationOrder, out result);
return result;
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void INTERNAL_CALL_GetClosestEuler(ref Quaternion q, ref Vector3 eulerHint, RotationOrder rotationOrder, out Vector3 value);
[Obsolete("Use AnimationMode.InAnimationMode instead")]
public static bool InAnimationMode()
{
return AnimationMode.InAnimationMode();
}
[Obsolete("Use AnimationMode.StartAnimationmode instead")]
public static void StartAnimationMode(UnityEngine.Object[] objects)
{
Debug.LogWarning("AnimationUtility.StartAnimationMode is deprecated. Use AnimationMode.StartAnimationMode with the new APIs. The objects passed to this function will no longer be reverted automatically. See AnimationMode.AddPropertyModification");
AnimationMode.StartAnimationMode();
}
[Obsolete("Use AnimationMode.StopAnimationMode instead")]
public static void StopAnimationMode()
{
AnimationMode.StopAnimationMode();
}
[Obsolete("SetAnimationType is no longer supported", true)]
public static void SetAnimationType(AnimationClip clip, ModelImporterAnimationType type)
{
}
}
}