mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
Some minor fixes
This commit is contained in:
@ -1007,7 +1007,7 @@ namespace AssetStudioCLI.Options
|
||||
switch (value.ToLower())
|
||||
{
|
||||
case "auto":
|
||||
o_bundleBlockInfoCompression.Value = CompressionType.Zstd;
|
||||
o_bundleBlockInfoCompression.Value = CompressionType.Auto;
|
||||
break;
|
||||
case "zstd":
|
||||
o_bundleBlockInfoCompression.Value = CompressionType.Zstd;
|
||||
@ -1032,7 +1032,7 @@ namespace AssetStudioCLI.Options
|
||||
switch (value.ToLower())
|
||||
{
|
||||
case "auto":
|
||||
o_bundleBlockCompression.Value = CompressionType.Zstd;
|
||||
o_bundleBlockCompression.Value = CompressionType.Auto;
|
||||
break;
|
||||
case "zstd":
|
||||
o_bundleBlockCompression.Value = CompressionType.Zstd;
|
||||
|
@ -97,13 +97,13 @@ namespace AssetStudioCLI
|
||||
public static bool ExportAudioClip(AssetItem item, string exportPath, out string debugLog)
|
||||
{
|
||||
debugLog = string.Empty;
|
||||
string exportFullPath;
|
||||
var m_AudioClip = (AudioClip)item.Asset;
|
||||
var m_AudioData = BigArrayPool<byte>.Shared.Rent(m_AudioClip.m_AudioData.Size);
|
||||
try
|
||||
{
|
||||
m_AudioClip.m_AudioData.GetData(m_AudioData, out var read);
|
||||
if (read <= 0)
|
||||
string exportFullPath;
|
||||
var dataLen = m_AudioClip.m_AudioData.GetData(m_AudioData);
|
||||
if (dataLen <= 0)
|
||||
{
|
||||
Logger.Error($"Export error. \"{item.Text}\": AudioData was not found");
|
||||
return false;
|
||||
|
@ -738,7 +738,7 @@ namespace AssetStudioCLI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error($"{asset.SourceFile.originalPath}: [{$"{asset.Type}: {asset.Text}".Color(Ansi.BrightRed)}] : Export error\n{ex}");
|
||||
Logger.Error($"{asset.SourceFile.originalPath ?? asset.SourceFile.fullName}: [{$"{asset.Type}: {asset.Text}".Color(Ansi.BrightRed)}] : Export error\n{ex}");
|
||||
}
|
||||
|
||||
if (isExported)
|
||||
@ -763,7 +763,7 @@ namespace AssetStudioCLI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error($"{asset.SourceFile.originalPath}: [{$"{asset.Type}: {asset.Text}".Color(Ansi.BrightRed)}] : Export error\n{ex}");
|
||||
Logger.Error($"{asset.SourceFile.originalPath ?? asset.SourceFile.fullName}: [{$"{asset.Type}: {asset.Text}".Color(Ansi.BrightRed)}] : Export error\n{ex}");
|
||||
}
|
||||
});
|
||||
ParallelExporter.ClearHash();
|
||||
@ -1084,7 +1084,10 @@ namespace AssetStudioCLI
|
||||
{
|
||||
foreach (var assetKvp in containers)
|
||||
{
|
||||
l2dContainers[assetKvp.Key] = Path.GetFileName(assetKvp.Key.assetsFile.originalPath);
|
||||
var container = string.IsNullOrEmpty(assetKvp.Key.assetsFile.originalPath)
|
||||
? assetKvp.Key.assetsFile.fullName
|
||||
: assetKvp.Key.assetsFile.originalPath;
|
||||
l2dContainers[assetKvp.Key] = container;
|
||||
}
|
||||
}
|
||||
var mocPathDict = GenerateMocPathDict(mocDict, l2dContainers, searchByFilename);
|
||||
@ -1141,16 +1144,19 @@ namespace AssetStudioCLI
|
||||
try
|
||||
{
|
||||
var cubismExtractor = new Live2DExtractor(assetGroupKvp);
|
||||
var filename = string.IsNullOrEmpty(cubismExtractor.MocMono.assetsFile.originalPath)
|
||||
? Path.GetFileNameWithoutExtension(cubismExtractor.MocMono.assetsFile.fileName)
|
||||
: Path.GetFileNameWithoutExtension(cubismExtractor.MocMono.assetsFile.originalPath);
|
||||
string modelPath;
|
||||
switch (modelGroupOption)
|
||||
{
|
||||
case Live2DModelGroupOption.SourceFileName:
|
||||
modelPath = Path.GetFileNameWithoutExtension(cubismExtractor.MocMono.assetsFile.originalPath);
|
||||
modelPath = filename;
|
||||
break;
|
||||
case Live2DModelGroupOption.ModelName:
|
||||
modelPath = !string.IsNullOrEmpty(cubismExtractor.Model?.Name)
|
||||
? cubismExtractor.Model.Name
|
||||
: Path.GetFileNameWithoutExtension(cubismExtractor.MocMono.assetsFile.originalPath);
|
||||
: filename;
|
||||
break;
|
||||
default: //ContainerPath
|
||||
var container = searchByFilename && cubismExtractor.Model != null
|
||||
|
Reference in New Issue
Block a user