diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-09-16 18:55:40 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-09-17 16:23:03 +0300 |
commit | d7d2bad09f8c04d3e86081481fc700ae3c834800 (patch) | |
tree | 7386d0282069b9e4a598f31f3074da7fce18af58 /io_scene_gltf2/blender | |
parent | 8e1b4dd71b376c46d28dcce41e46c734cc58b559 (diff) |
glTF exporter: ignore muted node when checking tree
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_get.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py index 27f4ae18..71eb4a2c 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py @@ -59,7 +59,7 @@ def get_socket(blender_material: bpy.types.Material, name: str): # because the newer one is always present in all Principled BSDF materials. type = bpy.types.ShaderNodeEmission name = "Color" - nodes = [n for n in blender_material.node_tree.nodes if isinstance(n, type)] + nodes = [n for n in blender_material.node_tree.nodes if isinstance(n, type) and not n.mute] inputs = sum([[input for input in node.inputs if input.name == name] for node in nodes], []) if inputs: return inputs[0] @@ -71,7 +71,7 @@ def get_socket(blender_material: bpy.types.Material, name: str): name = "Color" else: type = bpy.types.ShaderNodeBsdfPrincipled - nodes = [n for n in blender_material.node_tree.nodes if isinstance(n, type)] + nodes = [n for n in blender_material.node_tree.nodes if isinstance(n, type) and not n.mute] inputs = sum([[input for input in node.inputs if input.name == name] for node in nodes], []) if inputs: return inputs[0] |