Exemple #1
0
        public static bool ExportGameObject(GameObject gameObject, List <AssetPreloadData> animationList, string exportPath)
        {
            var convert = new ModelConverter(gameObject, animationList);

            exportPath = exportPath + Studio.FixFileName(gameObject.Text) + ".fbx";
            return(ModelConverter(convert, exportPath));
        }
Exemple #2
0
        public static bool ExportAnimator(AssetPreloadData animator, List <AssetPreloadData> animationList, string exportPath)
        {
            var m_Animator = new Animator(animator);
            var convert    = new ModelConverter(m_Animator, animationList);

            exportPath = exportPath + Studio.FixFileName(animator.Text) + ".fbx";
            return(ModelConverter(convert, exportPath));
        }
Exemple #3
0
        private static bool ModelConverter(ModelConverter convert, string exportPath)
        {
            var EulerFilter     = (bool)Properties.Settings.Default["EulerFilter"];
            var filterPrecision = (float)(decimal)Properties.Settings.Default["filterPrecision"];
            var allFrames       = (bool)Properties.Settings.Default["allFrames"];
            var allBones        = (bool)Properties.Settings.Default["allBones"];
            var skins           = (bool)Properties.Settings.Default["skins"];
            var boneSize        = (int)(decimal)Properties.Settings.Default["boneSize"];
            var flatInbetween   = (bool)Properties.Settings.Default["flatInbetween"];
            var fbxVersion      = (int)Properties.Settings.Default["fbxVersion"];

            Fbx.Exporter.Export(exportPath, convert, EulerFilter, filterPrecision, allFrames, allBones, skins, boneSize, flatInbetween, fbxVersion);
            return(true);
        }
Exemple #4
0
        public static bool ExportAnimator(AssetPreloadData animator, List <AssetPreloadData> animationList, string exportPath)
        {
            var EulerFilter     = (bool)Properties.Settings.Default["EulerFilter"];
            var filterPrecision = (float)(decimal)Properties.Settings.Default["filterPrecision"];
            var allFrames       = (bool)Properties.Settings.Default["allFrames"];
            var allBones        = (bool)Properties.Settings.Default["allBones"];
            var skins           = (bool)Properties.Settings.Default["skins"];
            var boneSize        = (int)(decimal)Properties.Settings.Default["boneSize"];
            var flatInbetween   = (bool)Properties.Settings.Default["flatInbetween"];
            var compatibility   = (bool)Properties.Settings.Default["compatibility"];
            var m_Animator      = new Animator(animator);
            var convert         = new ModelConverter(m_Animator, animationList);

            exportPath = exportPath + Studio.FixFileName(animator.Text) + ".fbx";
            Fbx.Exporter.Export(exportPath, convert, EulerFilter, filterPrecision, ".fbx", allFrames, allBones, skins, boneSize, flatInbetween, compatibility);
            return(true);
        }