mirror of
https://github.com/MapMakersAndProgrammers/io_scene_a3d.git
synced 2025-10-26 09:59:11 -07:00
Fix bug where we try add materials when there are none
This commit is contained in:
@@ -163,7 +163,8 @@ class A3DBlenderImporter:
|
||||
# Apply materials (version 2)
|
||||
faceIndexBase = 0
|
||||
for submeshI, submesh in enumerate(meshData.submeshes):
|
||||
if submesh.materialID == None:
|
||||
if submesh.materialID == None or len(self.materials) == 0: #XXX: perhaps try add a material slot to the object so we still make use of the submesh data instead of skipping it when there are no materials?
|
||||
# if materialID is None then this is a version 3 model submesh
|
||||
continue
|
||||
me.materials.append(self.materials[submesh.materialID])
|
||||
for faceI in range(submesh.indexCount//3):
|
||||
|
||||
Reference in New Issue
Block a user