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:
authorKalle-Samuli Riihikoski <haikalle@gmail.com>2019-03-13 14:40:42 +0300
committerKalle-Samuli Riihikoski <haikalle@gmail.com>2019-03-13 14:40:42 +0300
commite9aee3ac28e0f7c15b35b2fdf410c1e2c19057eb (patch)
treec2841186f059c6c071ff47102ffa087a620a3fd6 /io_coat3D
parente7357657c0032f80a4a8c574bdd6d4fdc4ca9b0b (diff)
alpha node bux fixed.
Diffstat (limited to 'io_coat3D')
-rw-r--r--io_coat3D/tex.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index b7e1f1b1..48908606 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -502,7 +502,7 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
texture_tree.links.new(tex_img_node.outputs[0], notegroupend.inputs[0])
texture_tree.links.new(tex_img_node.outputs[1], notegroupend.inputs[1])
- if(index > 0):
+ if(index == 1):
mix_node = texture_tree.nodes.new('ShaderNodeMixRGB')
mix_node.blend_type = 'ADD'
mix_node.inputs[0].default_value = 1
@@ -510,15 +510,13 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
mix_loc[1] -= 300
texture_tree.links.new(tex_img_node.outputs[0], mix_node.inputs[2])
texture_tree.links.new(texture_tree.nodes[nodes[0]].outputs[0], mix_node.inputs[1])
-
- mix_node_alpha = texture_tree.nodes.new('ShaderNodeMixRGB')
- mix_node_alpha.blend_type = 'ADD'
- mix_node_alpha.inputs[0].default_value = 1
+ mix_node_alpha = texture_tree.nodes.new('ShaderNodeMath')
mix_node_alpha.location = mix_loc
mix_loc[1] -= 200
- texture_tree.links.new(tex_img_node.outputs[1], mix_node_alpha.inputs[2])
- texture_tree.links.new(texture_tree.nodes[nodes[0]].outputs[0], mix_node_alpha.inputs[1])
+ texture_tree.links.new(tex_img_node.outputs[1], mix_node_alpha.inputs[1])
+ texture_tree.links.new(texture_tree.nodes[nodes[0]].outputs[1], mix_node_alpha.inputs[0])
nodes.clear()
+ nodes.append(tex_img_node.name)
nodes.append(mix_node.name)
nodes.append(mix_node_alpha.name)
@@ -529,20 +527,18 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
mix_node.inputs[0].default_value = 1
mix_node.location = mix_loc
mix_loc[1] -= 300
- texture_tree.links.new(texture_tree.nodes[nodes[0]].outputs[0], mix_node.inputs[1])
+ texture_tree.links.new(texture_tree.nodes[nodes[1]].outputs[0], mix_node.inputs[1])
texture_tree.links.new(tex_img_node.outputs[0], mix_node.inputs[2])
-
- mix_node_alpha = texture_tree.nodes.new('ShaderNodeMixRGB')
- mix_node_alpha.blend_type = 'ADD'
- mix_node_alpha.inputs[0].default_value = 1
+ mix_node_alpha = texture_tree.nodes.new('ShaderNodeMath')
mix_node_alpha.location = mix_loc
mix_loc[1] -= 200
- texture_tree.links.new(texture_tree.nodes[nodes[0]].outputs[1], mix_node_alpha.inputs[1])
- texture_tree.links.new(tex_img_node.outputs[1], mix_node_alpha.inputs[2])
+ texture_tree.links.new(texture_tree.nodes[nodes[2]].outputs[0], mix_node_alpha.inputs[0])
+ texture_tree.links.new(tex_img_node.outputs[1], mix_node_alpha.inputs[1])
nodes.clear()
nodes.append(tex_img_node.name)
nodes.append(mix_node.name)
+ nodes.append(mix_node_alpha.name)
tex_loc[1] -= 300
uv_loc[1] -= 300