diff --git a/scripts/addons_core/io_scene_gltf2/__init__.py b/scripts/addons_core/io_scene_gltf2/__init__.py index 9e057c8cdd9..f96a7b85c49 100755 --- a/scripts/addons_core/io_scene_gltf2/__init__.py +++ b/scripts/addons_core/io_scene_gltf2/__init__.py @@ -7,7 +7,7 @@ bl_info = { # This is now displayed as the maintainer, so show the foundation. # "author": "Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein", # Original Authors 'author': "Blender Foundation, Khronos Group", - "version": (5, 0, 20), + "version": (5, 0, 21), 'blender': (4, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/scripts/addons_core/io_scene_gltf2/blender/imp/material.py b/scripts/addons_core/io_scene_gltf2/blender/imp/material.py index 9e92750db46..973f6fbb816 100644 --- a/scripts/addons_core/io_scene_gltf2/blender/imp/material.py +++ b/scripts/addons_core/io_scene_gltf2/blender/imp/material.py @@ -23,7 +23,7 @@ class BlenderMaterial(): if material_idx is None: # If no material is specified, we create a default one mat = bpy.data.materials.new(name="DefaultMaterial") - # Since Blender 5.0, no need to remove default nodes, as they are not created by default + mat.node_tree.nodes.clear() output_node = mat.node_tree.nodes.new(type='ShaderNodeOutputMaterial') output_node.location = (0, 0) shader_node = mat.node_tree.nodes.new(type='ShaderNodeBsdfPrincipled') @@ -53,7 +53,7 @@ class BlenderMaterial(): BlenderMaterial.set_eevee_surface_render_method(pymaterial, mat) BlenderMaterial.set_viewport_color(pymaterial, mat, vertex_color) - # Since Blender 5.0, no need to remove default nodes, as they are not created by default + mat.node_tree.nodes.clear() mh = MaterialHelper(gltf, pymaterial, mat, vertex_color)