From 846c8de63b0df64e7d026901f320c708acd47984 Mon Sep 17 00:00:00 2001 From: Sebastian Sille Date: Sun, 3 Mar 2024 10:53:22 +0100 Subject: [PATCH] Export_3ds: Fixed crash if no principled bsdf shader present The exporter crashed when there is no principled bsdf shader in material, this is fixed now --- io_scene_3ds/export_3ds.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py index 46f541b6a..3ab9f723e 100644 --- a/io_scene_3ds/export_3ds.py +++ b/io_scene_3ds/export_3ds.py @@ -713,7 +713,8 @@ 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)) - material_chunk.add_subchunk(make_percent_subchunk(MATREFBLUR, wrap.node_principled_bsdf.inputs['Coat Weight'].default_value)) + 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) primary_tex = False -- 2.30.2