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-07-30 14:26:34 +0300
committerKalle-Samuli Riihikoski <haikalle@gmail.com>2019-07-30 14:26:56 +0300
commit87e00386cf191674a42d320a4cbe18ddae2a94e0 (patch)
tree824cc39aeb0244951a82352ddd953f098320f60e /io_coat3D/tex.py
parent27381001d7b9332eb669f1023f14b40d1f15f962 (diff)
io_coat3D: Improve alpha textures
Diffstat (limited to 'io_coat3D/tex.py')
-rw-r--r--io_coat3D/tex.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index 685eab9c..75d50e72 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -347,7 +347,6 @@ def readtexturefolder(objekti, mat_list, texturelist, is_new, udim_textures): #r
coat3D.remove_path = True
createnodes(index_mat, texcoat, create_group_node, tile_list, objekti, ind, is_new)
-
def createnodes(active_mat,texcoat, create_group_node, tile_list, objekti, ind, is_new): # Cretes new nodes and link textures into them
bring_color = True # Meaning of these is to check if we can only update textures or do we need to create new nodes
bring_metalness = True
@@ -717,15 +716,19 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
else:
if (texcoat['alpha'] != []):
- if (type['name'] == 'color'):
+ if (type['name'] == 'alpha'):
act_material.links.new(node.outputs[1], notegroup.inputs[8])
else:
if (type['name'] == 'color'):
act_material.links.new(node.outputs[1], notegroup.inputs[8])
+ if(type['name'] != 'alpha'):
+ huenode = createExtraNodes(act_material, node, type)
+ else:
+ huenode = node
+ huenode.location = -100, -800
- huenode = createExtraNodes(act_material, node, type)
-
- act_material.links.new(huenode.outputs[0], notegroup.inputs[type['input']])
+ if(type['name'] != 'alpha'):
+ act_material.links.new(huenode.outputs[0], notegroup.inputs[type['input']])
if (main_mat.type != 'MIX_SHADER' and input_color != -1):
main_material.links.new(applink_tree.outputs[type['input']], main_mat.inputs[input_color])
if(type['name'] == 'color'): #Alpha connection into Principled shader