Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_image.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
index 69900c1b..81e79a50 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py
@@ -188,7 +188,7 @@ def __get_image_data(sockets, export_settings) -> ExportImage:
results = [__get_tex_from_socket(socket, export_settings) for socket in sockets]
# Check if we need a simple mapping or more complex calculation
- if any([socket.name == "Specular" for socket in sockets]):
+ if any([socket.name == "Specular" and socket.node.type == "BSDF_PRINCIPLED" for socket in sockets]):
return __get_image_data_specular(sockets, results, export_settings)
else:
return __get_image_data_mapping(sockets, results, export_settings)
@@ -238,7 +238,7 @@ def __get_image_data_mapping(sockets, results, export_settings) -> ExportImage:
dst_chan = Channel.G
elif socket.name == 'Thickness': # For KHR_materials_volume
dst_chan = Channel.G
- elif socket.name == "specular glTF": # For original KHR_material_specular
+ elif socket.name == "Specular": # For original KHR_material_specular
dst_chan = Channel.A
elif socket.name == "Sigma": # For KHR_materials_sheen
dst_chan = Channel.A