Esempio n. 1
0
        private void MoveToNextKeyframe()
        {
            List <AnimationWindowCurve> list = (!this.m_State.showCurveEditor || this.m_State.activeCurves.Count <= 0) ? this.m_State.allCurves : this.m_State.activeCurves;
            float nextKeyframeTime           = AnimationWindowUtility.GetNextKeyframeTime(list.ToArray(), this.m_State.currentTime, this.m_State.clipFrameRate);

            this.m_State.currentTime = this.m_State.SnapToFrame(nextKeyframeTime, AnimationWindowState.SnapMode.SnapToClipFrame);
        }
        public void GoToNextKeyframe(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.GetNextKeyframeTime(curves.ToArray(), time.time, state.clipFrameRate);

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

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

            this.m_State.currentTime = AnimationWindowUtility.GetNextKeyframeTime(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 GoToNextKeyframe()
        {
            List <AnimationWindowCurve> curves = (state.showCurveEditor && state.activeCurves.Count > 0) ? state.activeCurves : state.allCurves;

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

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

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

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