mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
[GUI] Improve export of Texture2DArray images
- Do not export an entire tex2darray array if both the tex2darray and some of its images were selected for exporting
This commit is contained in:
parent
0f9afa60d7
commit
46f8023756
@ -26,7 +26,7 @@ namespace AssetStudio
|
|||||||
|
|
||||||
m_Name = $"{m_Texture2DArray.m_Name}_{layer + 1}";
|
m_Name = $"{m_Texture2DArray.m_Name}_{layer + 1}";
|
||||||
type = ClassIDType.Texture2DArrayImage;
|
type = ClassIDType.Texture2DArrayImage;
|
||||||
m_PathID = -1;
|
m_PathID = m_Texture2DArray.m_PathID;
|
||||||
|
|
||||||
m_Width = m_Texture2DArray.m_Width;
|
m_Width = m_Texture2DArray.m_Width;
|
||||||
m_Height = m_Texture2DArray.m_Height;
|
m_Height = m_Texture2DArray.m_Height;
|
||||||
|
@ -1894,6 +1894,19 @@ namespace AssetStudioGUI
|
|||||||
toExportAssets = visibleAssets;
|
toExportAssets = visibleAssets;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (toExportAssets != null && filterTypeToolStripMenuItem.DropDownItems.ContainsKey("Texture2DArray"))
|
||||||
|
{
|
||||||
|
var tex2dArrayImgPathIdSet = toExportAssets.FindAll(x => x.Type == ClassIDType.Texture2DArrayImage).Select(x => x.m_PathID).ToHashSet();
|
||||||
|
foreach (var pathId in tex2dArrayImgPathIdSet)
|
||||||
|
{
|
||||||
|
toExportAssets = toExportAssets.Where(x =>
|
||||||
|
x.Type != ClassIDType.Texture2DArray
|
||||||
|
|| (x.Type == ClassIDType.Texture2DArray && x.m_PathID != pathId))
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Studio.ExportAssets(saveFolderDialog.Folder, toExportAssets, exportType);
|
Studio.ExportAssets(saveFolderDialog.Folder, toExportAssets, exportType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user