Fix for an error with NoneType materials

Solves an error where an unallocated material slot caused a bug
This commit is contained in:
Alexander Kleemann 2021-03-10 20:48:46 +01:00
parent 7c56ee9304
commit 4009d9d3fe

View file

@ -373,8 +373,11 @@ def build():
if obj.type == "MESH":
for slot in obj.material_slots:
mat = slot.material
if mat.arm_ignore_irradiance:
ignoreIrr = True
if mat: #Check if not NoneType
if mat.arm_ignore_irradiance:
ignoreIrr = True
if ignoreIrr:
wrd.world_defs += '_IgnoreIrr'