mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Fixed
This commit is contained in:
parent
a89fd049f1
commit
6d68f2bde5
@ -538,7 +538,7 @@ namespace AssetStudio
|
||||
if (combine)
|
||||
{
|
||||
meshR.m_GameObject.TryGetGameObject(out var m_GameObject);
|
||||
var frame = ImportedHelpers.FindChild(m_GameObject.m_Name, FrameList[0]);
|
||||
var frame = ImportedHelpers.FindChildOrRoot(m_GameObject.m_Name, FrameList[0]);
|
||||
if (frame?.Parent != null)
|
||||
{
|
||||
var parent = frame;
|
||||
@ -596,7 +596,7 @@ namespace AssetStudio
|
||||
private string GetMeshPath(Transform meshTransform)
|
||||
{
|
||||
meshTransform.m_GameObject.TryGetGameObject(out var m_GameObject);
|
||||
var curFrame = ImportedHelpers.FindChild(m_GameObject.m_Name, FrameList[0]) ?? ImportedHelpers.FindFrame(m_GameObject.m_Name, FrameList[0]);
|
||||
var curFrame = ImportedHelpers.FindChildOrRoot(m_GameObject.m_Name, FrameList[0]);
|
||||
var path = curFrame.Name;
|
||||
while (curFrame.Parent != null)
|
||||
{
|
||||
@ -1031,7 +1031,7 @@ namespace AssetStudio
|
||||
{
|
||||
transformName = strs.Last();
|
||||
var parentFrameName = strs[strs.Length - 2];
|
||||
parentFrame = ImportedHelpers.FindChild(parentFrameName, rootFrame);
|
||||
parentFrame = ImportedHelpers.FindChildOrRoot(parentFrameName, rootFrame);
|
||||
}
|
||||
|
||||
var skeletonPose = avatar.m_Avatar.m_DefaultPose;
|
||||
|
@ -230,7 +230,7 @@ namespace AssetStudio
|
||||
{
|
||||
if (!exportFrames->Contains(boneList[i]->Name))
|
||||
{
|
||||
ImportedFrame^ boneParent = ImportedHelpers::FindFrame(boneList[i]->Name, imported->FrameList[0]);
|
||||
ImportedFrame^ boneParent = ImportedHelpers::FindChildOrRoot(boneList[i]->Name, imported->FrameList[0]);
|
||||
while (boneParent != nullptr)
|
||||
{
|
||||
exportFrames->Add(boneParent->Name);
|
||||
@ -754,7 +754,7 @@ namespace AssetStudio
|
||||
ImportedAnimationKeyframedTrack^ keyframeList = pAnimationList[j];
|
||||
String^ name = keyframeList->Name;
|
||||
int dotPos = name->IndexOf('.');
|
||||
if (dotPos >= 0 && !ImportedHelpers::FindFrame(name, imported->FrameList[0]))
|
||||
if (dotPos >= 0 && !ImportedHelpers::FindChildOrRoot(name, imported->FrameList[0]))
|
||||
{
|
||||
name = name->Substring(0, dotPos);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ namespace AssetStudio
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ImportedFrame FindChild(string name, ImportedFrame root)
|
||||
public static ImportedFrame FindChildOrRoot(string name, ImportedFrame root)
|
||||
{
|
||||
foreach (var child in root)
|
||||
{
|
||||
@ -210,7 +210,10 @@ namespace AssetStudio
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
|
||||
if (root.Name == name)
|
||||
{
|
||||
return root;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user