Fix materials not mapping to objects
This commit is contained in:
parent
110d589086
commit
b4c297f572
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -867,12 +867,14 @@ namespace Bfres.Structs
|
|||||||
shape.vertexAttributes = settings.CreateNewAttributes();
|
shape.vertexAttributes = settings.CreateNewAttributes();
|
||||||
shape.BoneIndex = obj.BoneIndex;
|
shape.BoneIndex = obj.BoneIndex;
|
||||||
|
|
||||||
|
STConsole.WriteLine(Text + " " + obj.MaterialIndex);
|
||||||
|
|
||||||
if (UseMats)
|
if (UseMats)
|
||||||
shape.MaterialIndex = obj.MaterialIndex + MatStartIndex;
|
shape.MaterialIndex = obj.MaterialIndex + MatStartIndex;
|
||||||
else
|
else
|
||||||
shape.MaterialIndex = 0;
|
shape.MaterialIndex = 0;
|
||||||
|
|
||||||
if (materials.Count >= shape.MaterialIndex)
|
if (shape.MaterialIndex >= materials.Count)
|
||||||
shape.MaterialIndex = 0;
|
shape.MaterialIndex = 0;
|
||||||
|
|
||||||
shape.Text = obj.ObjectName;
|
shape.Text = obj.ObjectName;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -204,6 +204,8 @@ namespace Switch_Toolbox.Library
|
|||||||
matTex.wrapModeS = SetWrapMode(tex.WrapModeU);
|
matTex.wrapModeS = SetWrapMode(tex.WrapModeU);
|
||||||
matTex.wrapModeT = SetWrapMode(tex.WrapModeV);
|
matTex.wrapModeT = SetWrapMode(tex.WrapModeV);
|
||||||
|
|
||||||
|
STConsole.WriteLine($"Getting assimp texture slot {matTex.Name} Type {matTex.Type}");
|
||||||
|
|
||||||
return matTex;
|
return matTex;
|
||||||
}
|
}
|
||||||
private int SetWrapMode(TextureWrapMode wrap)
|
private int SetWrapMode(TextureWrapMode wrap)
|
||||||
|
Loading…
Reference in New Issue
Block a user