forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDopeLine.cs
More file actions
145 lines (128 loc) · 2.52 KB
/
DopeLine.cs
File metadata and controls
145 lines (128 loc) · 2.52 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
using System;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEditorInternal
{
internal class DopeLine
{
private int m_HierarchyNodeID;
private AnimationWindowCurve[] m_Curves;
private List<AnimationWindowKeyframe> m_Keys;
public static GUIStyle dopekeyStyle = "Dopesheetkeyframe";
public Rect position;
public Type objectType;
public bool tallMode;
public bool hasChildren;
public bool isMasterDopeline;
public Type valueType
{
get
{
Type result;
if (this.m_Curves.Length > 0)
{
Type valueType = this.m_Curves[0].valueType;
for (int i = 1; i < this.m_Curves.Length; i++)
{
if (this.m_Curves[i].valueType != valueType)
{
result = null;
return result;
}
}
result = valueType;
}
else
{
result = null;
}
return result;
}
}
public bool isPptrDopeline
{
get
{
bool result;
if (this.m_Curves.Length > 0)
{
for (int i = 0; i < this.m_Curves.Length; i++)
{
if (!this.m_Curves[i].isPPtrCurve)
{
result = false;
return result;
}
}
result = true;
}
else
{
result = false;
}
return result;
}
}
public bool isEditable
{
get
{
bool result;
if (this.m_Curves.Length > 0)
{
bool flag = Array.Exists<AnimationWindowCurve>(this.m_Curves, (AnimationWindowCurve curve) => !curve.animationIsEditable);
result = !flag;
}
else
{
result = false;
}
return result;
}
}
public int hierarchyNodeID
{
get
{
return this.m_HierarchyNodeID;
}
}
public AnimationWindowCurve[] curves
{
get
{
return this.m_Curves;
}
}
public List<AnimationWindowKeyframe> keys
{
get
{
if (this.m_Keys == null)
{
this.m_Keys = new List<AnimationWindowKeyframe>();
AnimationWindowCurve[] curves = this.m_Curves;
for (int i = 0; i < curves.Length; i++)
{
AnimationWindowCurve animationWindowCurve = curves[i];
foreach (AnimationWindowKeyframe current in animationWindowCurve.m_Keyframes)
{
this.m_Keys.Add(current);
}
}
this.m_Keys.Sort((AnimationWindowKeyframe a, AnimationWindowKeyframe b) => a.time.CompareTo(b.time));
}
return this.m_Keys;
}
}
public DopeLine(int hierarchyNodeID, AnimationWindowCurve[] curves)
{
this.m_HierarchyNodeID = hierarchyNodeID;
this.m_Curves = curves;
}
public void InvalidateKeyframes()
{
this.m_Keys = null;
}
}
}