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:
authorOmarSquircleArt <omar.squircleart@gmail.com>2019-09-09 19:18:19 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-09 19:18:19 +0300
commit563f8717da3761dadebc071e1de318e2932bb1e6 (patch)
treedf29e8e0b81ad60d68c6f7552d76947e235f1479 /io_coat3D
parent14abe13dc890ba8fc7f78723ad67533ec2146aff (diff)
Fix T69664: Update add-ons for Mapping node changes.
The Mapping node was update to have dynamic inputs that can be linked. Moreover, the min and max options were removed entrily. This broke add-ons that used the Mapping node, so this patch fixes those add-ons. Reviewers: brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D5732
Diffstat (limited to 'io_coat3D')
-rw-r--r--io_coat3D/tex.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index ddae543c..2473cf47 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -562,18 +562,19 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
map_node.location = map_loc
map_node.name = '3DC_' + tile
map_node.vector_type = 'TEXTURE'
- map_node.use_min = True
- map_node.use_max = True
tile_int_x = int(tile[3])
tile_int_y = int(tile[2])
- map_node.min[0] = tile_int_x - 1
- map_node.max[0] = tile_int_x
-
- map_node.min[1] = tile_int_y
- map_node.max[1] = tile_int_y + 1
+ min_node = texture_tree.nodes.new('ShaderNodeVectorMath')
+ min_node.operation = "MINIMUM"
+ min_node.inputs[1].default_value[0] = tile_int_x - 1
+ min_node.inputs[1].default_value[1] = tile_int_y
+ max_node = texture_tree.nodes.new('ShaderNodeVectorMath')
+ max_node.operation = "MAXIMUM"
+ max_node.inputs[1].default_value[0] = tile_int_x
+ max_node.inputs[1].default_value[1] = tile_int_y + 1
if(index == 0):
nodes.append(tex_img_node.name)
@@ -624,7 +625,9 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
map_loc[1] -= 300
texture_tree.links.new(tex_uv_node.outputs[0], map_node.inputs[0])
- texture_tree.links.new(map_node.outputs[0], tex_img_node.inputs[0])
+ texture_tree.links.new(map_node.outputs[0], min_node.inputs[0])
+ texture_tree.links.new(min_node.outputs['Vector'], max_node.inputs[0])
+ texture_tree.links.new(max_node.outputs['Vector'], tex_img_node.inputs[0])
if(count > 1):
texture_tree.links.new(mix_node.outputs[0], notegroupend.inputs[0])