Add grouping option with full container path

* [GUI] - "container path full (with name)"
* [CLI] - "containerFull"
(https://github.com/Perfare/AssetStudio/issues/815)
This commit is contained in:
VaDiM
2023-05-19 02:20:22 +03:00
parent 02e46eaa0d
commit c7356875f9
4 changed files with 34 additions and 8 deletions

View File

@ -261,18 +261,24 @@ namespace AssetStudioCLI
var toExportCount = parsedAssetsList.Count;
var exportedCount = 0;
var groupOption = options.o_groupAssetsBy.Value;
foreach (var asset in parsedAssetsList)
{
string exportPath;
switch (options.o_groupAssetsBy.Value)
switch (groupOption)
{
case AssetGroupOption.TypeName:
exportPath = Path.Combine(savePath, asset.TypeString);
break;
case AssetGroupOption.ContainerPath:
case AssetGroupOption.ContainerPathFull:
if (!string.IsNullOrEmpty(asset.Container))
{
exportPath = Path.Combine(savePath, Path.GetDirectoryName(asset.Container));
if (groupOption == AssetGroupOption.ContainerPathFull)
{
exportPath = Path.Combine(exportPath, Path.GetFileNameWithoutExtension(asset.Container));
}
}
else
{