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:
4
AssetStudioGUI/AssetStudioGUIForm.Designer.cs
generated
4
AssetStudioGUI/AssetStudioGUIForm.Designer.cs
generated
@ -298,8 +298,8 @@
|
||||
this.useAssetLoadingViaTypetreeToolStripMenuItem.Name = "useAssetLoadingViaTypetreeToolStripMenuItem";
|
||||
this.useAssetLoadingViaTypetreeToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
|
||||
this.useAssetLoadingViaTypetreeToolStripMenuItem.Text = "Parse assets using their typetree";
|
||||
this.useAssetLoadingViaTypetreeToolStripMenuItem.ToolTipText = "(Applies to assets with typetree included). Slower but more correct parsing. Only" +
|
||||
" for Texture2D and AnimationClip assets for now.";
|
||||
this.useAssetLoadingViaTypetreeToolStripMenuItem.ToolTipText = "(Applies to assets with typetree included). Slower but can parse non-standard ass" +
|
||||
"ets. Only for Texture2D, AnimationClip and Material assets for now.";
|
||||
this.useAssetLoadingViaTypetreeToolStripMenuItem.CheckedChanged += new System.EventHandler(this.useAssetLoadingViaTypetreeToolStripMenuItem_CheckedChanged);
|
||||
//
|
||||
// assetLoadingToolStripSeparator
|
||||
|
@ -1123,8 +1123,8 @@ namespace AssetStudioGUI
|
||||
}
|
||||
}
|
||||
soundBuff = BigArrayPool<byte>.Shared.Rent(m_AudioClip.m_AudioData.Size);
|
||||
m_AudioClip.m_AudioData.GetData(soundBuff, out var read);
|
||||
if (read <= 0)
|
||||
var dataLen = m_AudioClip.m_AudioData.GetData(soundBuff);
|
||||
if (dataLen <= 0)
|
||||
return;
|
||||
|
||||
var exinfo = new FMOD.CREATESOUNDEXINFO();
|
||||
@ -1550,6 +1550,9 @@ namespace AssetStudioGUI
|
||||
|
||||
private void ResetForm()
|
||||
{
|
||||
if (Studio.assetsManager.assetsFileList.Count > 0)
|
||||
Logger.Info("Resetting program...");
|
||||
|
||||
Text = guiTitle;
|
||||
Studio.assetsManager.Clear();
|
||||
Studio.assemblyLoader.Clear();
|
||||
|
@ -95,14 +95,14 @@ namespace AssetStudioGUI
|
||||
|
||||
public static bool ExportAudioClip(AssetItem item, string exportPath, out string debugLog)
|
||||
{
|
||||
debugLog = "";
|
||||
string exportFullPath;
|
||||
debugLog = string.Empty;
|
||||
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.Warning($"Failed to export \"{item.Text}\": AudioData was not found");
|
||||
return false;
|
||||
|
@ -1182,7 +1182,10 @@ namespace AssetStudioGUI
|
||||
{
|
||||
foreach (var assetKvp in l2dAssetContainers)
|
||||
{
|
||||
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);
|
||||
@ -1243,16 +1246,19 @@ namespace AssetStudioGUI
|
||||
try
|
||||
{
|
||||
var cubismExtractor = new Live2DExtractor(assetGroupKvp, selClipMotions, selFadeMotions, selFadeLst);
|
||||
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