Export_3ds: Fixed crash if no principled bsdf shader present #105207

Merged
Sebastian Sille merged 1 commits from nrgsille-io_scene_3ds into blender-v4.1-release 2024-03-03 11:19:57 +01:00
Showing only changes of commit 846c8de63b - Show all commits

View File

@ -713,6 +713,7 @@ def make_material_chunk(material, image):
material_chunk.add_subchunk(make_percent_subchunk(MATTRANS, 1 - wrap.alpha))
material_chunk.add_subchunk(make_percent_subchunk(MATXPFALL, wrap.transmission))
material_chunk.add_subchunk(make_percent_subchunk(MATSELFILPCT, wrap.emission_strength))
if wrap.node_principled_bsdf is not None:
material_chunk.add_subchunk(make_percent_subchunk(MATREFBLUR, wrap.node_principled_bsdf.inputs['Coat Weight'].default_value))
material_chunk.add_subchunk(shading)