Fix T61017: node_shader_utils did not handle diffuse_color correctly
authorJacques Lucke <mail@jlucke.com>
Wed, 30 Jan 2019 13:37:09 +0000 (14:37 +0100)
committerJacques Lucke <mail@jlucke.com>
Wed, 30 Jan 2019 13:37:09 +0000 (14:37 +0100)
release/scripts/modules/bpy_extras/node_shader_utils.py

index 67dfe92152e91a3aaa78442d9a2d4f2390017ae8..83cf94bd147586d69e83bdb0b8b521e7a0d8ee2a 100644 (file)
@@ -268,9 +268,10 @@ class PrincipledBSDFWrapper(ShaderWrapper):
 
     @_set_check
     def base_color_set(self, color):
+        color = rgb_to_rgba(color)
         self.material.diffuse_color = color
         if self.use_nodes and self.node_principled_bsdf is not None:
-            self.node_principled_bsdf.inputs["Base Color"].default_value = rgb_to_rgba(color)
+            self.node_principled_bsdf.inputs["Base Color"].default_value = color
 
     base_color = property(base_color_get, base_color_set)