Fix bfmat files breaking on importing model

This commit is contained in:
KillzXGaming 2019-03-23 15:59:15 -04:00
parent a5a8ca10e5
commit c4903cdb77
5 changed files with 5 additions and 4 deletions

Binary file not shown.

View file

@ -123,8 +123,8 @@ namespace FirstPlugin
Text = FileName;
CanSave = true;
BezelEngineArchive bea = new BezelEngineArchive(stream);
// FillTreeNodes(this, beaFile.FileList);
beaFile = new BezelEngineArchive(stream);
FillTreeNodes(this, beaFile.FileList);
ContextMenu = new ContextMenu();

View file

@ -651,8 +651,6 @@ namespace Bfres.Structs
foreach (STGenericMaterial mat in assimp.materials)
{
FMAT fmat = new FMAT();
materials.Add(fmat.Text, fmat);
Nodes["FmatFolder"].Nodes.Add(fmat);
if (resFileU != null)
{
@ -785,6 +783,9 @@ namespace Bfres.Structs
fmat.Material.Name = Text;
fmat.SetMaterial(fmat.Material);
}
materials.Add(fmat.Text, fmat);
Nodes["FmatFolder"].Nodes.Add(fmat);
}
}