private void RemoveAnimation() { if (_mesh.AnimationData == null) { return; } ReduxManager.InsertInUndoRedo(new RemoveAnimation(_mesh, CurrentAnimationClip)); }
private void CleanUpFrames() { if (_recording == null) { return; } var temp = CurrentFrameIndex; ReduxManager.InsertInUndoRedo(new CleanUpFrames(_recording)); CurrentFrameIndex = temp; }
private void RemoveFrame() { if (_recording == null) { return; } var temp = CurrentFrameIndex; ReduxManager.InsertInUndoRedo(new RemoveSingleFrame(_recording, CurrentFrameIndex)); CurrentFrameIndex = temp; }
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"); } }
private void SetJoint(AnimationJoint joint) { ReduxManager.InsertInUndoRedo(new SetJoint(LinkedJoints,joint,SelectedType)); RaisePropertyChanged("SelectedJoint"); }