Example #1
0
        private void RemoveAnimation()
        {
            if (_mesh.AnimationData == null)
            {
                return;
            }

            ReduxManager.InsertInUndoRedo(new RemoveAnimation(_mesh, CurrentAnimationClip));
        }
Example #2
0
        private void CleanUpFrames()
        {
            if (_recording == null)
            {
                return;
            }

            var temp = CurrentFrameIndex;

            ReduxManager.InsertInUndoRedo(new CleanUpFrames(_recording));
            CurrentFrameIndex = temp;
        }
Example #3
0
        private void RemoveFrame()
        {
            if (_recording == null)
            {
                return;
            }

            var temp = CurrentFrameIndex;

            ReduxManager.InsertInUndoRedo(new RemoveSingleFrame(_recording, CurrentFrameIndex));
            CurrentFrameIndex = temp;
        }
Example #4
0
        private void ConvertRecordingToAnimation()
        {
            if (_recording == null || _mesh == null || _mesh.AnimationData == null)
            {
                return;
            }

            //Create window
            var settings  = new RecordingConvertorView();
            var temp      = settings.DataContext as ViewModelLocator;
            var convertor = temp.RecordingConvertor;

            if (convertor == null)
            {
                return;
            }

            convertor.SetMeshAnimationData(_mesh.MeshData, _mesh.AnimationData);
            convertor.SetRecording(_recording);

            var result = settings.ShowDialog();

            if (!result.Value)
            {
                return;
            }

            settings.Close();

            //Add to the current Mesh
            var newAnimation = convertor.ConvertRecording();

            if (newAnimation != null)
            {
                ReduxManager.InsertInUndoRedo(new AddNewAnimation(_mesh, newAnimation));
                CurrentAnimationClip = newAnimation;
                RaisePropertyChanged("CurrentAnimationClip");
            }
            else
            {
                Debug.Log(LogLevel.Warning, "Animation not found");
            }
        }
Example #5
0
 private void SetJoint(AnimationJoint joint)
 {
     ReduxManager.InsertInUndoRedo(new SetJoint(LinkedJoints,joint,SelectedType));
     RaisePropertyChanged("SelectedJoint");
 }