mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -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:
@ -1894,6 +1894,19 @@ namespace AssetStudioGUI
|
||||
toExportAssets = visibleAssets;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user