Пример #1
0
 void interpolationViewer1_FrameChanged(object sender, EventArgs e)
 {
     if (_mainWindow != null && _mainWindow.CurrentFrame - 1 != interpolationViewer.FrameIndex)
     {
         _mainWindow.SetFrame((interpolationViewer.FrameIndex + 1).Clamp(1, (int)_mainWindow.PlaybackPanel.numTotalFrames.Value));
     }
 }
Пример #2
0
        private unsafe void listKeyframes_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (_updating)
            {
                return;
            }

            int index = listKeyframes.SelectedIndex;

            if (index >= 0)
            {
                object x = listKeyframes.SelectedItem;
                float  i = 0;
                if (x is CHRAnimationFrame)
                {
                    i = ((CHRAnimationFrame)listKeyframes.SelectedItem).Index + 1;
                }
                else if (x is FloatKeyframe)
                {
                    i = ((FloatKeyframe)listKeyframes.SelectedItem).Index + 1;
                }
                else if (x is CameraAnimationFrame)
                {
                    i = ((CameraAnimationFrame)listKeyframes.SelectedItem).Index + 1;
                }
                else if (x is LightAnimationFrame)
                {
                    i = ((LightAnimationFrame)listKeyframes.SelectedItem).Index + 1;
                }
                else if (x is FogAnimationFrame)
                {
                    i = ((FogAnimationFrame)listKeyframes.SelectedItem).Index + 1;
                }

                if (_mainWindow.CurrentFrame != i)
                {
                    _mainWindow.SetFrame((int)i);
                }
            }
        }