Always try to map materials even if use materials is unchecked
This commit is contained in:
parent
5a17b71d8f
commit
9c44e14597
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1056,13 +1056,11 @@ namespace Bfres.Structs
|
|||||||
shape.vertexAttributes = settings.CreateNewAttributes();
|
shape.vertexAttributes = settings.CreateNewAttributes();
|
||||||
shape.BoneIndex = obj.BoneIndex;
|
shape.BoneIndex = obj.BoneIndex;
|
||||||
|
|
||||||
if (UseMats)
|
if (obj.MaterialIndex + MatStartIndex < materials.Count)
|
||||||
shape.MaterialIndex = obj.MaterialIndex + MatStartIndex;
|
shape.MaterialIndex = obj.MaterialIndex + MatStartIndex;
|
||||||
else
|
else
|
||||||
shape.MaterialIndex = 0;
|
shape.MaterialIndex = 0;
|
||||||
|
|
||||||
if (shape.MaterialIndex >= materials.Count)
|
|
||||||
shape.MaterialIndex = 0;
|
|
||||||
|
|
||||||
shape.lodMeshes = obj.lodMeshes;
|
shape.lodMeshes = obj.lodMeshes;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user