Пример #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);
            }
        }
Пример #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);
            }
        }