internal void MakeCurveBackups() { this.m_CurveBackups = new List<CurveEditor.SavedCurve>(); int num = -1; CurveEditor.SavedCurve savedCurve = null; for (int i = 0; i < this.m_Selection.Count; i++) { CurveSelection curveSelection = this.m_Selection[i]; if (curveSelection.curveID != num) { savedCurve = new CurveEditor.SavedCurve(); num = (savedCurve.curveId = curveSelection.curveID); Keyframe[] keys = curveSelection.curve.keys; savedCurve.keys = new List<CurveEditor.SavedCurve.SavedKeyFrame>(keys.Length); Keyframe[] array = keys; for (int j = 0; j < array.Length; j++) { Keyframe key = array[j]; savedCurve.keys.Add(new CurveEditor.SavedCurve.SavedKeyFrame(key, CurveWrapper.SelectionMode.None)); } this.m_CurveBackups.Add(savedCurve); } savedCurve.keys[curveSelection.key].selected = ((!curveSelection.semiSelected) ? CurveWrapper.SelectionMode.Selected : CurveWrapper.SelectionMode.SemiSelected); } }
internal void MakeCurveBackups() { this.m_CurveBackups = new List<CurveEditor.SavedCurve>(); int num = -1; CurveEditor.SavedCurve savedCurve = (CurveEditor.SavedCurve) null; for (int index = 0; index < this.selectedCurves.Count; ++index) { CurveSelection selectedCurve = this.selectedCurves[index]; if (selectedCurve.curveID != num) { savedCurve = new CurveEditor.SavedCurve(); num = savedCurve.curveId = selectedCurve.curveID; Keyframe[] keys = selectedCurve.curve.keys; savedCurve.keys = new List<CurveEditor.SavedCurve.SavedKeyFrame>(keys.Length); foreach (Keyframe key in keys) savedCurve.keys.Add(new CurveEditor.SavedCurve.SavedKeyFrame(key, CurveWrapper.SelectionMode.None)); this.m_CurveBackups.Add(savedCurve); } savedCurve.keys[selectedCurve.key].selected = !selectedCurve.semiSelected ? CurveWrapper.SelectionMode.Selected : CurveWrapper.SelectionMode.SemiSelected; } }