Fix for an error with NoneType materials
Solves an error where an unallocated material slot caused a bug
This commit is contained in:
parent
7c56ee9304
commit
4009d9d3fe
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue