From e5b860f51bfb62d402739d98445ce9d0c9e355cd Mon Sep 17 00:00:00 2001 From: SleepKiller Date: Thu, 21 Nov 2019 23:24:26 +1300 Subject: [PATCH] fix error when no material is selected --- addons/io_scene_swbf_msh/msh_material_properties.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/io_scene_swbf_msh/msh_material_properties.py b/addons/io_scene_swbf_msh/msh_material_properties.py index 03eec4b..97c7313 100644 --- a/addons/io_scene_swbf_msh/msh_material_properties.py +++ b/addons/io_scene_swbf_msh/msh_material_properties.py @@ -191,6 +191,9 @@ class MaterialPropertiesPanel(bpy.types.Panel): bl_context = "material" def draw(self, context): + if context.material is None: + return + layout = self.layout material_props = context.material.swbf_msh