From 8be6b1b712edf1313c49f86fcc4ec945a89a2f50 Mon Sep 17 00:00:00 2001 From: bitsawer Date: Wed, 21 Mar 2018 22:17:59 +0200 Subject: [PATCH] Fix face material lookup --- io_scene_dae/export_dae.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io_scene_dae/export_dae.py b/io_scene_dae/export_dae.py index d608f97..56b38b6 100644 --- a/io_scene_dae/export_dae.py +++ b/io_scene_dae/export_dae.py @@ -571,8 +571,8 @@ def export_mesh(self, node, armature=None, skeyindex=-1, skel_source=None, surface_indices[f.material_index] = [] try: - # TODO: Review, understand why it throws - mat = mesh.materials[f.material_index] + # Throws if the mesh has no materials, ignore it + mat = node.material_slots[f.material_index].material except: mat = None