This commit is contained in:
Razmoth
2023-09-22 20:31:55 +04:00
parent d594f90fec
commit 6ebeaeee3f
48 changed files with 5886 additions and 81 deletions

View File

@@ -78,6 +78,17 @@
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="Libraries\x86\acldb.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>x86\acldb.dll</TargetPath>
</ContentWithTargetPath>
<ContentWithTargetPath Include="Libraries\x64\acldb.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>x64\acldb.dll</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OpenTK" Version="4.8.0" />

View File

@@ -835,8 +835,8 @@ namespace AssetStudioGUI
//StatusStripUpdate("Can be exported to FBX file.");
PreviewAnimator(m_Animator);
break;
case AnimationClip _:
StatusStripUpdate("Can be exported with Animator or Objects");
case AnimationClip m_AnimationClip:
PreviewAnimationClip(m_AnimationClip);
break;
case MiHoYoBinData m_MiHoYoBinData:
PreviewText(m_MiHoYoBinData.AsString);
@@ -1288,6 +1288,12 @@ namespace AssetStudioGUI
var model = new ModelConverter(m_Animator, Properties.Settings.Default.convertType, Studio.Game, false, Array.Empty<AnimationClip>());
PreviewModel(model);
}
private void PreviewAnimationClip(AnimationClip clip)
{
var str = clip.Convert();
PreviewText(str.Replace("\n", "\r\n"));
}
private void PreviewModel(ModelConverter model)
{

View File

@@ -315,6 +315,15 @@ namespace AssetStudioGUI
}
return false;
}
public static bool ExportAnimationClip(AssetItem item, string exportPath)
{
if (!TryExportFile(exportPath, item, ".anim", out var exportFullPath))
return false;
var m_AnimationClip = (AnimationClip)item.Asset;
var str = m_AnimationClip.Convert();
File.WriteAllText(exportFullPath, str);
return true;
}
public static bool ExportAnimator(AssetItem item, string exportPath, List<AssetItem> animationList = null)
{
@@ -427,7 +436,7 @@ namespace AssetStudioGUI
case ClassIDType.Animator:
return ExportAnimator(item, exportPath);
case ClassIDType.AnimationClip:
return false;
return ExportAnimationClip(item, exportPath);
case ClassIDType.MiHoYoBinData:
return ExportMiHoYoBinData(item, exportPath);
default:

Binary file not shown.

Binary file not shown.