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); } }
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); } }
public static Model ConvertModelFromAiSceneWithSingleMesh(string filePath) { string texturesDirectory = Path.GetDirectoryName(filePath); return(ConvertModelFromAiSceneWithSingleMesh(SceneUtilities.Import(filePath), texturesDirectory)); }