コード例 #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);
        }
コード例 #2
0
ファイル: Controller.cs プロジェクト: johndpope/FaceX
        private void ResetAllAudioValues()
        {
            _currentKeyFrame = -1;
            _audioKeyFrames  = new List <int>();

            _keyFrameSelected = false;

            _currentPoseViewModel = null;
        }
コード例 #3
0
 private void OnRemember()
 {
     try
     {
         PoseConfigViewModel poseViewModel = UpdatePoseViewModel();
         Controller.Instance.RememberPose(poseViewModel);
     }
     catch (UnityException exp)
     {
         Debug.LogError(exp.Message);
     }
 }
コード例 #4
0
 private void UpdateAnimation()
 {
     try
     {
         PoseConfigViewModel poseViewModel = UpdatePoseViewModel();
         Controller.Instance.UpdateAnimation(poseViewModel);
     }
     catch (UnityException exp)
     {
         Debug.LogError(exp.Message);
     }
 }
コード例 #5
0
ファイル: Controller.cs プロジェクト: johndpope/FaceX
        internal void UpdateAnimation(PoseConfigViewModel poseViewModel)
        {
            try
            {
                _currentPoseViewModel = poseViewModel;

                PluginManager.Instance.ChangePose(_currentPoseViewModel, _currentCtrlLever);
            }
            catch (UnityException exp)
            {
                Debug.LogError(exp.Message);
            }
        }
コード例 #6
0
ファイル: PluginManager.cs プロジェクト: johndpope/FaceX
        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);
            }
        }
コード例 #7
0
ファイル: Controller.cs プロジェクト: johndpope/FaceX
        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);
            }
        }