Textures that are referenced in a model loaded by Assimp get now compiled to.

This commit is contained in:
Konstantin Koch 2015-11-04 23:40:29 +01:00
parent 23466b9b31
commit 567b76fe6a

View File

@ -298,7 +298,11 @@ namespace ANX.Framework.Content.Pipeline
if (string.IsNullOrEmpty(texture.FilePath))
continue;
material.Textures.Add(System.IO.Path.GetFileNameWithoutExtension(texture.FilePath) + " " + texture.TextureIndex, new ExternalReference<TextureContent>(texture.FilePath));
var sourcePath = new Uri(texture.FilePath, UriKind.RelativeOrAbsolute);
if (!sourcePath.IsAbsoluteUri)
sourcePath = new Uri(new Uri(this.identity.SourceFilename, UriKind.Absolute), sourcePath);
material.Textures.Add(Path.GetFileNameWithoutExtension(texture.FilePath) + " " + texture.TextureIndex, new ExternalReference<TextureContent>(sourcePath.LocalPath));
}
if (assimpMaterial.HasBlendMode)