From 6013f95011393792e9e62981276bcbd0d62789a5 Mon Sep 17 00:00:00 2001 From: Vasyl-Pidhirskyi Date: Mon, 15 May 2023 18:42:11 +0300 Subject: [PATCH] Transmission color not working. --- materialx/bl_nodes/shader.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/materialx/bl_nodes/shader.py b/materialx/bl_nodes/shader.py index 6ab39ce68..da2e62603 100644 --- a/materialx/bl_nodes/shader.py +++ b/materialx/bl_nodes/shader.py @@ -9,10 +9,6 @@ from ..utils import get_mx_node_input_types from . import log -SSS_MIN_RADIUS = 0.0001 -DEFAULT_WHITE_COLOR = (1.0, 1.0, 1.0) - - def enabled(val): if val is None: return False @@ -108,7 +104,7 @@ class ShaderNodeBsdfPrincipled(NodeParser): if enabled(specular): result.set_inputs({ 'specular': specular, - 'specular_color': DEFAULT_WHITE_COLOR, + 'specular_color': base_color, 'specular_roughness': roughness, 'specular_IOR': ior, 'specular_anisotropy': anisotropic, @@ -118,7 +114,7 @@ class ShaderNodeBsdfPrincipled(NodeParser): if enabled(transmission): result.set_inputs({ 'transmission': transmission, - 'transmission_color': DEFAULT_WHITE_COLOR, + 'transmission_color': base_color, 'transmission_extra_roughness': transmission_roughness, }) @@ -133,14 +129,14 @@ class ShaderNodeBsdfPrincipled(NodeParser): if enabled(sheen): result.set_inputs({ 'sheen': sheen, - 'sheen_color': DEFAULT_WHITE_COLOR, + 'sheen_color': base_color, 'sheen_roughness': roughness, }) if enabled(clearcoat): result.set_inputs({ 'coat': clearcoat, - 'coat_color': DEFAULT_WHITE_COLOR, + 'coat_color': base_color, 'coat_roughness': clearcoat_roughness, 'coat_IOR': ior, 'coat_anisotropy': anisotropic, -- 2.30.2