diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index f85502f9a41c78971a9bc99f75038e3353e7bdf2..9ce2d9da5d7e941a5420e78bf7d789d93bb676d3 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (0, 9, 36), + "version": (0, 9, 37), 'blender': (2, 80, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', @@ -595,3 +595,4 @@ def unregister(): # remove from the export / import menu bpy.types.TOPBAR_MT_file_export.remove(menu_func_export) bpy.types.TOPBAR_MT_file_import.remove(menu_func_import) + diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py index 03692f7bb8081cafda8cd5756e54e66ca77c24d6..a2480787ef8657c9739736489f3f2735b564d040 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_normal_texture_info_class.py @@ -38,6 +38,9 @@ def gather_material_normal_texture_info_class(blender_shader_sockets_or_texture_ tex_coord=__gather_tex_coord(blender_shader_sockets_or_texture_slots, export_settings) ) + if texture_info.index is None: + return None + return texture_info @@ -135,5 +138,7 @@ def __get_tex_from_socket(socket): gltf2_blender_search_node_tree.FilterByType(bpy.types.ShaderNodeTexImage)) if not result: return None + if result[0].shader_node.image is None: + return None return result[0] diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py index c9c70e420f0dc39076f8bdbf2148eb5f5064fe6a..6fb543c0c96c888912620b8794a6e4f7ec479c48 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_material_occlusion_texture_info_class.py @@ -35,6 +35,9 @@ def gather_material_occlusion_texture_info_class(blender_shader_sockets_or_textu tex_coord=__gather_tex_coord(blender_shader_sockets_or_texture_slots, export_settings) ) + if texture_info.index is None: + return None + return texture_info @@ -109,5 +112,7 @@ def __get_tex_from_socket(socket): gltf2_blender_search_node_tree.FilterByType(bpy.types.ShaderNodeTexImage)) if not result: return None + if result[0].shader_node.image is None: + return None return result[0] diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py index 9a30f238cc025e12789c5213ea297223eeb723a8..9a7130626016a1f0f72862ad403ba4df5f8c5afe 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py @@ -132,5 +132,7 @@ def __get_tex_from_socket(socket): gltf2_blender_search_node_tree.FilterByType(bpy.types.ShaderNodeTexImage)) if not result: return None + if result[0].shader_node.image is None: + return None return result[0]