mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-29 07:50:27 +00:00
Revert GetActiveSkeleton() as it causes animation export issues.
Since bfres has no real way to actively tell what animation uses which skeleton, I will need to do a UI in another update to select which model to export with.
This commit is contained in:
parent
06e835fd3d
commit
a425bd6a6e
1 changed files with 9 additions and 12 deletions
|
@ -227,23 +227,20 @@ namespace Bfres.Structs
|
||||||
private STSkeleton GetActiveSkeleton()
|
private STSkeleton GetActiveSkeleton()
|
||||||
{
|
{
|
||||||
var viewport = LibraryGUI.GetActiveViewport();
|
var viewport = LibraryGUI.GetActiveViewport();
|
||||||
foreach (var drawable in viewport.scene.objects)
|
if (viewport != null)
|
||||||
{
|
{
|
||||||
if (drawable is STSkeleton)
|
foreach (var drawable in viewport.scene.objects)
|
||||||
{
|
{
|
||||||
bool hasMatchingBoneset = true;
|
if (drawable is STSkeleton)
|
||||||
foreach (var bone in Bones)
|
|
||||||
{
|
{
|
||||||
var animBone = ((STSkeleton)drawable).GetBone(bone.Text);
|
foreach (var bone in Bones)
|
||||||
if (animBone == null) {
|
{
|
||||||
hasMatchingBoneset = false;
|
var animBone = ((STSkeleton)drawable).GetBone(bone.Text);
|
||||||
continue;
|
|
||||||
|
if (animBone != null)
|
||||||
|
return (STSkeleton)drawable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Animation has all bones present in skeleton
|
|
||||||
if (hasMatchingBoneset)
|
|
||||||
return (STSkeleton)drawable;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue