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_materials_sheen.py')
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_sheen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_sheen.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_sheen.py
index 03625ecb..1d4fb5b9 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_sheen.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_materials_sheen.py
@@ -29,6 +29,8 @@ def export_sheen(blender_material, export_settings):
else:
# Factor
fac = gltf2_blender_get.get_factor_from_socket(sheenColor_socket, kind='RGB')
+ if fac is None:
+ fac = [1.0, 1.0, 1.0] # Default is 0.0/0.0/0.0, so we need to set it to 1 if no factor
if fac is not None and fac != [0.0, 0.0, 0.0]:
sheen_extension['sheenColorFactor'] = fac
@@ -51,6 +53,8 @@ def export_sheen(blender_material, export_settings):
else:
# Factor
fac = gltf2_blender_get.get_factor_from_socket(sheenRoughness_socket, kind='VALUE')
+ if fac is None:
+ fac = 1.0 # Default is 0.0 so we need to set it to 1.0 if no factor
if fac is not None and fac != 0.0:
sheen_extension['sheenRoughnessFactor'] = fac