Exemple #1
0
        public static void ConvertAiSceneFromModel(Model model, string outputFileName, TextureDatabase textureDatabase = null, bool appendTags = false)
        {
            SceneUtilities.Export(ConvertAiSceneFromModel(model, textureDatabase, appendTags), outputFileName);

            if (model.TextureSet != null)
            {
                var texturesOutputDirectory = Path.GetDirectoryName(outputFileName);
                TextureUtilities.SaveTextures(model.TextureSet, texturesOutputDirectory);
            }
        }
Exemple #2
0
        public static void ConvertAiSceneFromModels(List <Model> models, string outputFileName, TextureDatabase textureDatabase = null)
        {
            SceneUtilities.Export(ConvertAiSceneFromModels(models, textureDatabase), outputFileName);

            var texturesOutputDirectory = Path.GetDirectoryName(outputFileName);

            foreach (var model in models.Where(x => x.TextureSet != null))
            {
                TextureUtilities.SaveTextures(model.TextureSet, texturesOutputDirectory);
            }
        }
Exemple #3
0
        public static Model ConvertModelFromAiSceneWithSingleMesh(string filePath)
        {
            string texturesDirectory = Path.GetDirectoryName(filePath);

            return(ConvertModelFromAiSceneWithSingleMesh(SceneUtilities.Import(filePath), texturesDirectory));
        }