public override void ProcessCandidates() { BeginKeyModification(); EditorCurveBinding[] bindings = AnimationUtility.GetCurveBindings(m_CandidateClip); EditorCurveBinding[] objectCurveBindings = AnimationUtility.GetObjectReferenceCurveBindings(m_CandidateClip); List <AnimationWindowCurve> curves = new List <AnimationWindowCurve>(); for (int i = 0; i < state.allCurves.Count; ++i) { AnimationWindowCurve curve = state.allCurves[i]; EditorCurveBinding remappedBinding = RotationCurveInterpolation.RemapAnimationBindingForRotationCurves(curve.binding, m_CandidateClip); if (Array.Exists(bindings, binding => remappedBinding.Equals(binding)) || Array.Exists(objectCurveBindings, binding => remappedBinding.Equals(binding))) { curves.Add(curve); } } AnimationWindowUtility.AddKeyframes(state, curves, time); EndKeyModification(); ClearCandidates(); }
public void AddAnimatedKeys() { this.BeginKeyModification(); AnimationWindowUtility.AddKeyframes(this.state, this.state.allCurves.ToArray(), this.time); this.ClearCandidates(); this.EndKeyModification(); this.ResampleAnimation(); this.state.Repaint(); }
public void AddAnimatedKeys() { BeginKeyModification(); AnimationWindowUtility.AddKeyframes(state, state.allCurves, time); ClearCandidates(); EndKeyModification(); ResampleAnimation(); state.Repaint(); }
public override void ProcessCandidates() { if (!(this.m_CandidateClip == null)) { this.BeginKeyModification(); EditorCurveBinding[] curveBindings = AnimationUtility.GetCurveBindings(this.m_CandidateClip); EditorCurveBinding[] objectReferenceCurveBindings = AnimationUtility.GetObjectReferenceCurveBindings(this.m_CandidateClip); List <AnimationWindowCurve> list = new List <AnimationWindowCurve>(); for (int i = 0; i < this.state.allCurves.Count; i++) { AnimationWindowCurve animationWindowCurve = this.state.allCurves[i]; EditorCurveBinding remappedBinding = RotationCurveInterpolation.RemapAnimationBindingForRotationCurves(animationWindowCurve.binding, this.m_CandidateClip); if (Array.Exists <EditorCurveBinding>(curveBindings, (EditorCurveBinding binding) => remappedBinding.Equals(binding)) || Array.Exists <EditorCurveBinding>(objectReferenceCurveBindings, (EditorCurveBinding binding) => remappedBinding.Equals(binding))) { list.Add(animationWindowCurve); } } AnimationWindowUtility.AddKeyframes(this.state, list.ToArray(), this.time); this.EndKeyModification(); this.ClearCandidates(); } }
private void AddKeysAtCurrentTime(List <AnimationWindowCurve> curves) { AnimationWindowUtility.AddKeyframes(state, curves, state.time); }
private void AddKeysAtCurrentTime(List <AnimationWindowCurve> curves) { AnimationWindowUtility.AddKeyframes(this.state, curves.ToArray(), this.state.time); }
public static void AddSelectedKeyframes(AnimationWindowState state, AnimationKeyTime time) { List <AnimationWindowCurve> list = (state.activeCurves.Count <= 0) ? state.allCurves : state.activeCurves; AnimationWindowUtility.AddKeyframes(state, list.ToArray(), time); }