mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 22:10:22 +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()
|
||||
{
|
||||
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;
|
||||
foreach (var bone in Bones)
|
||||
if (drawable is STSkeleton)
|
||||
{
|
||||
var animBone = ((STSkeleton)drawable).GetBone(bone.Text);
|
||||
if (animBone == null) {
|
||||
hasMatchingBoneset = false;
|
||||
continue;
|
||||
foreach (var bone in Bones)
|
||||
{
|
||||
var animBone = ((STSkeleton)drawable).GetBone(bone.Text);
|
||||
|
||||
if (animBone != null)
|
||||
return (STSkeleton)drawable;
|
||||
}
|
||||
}
|
||||
|
||||
//Animation has all bones present in skeleton
|
||||
if (hasMatchingBoneset)
|
||||
return (STSkeleton)drawable;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue