コード例 #1
0
        void SelectionChangedCallback(int[] ids)
        {
            if (Event.current.button == 1)
            {
                var selectableItem = PickerUtils.PickedSelectable();
                if (selectableItem != null)
                {
                    return;
                }
            }

            if (Event.current.command || Event.current.control || Event.current.shift)
            {
                SelectionManager.UnSelectTracks();
            }
            else
            {
                SelectionManager.Clear();
            }

            foreach (var id in ids)
            {
                var trackGUI = (TimelineTrackBaseGUI)m_TreeView.FindItem(id);
                SelectionManager.Add(trackGUI.track);
            }

            m_State.GetWindow().Repaint();
        }