public ClipCurveEditor(CurveDataSource dataSource, TimelineWindow parentWindow)
        {
            this.m_DataSource  = dataSource;
            this.m_CurveEditor = new CurveEditor(new Rect(0f, 0f, 1000f, 100f), new CurveWrapper[0], false);
            ClipCurveEditor.s_CurveEditorSettings.set_hSlider(false);
            ClipCurveEditor.s_CurveEditorSettings.set_vSlider(false);
            ClipCurveEditor.s_CurveEditorSettings.set_hRangeLocked(false);
            ClipCurveEditor.s_CurveEditorSettings.set_vRangeLocked(false);
            ClipCurveEditor.s_CurveEditorSettings.set_scaleWithWindow(true);
            ClipCurveEditor.s_CurveEditorSettings.set_hRangeMin(0f);
            ClipCurveEditor.s_CurveEditorSettings.showAxisLabels            = true;
            ClipCurveEditor.s_CurveEditorSettings.allowDeleteLastKeyInCurve = true;
            ClipCurveEditor.s_CurveEditorSettings.rectangleToolFlags        = 0;
            CurveEditorSettings arg_F9_0  = ClipCurveEditor.s_CurveEditorSettings;
            TickStyle           tickStyle = new TickStyle();

            tickStyle.tickColor.set_color(DirectorStyles.Instance.customSkin.colorInlineCurveVerticalLines);
            tickStyle.distLabel = 20;
            tickStyle.stubs     = true;
            arg_F9_0.set_vTickStyle(tickStyle);
            CurveEditorSettings arg_135_0 = ClipCurveEditor.s_CurveEditorSettings;

            tickStyle = new TickStyle();
            tickStyle.tickColor.set_color(new Color(0f, 0f, 0f, 0f));
            tickStyle.distLabel = 0;
            arg_135_0.set_hTickStyle(tickStyle);
            this.m_CurveEditor.set_settings(ClipCurveEditor.s_CurveEditorSettings);
            this.m_CurveEditor.set_shownArea(new Rect(1f, 1f, 1f, 1f));
            this.m_CurveEditor.set_ignoreScrollWheelUntilClicked(true);
            this.m_CurveEditor.curvesUpdated = new CurveEditor.CallbackFunction(this.OnCurvesUpdated);
            this.m_BindingHierarchy          = new BindingSelector(parentWindow, this.m_CurveEditor);
        }
Exemple #2
0
        public ClipCurveEditor(CurveDataSource dataSource, TimelineWindow parentWindow, TrackAsset hostTrack)
        {
            m_DataSource = dataSource;

            m_CurveEditor = new CurveEditor(new Rect(0, 0, 1000, 100), new CurveWrapper[0], false);

            s_CurveEditorSettings.vTickStyle = new TickStyle
            {
                tickColor = { color = DirectorStyles.Instance.customSkin.colorInlineCurveVerticalLines },
                distLabel = 20,
                stubs     = true
            };

            s_CurveEditorSettings.hTickStyle = new TickStyle
            {
                // hide horizontal lines by giving them a transparent color
                tickColor = { color = new Color(0.0f, 0.0f, 0.0f, 0.0f) },
                distLabel = 0
            };

            m_CurveEditor.settings = s_CurveEditorSettings;

            m_ViewModel = TimelineWindowViewPrefs.GetTrackViewModelData(hostTrack);

            m_ShouldRestoreShownArea = true;
            m_CurveEditor.ignoreScrollWheelUntilClicked = true;
            m_CurveEditor.curvesUpdated = OnCurvesUpdated;

            m_BindingHierarchy = new BindingSelector(parentWindow, m_CurveEditor, m_ViewModel.inlineCurvesState);
        }
Exemple #3
0
        public ClipCurveEditor(CurveDataSource dataSource, TimelineWindow parentWindow, TrackAsset hostTrack)
        {
            m_DataSource = dataSource;

            m_CurveEditor = new CurveEditor(new Rect(0, 0, 1000, 100), new CurveWrapper[0], false);

            s_CurveEditorSettings.hSlider                   = false;
            s_CurveEditorSettings.vSlider                   = false;
            s_CurveEditorSettings.hRangeLocked              = false;
            s_CurveEditorSettings.vRangeLocked              = false;
            s_CurveEditorSettings.scaleWithWindow           = true;
            s_CurveEditorSettings.hRangeMin                 = 0.0f;
            s_CurveEditorSettings.showAxisLabels            = true;
            s_CurveEditorSettings.allowDeleteLastKeyInCurve = true;
            s_CurveEditorSettings.rectangleToolFlags        = CurveEditorSettings.RectangleToolFlags.NoRectangleTool;

            s_CurveEditorSettings.vTickStyle = new TickStyle
            {
                tickColor = { color = DirectorStyles.Instance.customSkin.colorInlineCurveVerticalLines },
                distLabel = 20,
                stubs     = true
            };

            s_CurveEditorSettings.hTickStyle = new TickStyle
            {
                // hide horizontal lines by giving them a transparent color
                tickColor = { color = new Color(0.0f, 0.0f, 0.0f, 0.0f) },
                distLabel = 0
            };

            m_CurveEditor.settings = s_CurveEditorSettings;

            m_ViewModel = TimelineWindowViewPrefs.GetTrackViewModelData(hostTrack);

            if (isNewSelection)
            {
                m_CurveEditor.shownArea = new Rect(1, 1, 1, 1);
            }
            else
            {
                m_CurveEditor.shownAreaInsideMargins = m_ViewModel.inlineCurvesShownAreaInsideMargins;
            }

            m_CurveEditor.ignoreScrollWheelUntilClicked = true;
            m_CurveEditor.curvesUpdated = OnCurvesUpdated;

            m_BindingHierarchy = new BindingSelector(parentWindow, m_CurveEditor, m_ViewModel.inlineCurvesState);
        }