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:
authormeta-androcto <meta.androcto1@gmail.com>2016-08-12 10:28:16 +0300
committermeta-androcto <meta.androcto1@gmail.com>2016-08-12 10:28:16 +0300
commit339ebe682f188601186da485507b80d8de55fed8 (patch)
treec19fa8d70a56ab03ccc9d3afaa39367c3590f0bf /materials_utils
parent840f04f1addce56c0449451091df1c90f6bbbaef (diff)
materials utils, Fix for node trees
Diffstat (limited to 'materials_utils')
-rw-r--r--materials_utils/materials_cycles_converter.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/materials_utils/materials_cycles_converter.py b/materials_utils/materials_cycles_converter.py
index 600de7e2..838c5558 100644
--- a/materials_utils/materials_cycles_converter.py
+++ b/materials_utils/materials_cycles_converter.py
@@ -241,6 +241,8 @@ def AutoNode(active=False, operator=None):
TreeNodes.nodes.remove(n)
# Starting point is diffuse BSDF and output material
+ shader = TreeNodes.nodes.new('ShaderNodeValToRGB')
+ shader.location = 0, 270
shader = TreeNodes.nodes.new('ShaderNodeBsdfDiffuse')
shader.location = 0, 470
shout = TreeNodes.nodes.new('ShaderNodeOutputMaterial')
@@ -447,8 +449,15 @@ def AutoNode(active=False, operator=None):
if sT:
if tex.use_map_color_diffuse:
+ coordout = 2
+ map = TreeNodes.nodes.new('ShaderNodeMapping')
+ map.location = -500, 570
+ map.width = 240
+ coord = TreeNodes.nodes.new('ShaderNodeTexCoord')
+ coord.location = -800, 570
links.new(shtext.outputs[0], shader.inputs[0])
-
+ links.new(map.outputs[0], shtext.inputs[0])
+ links.new(coord.outputs[coordout], map.inputs[0])
if tex.use_map_emit:
if not Add_Emission:
collect_report("INFO: Mix EMISSION + Texture shader node for: " + cmat.name)
@@ -565,7 +574,7 @@ def AutoNode(active=False, operator=None):
t = TreeNodes.nodes.new('ShaderNodeRGBToBW')
t.location = -0, 300
links.new(t.outputs[0], shout.inputs[2])
- links.new(shtext.outputs[0], t.inputs[0])
+ links.new(shtext.outputs[1], t.inputs[0])
else:
collect_report("No textures in the Scene, no Image Nodes to add")