Add a loaded check for dae/fbx
This commit is contained in:
parent
6303769adb
commit
db4766c63d
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -657,7 +657,10 @@ namespace Bfres.Structs
|
||||
break;
|
||||
default:
|
||||
AssimpData assimp = new AssimpData();
|
||||
assimp.LoadFile(FileName);
|
||||
bool IsLoaded = assimp.LoadFile(FileName);
|
||||
|
||||
if (!IsLoaded)
|
||||
return;
|
||||
|
||||
if (assimp.objects.Count == 0)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ namespace Switch_Toolbox.Library
|
||||
public AssimpData()
|
||||
{
|
||||
}
|
||||
public void LoadFile(string FileName)
|
||||
public bool LoadFile(string FileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -56,7 +56,10 @@ namespace Switch_Toolbox.Library
|
||||
scene = Importer.ImportFile(FileName, settings.GetFlags());
|
||||
|
||||
LoadScene();
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -66,6 +69,8 @@ namespace Switch_Toolbox.Library
|
||||
}
|
||||
else
|
||||
MessageBox.Show($"{e.ToString()}");
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public void processNode()
|
||||
|
Loading…
Reference in New Issue
Block a user