public TracingTimeline(GraphView graphView, GraphToolState windowGraphToolState)
        {
            m_GraphView            = graphView;
            m_WindowGraphToolState = windowGraphToolState;
            m_TimeArea             = new TimeArea();
            m_Overlay = new AnimEditorOverlay()
            {
                PlayHeadColor = new Color(0.2117647F, 0.6039216F, 0.8F)
            };
            m_State         = new TimelineState(m_TimeArea);
            m_Overlay.state = m_State;

            var         debugger = ((Stencil)m_WindowGraphToolState?.WindowState.GraphModel?.Stencil)?.Debugger;
            IGraphTrace trace    = debugger?.GetGraphTrace(m_WindowGraphToolState?.WindowState.GraphModel,
                                                           m_WindowGraphToolState.TracingControlState.CurrentTracingTarget);

            if (trace?.AllFrames != null && trace.AllFrames.Count > 0)
            {
                int firstFrame = trace.AllFrames[0].Frame;
                int lastFrame  = trace.AllFrames[trace.AllFrames.Count - 1].Frame;
                m_TimeArea.SetShownRange(
                    firstFrame - k_MinTimeVisibleOnTheRight,
                    lastFrame + k_MinTimeVisibleOnTheRight);
            }
        }
Ejemplo n.º 2
0
 private void InitializeOverlay()
 {
     this.m_Overlay = new AnimEditorOverlay();
 }