mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-17 04:22:54 +08:00
Fix(); Textures with pack:/ prefix not exporting
This commit is contained in:
parent
dcc5cd5837
commit
999adedb5d
@ -1980,7 +1980,18 @@ namespace CodeWalker.Forms
|
||||
{
|
||||
try
|
||||
{
|
||||
string fpath = folderpath + tex.Name + ".dds";
|
||||
string textureName = tex.Name;
|
||||
if (textureName.StartsWith("pack:/", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
textureName = textureName.Substring(6);
|
||||
}
|
||||
|
||||
if (textureName.EndsWith(".dds", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
textureName = textureName.Substring(0, textureName.Length - 4);
|
||||
}
|
||||
|
||||
string fpath = folderpath + textureName + ".dds";
|
||||
byte[] dds = DDSIO.GetDDSFile(tex);
|
||||
File.WriteAllBytes(fpath, dds);
|
||||
successcount++;
|
||||
|
Loading…
Reference in New Issue
Block a user