Fixed, Wavefront .obj Export: long texture names were handled incorrectly causing exceptions during textures export.

This commit is contained in:
MaxED 2015-06-30 12:16:03 +00:00
parent d5d375834f
commit 6732e31493

View file

@ -96,7 +96,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
if(!id.IsImageLoaded) id.LoadImage();
Bitmap bmp = id.GetBitmap();
bmp.Save(Path.Combine(settings.ObjPath, s + ".PNG"), ImageFormat.Png);
bmp.Save(Path.Combine(settings.ObjPath, Path.GetFileNameWithoutExtension(s) + ".PNG"), ImageFormat.Png);
}
else
{
@ -127,7 +127,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
if(settings.Textures != null && Array.IndexOf(settings.Textures, s) != -1)
flatname += "_FLAT";
bmp.Save(Path.Combine(settings.ObjPath, flatname + ".PNG"), ImageFormat.Png);
bmp.Save(Path.Combine(settings.ObjPath, Path.GetFileNameWithoutExtension(flatname) + ".PNG"), ImageFormat.Png);
}
else