// We sync keyframe selection from curve editor to AnimationWindowState private void UpdateSelectedKeysFromCurveEditor() { m_State.ClearKeySelections(); foreach (CurveSelection curveSelection in m_CurveEditor.selectedCurves) { AnimationWindowKeyframe keyFrame = AnimationWindowUtility.CurveSelectionToAnimationWindowKeyframe(curveSelection, m_State.allCurves); if (keyFrame != null) { m_State.SelectKey(keyFrame); } } }