public SRTAnimationFrame GetAnimFrame(int index) { SRTAnimationFrame frame = new SRTAnimationFrame() { Index = index }; float *dPtr = (float *)&frame; for (int x = 0; x < 5; x++) { frame.SetBool(x, Keyframes.GetKeyframe(x, index) != null); *dPtr++ = GetFrameValue(x, index); } return(frame); }
private void UpdateTarget() { listKeyframes.BeginUpdate(); listKeyframes.Items.Clear(); if (_target != null) { if (_target.FrameCount > 0) { SRTAnimationFrame a = new SRTAnimationFrame(); bool check = false; for (int x = 0; x < _target.FrameCount; x++) { a = _target.GetAnimFrame(x); a.Index = x; for (int i = 0; i < 5; i++) { if (_target.GetKeyframe(i, x) != null) { check = true; a.SetBool(i, true); } } if (check == true) { listKeyframes.Items.Add(a); check = false; } } //foreach (AnimationKeyframe f in _target.Keyframes.Keyframes) // listKeyframes.Items.Add(f); _numFrames = _target.FrameCount; _currentPage = 0; numFrame.Value = 1; numFrame.Maximum = _numFrames; lblFrameCount.Text = String.Format("/ {0}", _numFrames); } else { numFrame.Value = 1; } } listKeyframes.EndUpdate(); RefreshPage(); }