fixed bugs

This commit is contained in:
Perfare 2019-04-18 12:31:16 +08:00
parent edb6256fc9
commit f76d3d8fcd
3 changed files with 21 additions and 10 deletions

View File

@ -757,6 +757,10 @@ namespace AssetStudio
for (int j = 0; j < pAnimationList->Count; j++)
{
ImportedAnimationKeyframedTrack^ keyframeList = pAnimationList[j];
if (keyframeList->Path == nullptr)
{
continue;
}
FbxNode* pNode = FindNodeByPath(keyframeList->Path);
if (pNode != nullptr)
{

View File

@ -538,6 +538,7 @@ namespace AssetStudioGUI
{
ThreadPool.QueueUserWorkItem(state =>
{
Progress.Reset();
Logger.Info($"Exporting {animator.Text}");
try
{
@ -546,6 +547,7 @@ namespace AssetStudioGUI
{
Process.Start(exportPath);
}
Progress.Report(1, 1);
Logger.Info($"Finished exporting {animator.Text}");
}
catch (Exception ex)

View File

@ -677,9 +677,22 @@ namespace AssetStudio
foreach (var animationClip in animationClipHashSet)
{
var iAnim = new ImportedKeyframedAnimation();
AnimationList.Add(iAnim);
iAnim.Name = animationClip.m_Name;
var name = animationClip.m_Name;
if (AnimationList.Exists(x => x.Name == name))
{
for (int i = 1; ; i++)
{
var fixName = name + $"_{i}";
if (!AnimationList.Exists(x => x.Name == fixName))
{
name = fixName;
break;
}
}
}
iAnim.Name = name;
iAnim.TrackList = new List<ImportedAnimationKeyframedTrack>();
AnimationList.Add(iAnim);
if (animationClip.m_Legacy)
{
foreach (var m_CompressedRotationCurve in animationClip.m_CompressedRotationCurves)
@ -740,14 +753,6 @@ namespace AssetStudio
}
}
}
/*foreach (var m_FloatCurve in animationClip.m_FloatCurves)
{
var track = iAnim.FindTrack(m_FloatCurve.path);
foreach (var m_Curve in m_FloatCurve.curve.m_Curve)
{
track.Curve.Add(new ImportedKeyframe<float>(m_Curve.time, m_Curve.value));
}
}*/
}
else
{