TimelineWindow_Manipulators.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using UnityEngine;
  2. namespace UnityEditor.Timeline
  3. {
  4. partial class TimelineWindow
  5. {
  6. readonly Control m_PreTreeViewControl = new Control();
  7. readonly Control m_PostTreeViewControl = new Control();
  8. readonly RectangleSelect m_RectangleSelect = new RectangleSelect();
  9. readonly RectangleZoom m_RectangleZoom = new RectangleZoom();
  10. void InitializeManipulators()
  11. {
  12. // Order is important!
  13. // Manipulators that needs to be processed BEFORE the treeView (mainly anything clip related)
  14. m_PreTreeViewControl.AddManipulator(new TimelinePanManipulator());
  15. m_PreTreeViewControl.AddManipulator(new TrackResize());
  16. m_PreTreeViewControl.AddManipulator(new InlineCurveResize());
  17. m_PreTreeViewControl.AddManipulator(new TrackZoom());
  18. m_PreTreeViewControl.AddManipulator(new Jog());
  19. m_PreTreeViewControl.AddManipulator(TimelineZoomManipulator.Instance);
  20. m_PreTreeViewControl.AddManipulator(new ContextMenuManipulator());
  21. m_PreTreeViewControl.AddManipulator(new TimelineMarkerHeaderContextMenu());
  22. m_PreTreeViewControl.AddManipulator(new EaseClip());
  23. m_PreTreeViewControl.AddManipulator(new TrimClip());
  24. m_PreTreeViewControl.AddManipulator(new SelectAndMoveItem());
  25. m_PreTreeViewControl.AddManipulator(new TrackDoubleClick());
  26. m_PreTreeViewControl.AddManipulator(new DrillIntoClip());
  27. m_PreTreeViewControl.AddManipulator(new InlineCurvesShortcutManipulator());
  28. // Manipulators that needs to be processed AFTER the treeView or any GUI element able to use event (like inline curves)
  29. m_PostTreeViewControl.AddManipulator(new TimeAreaContextMenu());
  30. m_PostTreeViewControl.AddManipulator(new TrackShortcutManipulator());
  31. m_PostTreeViewControl.AddManipulator(new TimelineShortcutManipulator());
  32. m_PostTreeViewControl.AddManipulator(new ClearSelection());
  33. }
  34. }
  35. }