1
0
mirror of synced 2024-11-29 09:44:32 +01:00

Fix csv imports

This commit is contained in:
KillzXGaming 2019-03-25 17:13:01 -04:00
parent 040de2bcd0
commit c41ac2f752
6 changed files with 4 additions and 5 deletions

Binary file not shown.

View File

@ -595,6 +595,9 @@ namespace Bfres.Structs
foreach (STGenericObject obj in csvModel.objects)
{
FSHP shape = new FSHP();
Nodes["FshpFolder"].Nodes.Add(shape);
shapes.Add(shape);
shape.VertexBufferIndex = shapes.Count;
shape.vertices = obj.vertices;
shape.MaterialIndex = 0;
@ -636,10 +639,6 @@ namespace Bfres.Structs
{
BfresSwitch.ReadShapesVertices(shape, shape.Shape, shape.VertexBuffer, this);
}
Nodes["FshpFolder"].Nodes.Add(shape);
shapes.Add(shape);
}
Cursor.Current = Cursors.Default;
}

View File

@ -1067,7 +1067,7 @@ namespace Bfres.Structs
if (VertexSkinCount == 0 || VertexSkinCount == 1)
{
int boneId = BoneIndex;
if (VertexSkinCount == 1)
if (VertexSkinCount == 1 && vtx.boneIds.Count > 0)
boneId = vtx.boneIds[0];
Console.WriteLine("Old " + vtx.pos);