Beispiel #1
0
        private void MoveToPreviousKeyframe()
        {
            List <AnimationWindowCurve> list = (!this.m_State.showCurveEditor || this.m_State.activeCurves.Count <= 0) ? this.m_State.allCurves : this.m_State.activeCurves;
            float previousKeyframeTime       = AnimationWindowUtility.GetPreviousKeyframeTime(list.ToArray(), this.m_State.currentTime, this.m_State.clipFrameRate);

            this.m_State.currentTime = this.m_State.SnapToFrame(previousKeyframeTime, AnimationWindowState.SnapMode.SnapToClipFrame);
        }
        public void GoToPreviousKeyframe(PropertyModification[] modifications)
        {
            EditorCurveBinding[] bindings = AnimationWindowUtility.PropertyModificationsToEditorCurveBindings(modifications, state.activeRootGameObject, state.activeAnimationClip);
            if (bindings.Length == 0)
            {
                return;
            }

            List <AnimationWindowCurve> curves = new List <AnimationWindowCurve>();

            for (int i = 0; i < state.allCurves.Count; ++i)
            {
                AnimationWindowCurve curve = state.allCurves[i];
                if (Array.Exists(bindings, binding => curve.binding.Equals(binding)))
                {
                    curves.Add(curve);
                }
            }

            float newTime = AnimationWindowUtility.GetPreviousKeyframeTime(curves.ToArray(), time.time, state.clipFrameRate);

            SetCurrentTime(state.SnapToFrame(newTime, AnimationWindowState.SnapMode.SnapToClipFrame));

            state.Repaint();
        }
Beispiel #3
0
        private void MoveToPreviousKeyframe()
        {
            List <AnimationWindowCurve> list = (!this.m_State.showCurveEditor) ? this.m_State.allCurves : this.m_State.activeCurves;

            this.m_State.currentTime = AnimationWindowUtility.GetPreviousKeyframeTime(list.ToArray(), this.m_State.FrameToTime((float)this.m_State.frame), this.m_State.frameRate);
            this.m_State.frame       = this.m_State.TimeToFrameFloor(this.m_State.currentTime);
        }
        public void GoToPreviousKeyframe()
        {
            List <AnimationWindowCurve> curves = (state.showCurveEditor && state.activeCurves.Count > 0) ? state.activeCurves : state.allCurves;

            float newTime = AnimationWindowUtility.GetPreviousKeyframeTime(curves.ToArray(), time.time, state.clipFrameRate);

            SetCurrentTime(state.SnapToFrame(newTime, AnimationWindowState.SnapMode.SnapToClipFrame));
        }
        public override void GoToPreviousKeyframe()
        {
            var newTime = AnimationWindowUtility.GetPreviousKeyframeTime(GetCurves(), time.time, m_AnimWindowState.clipFrameRate);

            GoToTime(m_AnimWindowState.SnapToFrame(newTime, AnimationWindowState.SnapMode.SnapToClipFrame));
        }
        public override void GoToPreviousKeyframe()
        {
            float previousKeyframeTime = AnimationWindowUtility.GetPreviousKeyframeTime(this.GetCurves(), this.get_time().get_time(), this.m_AnimWindowState.get_clipFrameRate());

            this.GoToTime(this.m_AnimWindowState.SnapToFrame(previousKeyframeTime, 2));
        }