예제 #1
0
        public MvdMotion CreateFrom([CanBeNull] CharacterImasMotionAsset bodyMotion, [CanBeNull] Avatar avatar, [CanBeNull] PmxModel mltdPmxModel,
                                    [CanBeNull] CharacterImasMotionAsset cameraMotion,
                                    [CanBeNull] ScenarioObject scenarioObject, int songPosition)
        {
            IReadOnlyList <MvdCameraMotion> cameraFrames;

            if (ProcessCameraFrames && cameraMotion != null)
            {
                cameraFrames = CreateCameraMotions(cameraMotion);
            }
            else
            {
                cameraFrames = EmptyArray.Of <MvdCameraMotion>();
            }

            var mvd = new MvdMotion(cameraFrames);

            if (ConversionConfig.Current.Transform60FpsTo30Fps)
            {
                mvd.Fps = 30;
            }
            else
            {
                mvd.Fps = 60;
            }

            return(mvd);
        }
예제 #2
0
        public ISourceSymbol[] SourceSymbolsFor(IFile file)
        {
            var provider = ProviderFor(file);

            return(provider != null
                                ? provider.SourceSymbolsFor(file)
                                : EmptyArray.Of <ISourceSymbol>());
        }
예제 #3
0
        public VmdMotion CreateFrom([CanBeNull] CharacterImasMotionAsset bodyMotion, [CanBeNull] Avatar avatar, [CanBeNull] PmxModel mltdPmxModel,
                                    [CanBeNull] CharacterImasMotionAsset cameraMotion,
                                    [CanBeNull] ScenarioObject scenarioObject, int songPosition)
        {
            IReadOnlyList <VmdBoneFrame>   boneFrames;
            IReadOnlyList <VmdCameraFrame> cameraFrames;
            IReadOnlyList <VmdFacialFrame> facialFrames;
            IReadOnlyList <VmdLightFrame>  lightFrames;

            if (ProcessBoneFrames && (bodyMotion != null && avatar != null && mltdPmxModel != null))
            {
                boneFrames = CreateBoneFrames(bodyMotion, avatar, mltdPmxModel);
            }
            else
            {
                boneFrames = EmptyArray.Of <VmdBoneFrame>();
            }

            if (ProcessCameraFrames && cameraMotion != null)
            {
                cameraFrames = CreateCameraFrames(cameraMotion, FixedFov);
            }
            else
            {
                cameraFrames = EmptyArray.Of <VmdCameraFrame>();
            }

            if (ProcessFacialFrames && scenarioObject != null)
            {
                facialFrames = CreateFacialFrames(scenarioObject, songPosition);
            }
            else
            {
                facialFrames = EmptyArray.Of <VmdFacialFrame>();
            }

            if (ProcessLightFrames && scenarioObject != null)
            {
                lightFrames = CreateLightFrames(scenarioObject);
            }
            else
            {
                lightFrames = EmptyArray.Of <VmdLightFrame>();
            }

            const string modelName = "MODEL_00";

            var vmd = new VmdMotion(modelName, boneFrames, facialFrames, cameraFrames, lightFrames, null);

            return(vmd);
        }
예제 #4
0
 internal SwayBone()
 {
     Colliders = EmptyArray.Of <SwayCollider>();
 }