private void SendData(MotionRequest request)
        {
            string content = request.ToJson();

            _sender.SendMessage(
                MessageFactory.Instance.SendWordToMotionPreviewInfo(content)
                );
        }
Esempio n. 2
0
        public WordToMotionItemViewModel(WordToMotionSettingViewModel parent, MotionRequest model)
        {
            _parent       = parent;
            MotionRequest = model;
            InitializeBuiltInClipNames();
            InitializeBlendShapeItems(parent);
            AvailableBuiltInClipNames =
                new ReadOnlyObservableCollection <string>(_availableBuiltInClipNames);
            BlendShapeItems =
                new ReadOnlyObservableCollection <BlendShapeItemViewModel>(_blendShapeItems);
            ExtraBlendShapeItems =
                new ReadOnlyObservableCollection <BlendShapeItemViewModel>(_extraBlendShapeItems);

            LoadFromModel(model);
        }
        /// <summary>デフォルトの簡単な設定からなる動作リクエストを生成します。</summary>
        /// <returns></returns>
        public static MotionRequest GetDefault()
        {
            var result = new MotionRequest()
            {
                MotionType                 = MotionTypeNone,
                Word                       = "name",
                UseBlendShape              = true,
                HoldBlendShape             = false,
                DurationWhenOnlyBlendShape = 3.0f,
            };

            result.BlendShapeValues["Joy"] = 100;

            return(result);
        }
 public WordToMotionItemPreviewDataSender(IMessageSender sender)
 {
     _sender       = sender;
     MotionRequest = MotionRequest.GetDefault();
 }
        public static MotionRequest[] GetDefaultMotionRequestSet()
        {
            var result = new MotionRequest[]
            {
                new MotionRequest()
                {
                    MotionType                 = MotionTypeNone,
                    Word                       = "reset",
                    UseBlendShape              = true,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 0.1f,
                },
                new MotionRequest()
                {
                    MotionType                 = MotionTypeNone,
                    Word                       = "joy",
                    UseBlendShape              = true,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 3.0f,
                },
                new MotionRequest()
                {
                    MotionType                 = MotionTypeNone,
                    Word                       = "angry",
                    UseBlendShape              = true,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 3.0f,
                },
                new MotionRequest()
                {
                    MotionType                 = MotionTypeNone,
                    Word                       = "sorrow",
                    UseBlendShape              = true,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 3.0f,
                },
                new MotionRequest()
                {
                    MotionType                 = MotionTypeNone,
                    Word                       = "fun",
                    UseBlendShape              = true,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 3.0f,
                },
                new MotionRequest()
                {
                    MotionType = MotionTypeBuiltInClip,
                    Word       = "wave",
                    BuiltInAnimationClipName   = "Wave",
                    UseBlendShape              = false,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 3.0f,
                },
                new MotionRequest()
                {
                    MotionType = MotionTypeBuiltInClip,
                    Word       = "good",
                    BuiltInAnimationClipName   = "Good",
                    UseBlendShape              = false,
                    HoldBlendShape             = false,
                    DurationWhenOnlyBlendShape = 3.0f,
                },
            };

            result[1].BlendShapeValues["Joy"]    = 100;
            result[2].BlendShapeValues["Angry"]  = 100;
            result[3].BlendShapeValues["Sorrow"] = 100;
            result[4].BlendShapeValues["Fun"]    = 100;
            return(result);
        }
Esempio n. 6
0
 public static MotionRequestCollection LoadDefault()
 => new MotionRequestCollection(MotionRequest.GetDefaultMotionRequestSet());