mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-18 11:48:47 -05:00
Display a warning instead of an error when converting animations
This commit is contained in:
@@ -794,6 +794,21 @@ namespace AssetStudio
|
||||
for (var k = 0; k < totalCount; k++)
|
||||
{
|
||||
var animationClip = animationClipUniqArray[k];
|
||||
try
|
||||
{
|
||||
ConvertAnimation(animationClip);
|
||||
Console.Write($"Converted [{k + 1}/{totalCount}] animations\r");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Warning($"Failed to convert animation \"{animationClip.m_Name}\"");
|
||||
Logger.Debug(ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ConvertAnimation(AnimationClip animationClip)
|
||||
{
|
||||
var iAnim = new ImportedKeyframedAnimation();
|
||||
var name = animationClip.m_Name;
|
||||
if (AnimationList.Exists(x => x.Name == name))
|
||||
@@ -937,8 +952,6 @@ namespace AssetStudio
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.Write($"Converted [{k+1}/{totalCount}] animations\r");
|
||||
}
|
||||
}
|
||||
|
||||
private void ReadCurveData(ImportedKeyframedAnimation iAnim, AnimationClipBindingConstant m_ClipBindingConstant, int index, float time, float[] data, int offset, ref int curveIndex)
|
||||
|
||||
Reference in New Issue
Block a user