mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
fixed bugs
This commit is contained in:
parent
edb6256fc9
commit
f76d3d8fcd
@ -757,6 +757,10 @@ namespace AssetStudio
|
|||||||
for (int j = 0; j < pAnimationList->Count; j++)
|
for (int j = 0; j < pAnimationList->Count; j++)
|
||||||
{
|
{
|
||||||
ImportedAnimationKeyframedTrack^ keyframeList = pAnimationList[j];
|
ImportedAnimationKeyframedTrack^ keyframeList = pAnimationList[j];
|
||||||
|
if (keyframeList->Path == nullptr)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
FbxNode* pNode = FindNodeByPath(keyframeList->Path);
|
FbxNode* pNode = FindNodeByPath(keyframeList->Path);
|
||||||
if (pNode != nullptr)
|
if (pNode != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -538,6 +538,7 @@ namespace AssetStudioGUI
|
|||||||
{
|
{
|
||||||
ThreadPool.QueueUserWorkItem(state =>
|
ThreadPool.QueueUserWorkItem(state =>
|
||||||
{
|
{
|
||||||
|
Progress.Reset();
|
||||||
Logger.Info($"Exporting {animator.Text}");
|
Logger.Info($"Exporting {animator.Text}");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -546,6 +547,7 @@ namespace AssetStudioGUI
|
|||||||
{
|
{
|
||||||
Process.Start(exportPath);
|
Process.Start(exportPath);
|
||||||
}
|
}
|
||||||
|
Progress.Report(1, 1);
|
||||||
Logger.Info($"Finished exporting {animator.Text}");
|
Logger.Info($"Finished exporting {animator.Text}");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -677,9 +677,22 @@ namespace AssetStudio
|
|||||||
foreach (var animationClip in animationClipHashSet)
|
foreach (var animationClip in animationClipHashSet)
|
||||||
{
|
{
|
||||||
var iAnim = new ImportedKeyframedAnimation();
|
var iAnim = new ImportedKeyframedAnimation();
|
||||||
AnimationList.Add(iAnim);
|
var name = animationClip.m_Name;
|
||||||
iAnim.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>();
|
iAnim.TrackList = new List<ImportedAnimationKeyframedTrack>();
|
||||||
|
AnimationList.Add(iAnim);
|
||||||
if (animationClip.m_Legacy)
|
if (animationClip.m_Legacy)
|
||||||
{
|
{
|
||||||
foreach (var m_CompressedRotationCurve in animationClip.m_CompressedRotationCurves)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user