public void SetSelected(AnimationCurve curve)
 {
     m_CurveEditor.SelectNone();
     if (m_CurveWrappers != null && m_CurveWrappers.Length > 0)
     {
         if (m_CurveWrappers[0].renderer.GetCurve() == curve)
         {
             m_CurveWrappers[0].selected = CurveWrapper.SelectionMode.Selected;
             m_CurveEditor.AddSelection(new CurveSelection(m_CurveWrappers[0].id, 0));
         }
     }
     UpdateSelectionColors();
 }
Esempio n. 2
0
        public void SetSelected(AnimationCurve curve)
        {
            m_CurveEditor.SelectNone();
            for (int i = 0; i < m_Curves.Length; i++)
            {
                if (curve == m_Curves[i])
                {
                    m_CurveWrappers[i].selected = CurveWrapper.SelectionMode.Selected;
                    m_CurveEditor.AddSelection(new CurveSelection(m_CurveWrappers[i].id, 0));
                }
            }

            UpdateSelectionColors();
        }
Esempio n. 3
0
        // We sync keyframe selection from AnimationWindowState to curve editor
        private void UpdateSelectedKeysToCurveEditor()
        {
            UpdateCurveEditorData();

            m_CurveEditor.ClearSelection();
            m_CurveEditor.BeginRangeSelection();
            foreach (AnimationWindowKeyframe keyframe in m_State.selectedKeys)
            {
                CurveSelection curveSelection = AnimationWindowUtility.AnimationWindowKeyframeToCurveSelection(keyframe, m_CurveEditor);
                if (curveSelection != null)
                {
                    m_CurveEditor.AddSelection(curveSelection);
                }
            }
            m_CurveEditor.EndRangeSelection();
        }