Beispiel #1
0
        private PoseConfigViewModel UpdatePoseViewModel()
        {
            PoseConfigViewModel poseConfigVMdl = new PoseConfigViewModel();

            try
            {
                poseConfigVMdl.BrowDropDownIndex = _browDropDownIndex;

                poseConfigVMdl.PrimaryExpressionDropDownIndex = _primaryExpressionDropDownIndex;

                poseConfigVMdl.MusclesDropDownIndex = _musclesDropDownIndex;

                poseConfigVMdl.BrowSliderPosition = _browSliderPosition;

                poseConfigVMdl.PrimaryExpressionSliderPosition = _primaryExpressionSliderPosition;

                poseConfigVMdl.EyeDirectionHorizontalSliderPosition = _eyeHorizontalSliderPosition;
                poseConfigVMdl.EyeDirectionVerticalSliderPosition   = _eyeVerticalSliderPosition;

                poseConfigVMdl.LipNarrowWide = _lipNarrow;
                poseConfigVMdl.JawOpenClose  = _jawClose;

                poseConfigVMdl.MusclesSliderPosition = _musclesSliderPosition;
            }
            catch (UnityException exp)
            {
                Debug.LogError(exp.Message);
            }

            return(poseConfigVMdl);
        }
Beispiel #2
0
        private void ResetAllAudioValues()
        {
            _currentKeyFrame = -1;
            _audioKeyFrames  = new List <int>();

            _keyFrameSelected = false;

            _currentPoseViewModel = null;
        }
Beispiel #3
0
 private void OnRemember()
 {
     try
     {
         PoseConfigViewModel poseViewModel = UpdatePoseViewModel();
         Controller.Instance.RememberPose(poseViewModel);
     }
     catch (UnityException exp)
     {
         Debug.LogError(exp.Message);
     }
 }
Beispiel #4
0
 private void UpdateAnimation()
 {
     try
     {
         PoseConfigViewModel poseViewModel = UpdatePoseViewModel();
         Controller.Instance.UpdateAnimation(poseViewModel);
     }
     catch (UnityException exp)
     {
         Debug.LogError(exp.Message);
     }
 }
Beispiel #5
0
        internal void UpdateAnimation(PoseConfigViewModel poseViewModel)
        {
            try
            {
                _currentPoseViewModel = poseViewModel;

                PluginManager.Instance.ChangePose(_currentPoseViewModel, _currentCtrlLever);
            }
            catch (UnityException exp)
            {
                Debug.LogError(exp.Message);
            }
        }
Beispiel #6
0
        public void ChangePose(PoseConfigViewModel poseViewModel, ControlLever ctrlLever)
        {
            try
            {
                if (_plugin != null)
                {
                    animationRunning = true;

                    _plugin.Pose(poseViewModel, ctrlLever);
                }
            }
            catch (UnityException exp)
            {
                UnityEngine.Debug.LogError(exp.Message);
            }
        }
Beispiel #7
0
        internal void RememberPose(PoseConfigViewModel poseViewModel)
        {
            try
            {
                _currentPoseViewModel = poseViewModel;

                if (0 < _currentKeyFrame)
                {
                    _currentPoseViewModel.FrameNo = (ulong)_currentKeyFrame;
                }

                MassAnimation.Resources.Entities.Pose pose = Convertor.ConvertPoseConfigVMdlToPose(_currentPoseViewModel);

                UIController.AddPose(_currentCtrlLever, pose);
            }
            catch (UnityException exp)
            {
                Debug.LogError(exp.Message);
            }
        }