mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Restore the extension of TextAsset
Export Animator to a separate folder
This commit is contained in:
parent
7dbc2ff95d
commit
ab5f5fbd9d
@ -11,6 +11,7 @@ namespace AssetStudioGUI
|
|||||||
public ClassIDType Type;
|
public ClassIDType Type;
|
||||||
public string TypeString;
|
public string TypeString;
|
||||||
|
|
||||||
|
public string Extension;
|
||||||
public string InfoText;
|
public string InfoText;
|
||||||
public string UniqueID;
|
public string UniqueID;
|
||||||
public GameObjectTreeNode TreeNode;
|
public GameObjectTreeNode TreeNode;
|
||||||
|
@ -90,7 +90,7 @@ namespace AssetStudioGUI
|
|||||||
public static bool ExportTextAsset(AssetItem item, string exportPath)
|
public static bool ExportTextAsset(AssetItem item, string exportPath)
|
||||||
{
|
{
|
||||||
var m_TextAsset = (TextAsset)(item.Asset);
|
var m_TextAsset = (TextAsset)(item.Asset);
|
||||||
var exportFullName = exportPath + item.Text + ".txt";
|
var exportFullName = exportPath + item.Text + (item.Extension ?? ".txt");
|
||||||
if (ExportFileExists(exportFullName))
|
if (ExportFileExists(exportFullName))
|
||||||
return false;
|
return false;
|
||||||
File.WriteAllBytes(exportFullName, m_TextAsset.m_Script);
|
File.WriteAllBytes(exportFullName, m_TextAsset.m_Script);
|
||||||
@ -285,7 +285,7 @@ namespace AssetStudioGUI
|
|||||||
{
|
{
|
||||||
var m_Animator = (Animator)item.Asset;
|
var m_Animator = (Animator)item.Asset;
|
||||||
var convert = animationList != null ? new ModelConverter(m_Animator, animationList.Select(x => (AnimationClip)x.Asset).ToArray()) : new ModelConverter(m_Animator);
|
var convert = animationList != null ? new ModelConverter(m_Animator, animationList.Select(x => (AnimationClip)x.Asset).ToArray()) : new ModelConverter(m_Animator);
|
||||||
exportPath = exportPath + item.Text + ".fbx";
|
exportPath = $"{exportPath}{item.Text}\\{item.Text}.fbx";
|
||||||
return ExportFbx(convert, exportPath);
|
return ExportFbx(convert, exportPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ namespace AssetStudioGUI
|
|||||||
var extension = Path.GetExtension(originalPath);
|
var extension = Path.GetExtension(originalPath);
|
||||||
if (!string.IsNullOrEmpty(extension) && item.Type == ClassIDType.TextAsset)
|
if (!string.IsNullOrEmpty(extension) && item.Type == ClassIDType.TextAsset)
|
||||||
{
|
{
|
||||||
//asset.Extension = extension; //TODO
|
item.Extension = extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
item.Text = Path.GetDirectoryName(originalPath) + "\\" + item.Text;
|
item.Text = Path.GetDirectoryName(originalPath) + "\\" + item.Text;
|
||||||
|
Loading…
Reference in New Issue
Block a user