Skip to content
Snippets Groups Projects
Commit f9537300 authored by Antonio Vazquez's avatar Antonio Vazquez
Browse files

Fix T73794: Archimesh error adding materials

Fix by @nacioss

Differential revision: https://developer.blender.org/D6917
parent 9920e00e
No related branches found
No related tags found
No related merge requests found
...@@ -333,10 +333,8 @@ def create_diffuse_material(matname, replace, r, g, b, rv=0.8, gv=0.8, bv=0.8, m ...@@ -333,10 +333,8 @@ def create_diffuse_material(matname, replace, r, g, b, rv=0.8, gv=0.8, bv=0.8, m
nodes = mat.node_tree.nodes nodes = mat.node_tree.nodes
# support for multilanguage # support for multilanguage
node = nodes[get_node_index(nodes, 'BSDF_DIFFUSE')] node = nodes.new('ShaderNodeBsdfDiffuse')
node.name = 'Diffuse BSDF' node.name = 'Diffuse BSDF'
node.label = 'Diffuse BSDF'
node.inputs[0].default_value = [r, g, b, 1] node.inputs[0].default_value = [r, g, b, 1]
node.location = 200, 320 node.location = 200, 320
...@@ -417,10 +415,8 @@ def create_translucent_material(matname, replace, r, g, b, rv=0.8, gv=0.8, bv=0. ...@@ -417,10 +415,8 @@ def create_translucent_material(matname, replace, r, g, b, rv=0.8, gv=0.8, bv=0.
nodes = mat.node_tree.nodes nodes = mat.node_tree.nodes
# support for multilanguage # support for multilanguage
node = nodes[get_node_index(nodes, 'BSDF_DIFFUSE')] node = nodes.new('ShaderNodeBsdfDiffuse')
node.name = 'Diffuse BSDF' node.name = 'Diffuse BSDF'
node.label = 'Diffuse BSDF'
node.inputs[0].default_value = [r, g, b, 1] node.inputs[0].default_value = [r, g, b, 1]
node.location = 200, 320 node.location = 200, 320
...@@ -500,7 +496,8 @@ def create_glass_material(matname, replace, rv=0.333, gv=0.342, bv=0.9): ...@@ -500,7 +496,8 @@ def create_glass_material(matname, replace, rv=0.333, gv=0.342, bv=0.9):
node.inputs[0].default_value = 0.1 node.inputs[0].default_value = 0.1
node.location = 690, 290 node.location = 690, 290
node = nodes[get_node_index(nodes, 'OUTPUT_MATERIAL')] node = nodes.new('ShaderNodeOutputMaterial')
node.name = 'OUTPUT_MATERIAL'
node.location = 920, 290 node.location = 920, 290
# Connect nodes # Connect nodes
...@@ -786,10 +783,8 @@ def create_fabric_material(matname, replace, r, g, b, rv=0.8, gv=0.636, bv=0.315 ...@@ -786,10 +783,8 @@ def create_fabric_material(matname, replace, r, g, b, rv=0.8, gv=0.636, bv=0.315
nodes = mat.node_tree.nodes nodes = mat.node_tree.nodes
# support for multilanguage # support for multilanguage
node = nodes[get_node_index(nodes, 'BSDF_DIFFUSE')] node = nodes.new('ShaderNodeBsdfDiffuse')
node.name = 'Diffuse BSDF' node.name = 'Diffuse BSDF'
node.label = 'Diffuse BSDF'
node.inputs[0].default_value = [r, g, b, 1] node.inputs[0].default_value = [r, g, b, 1]
node.location = 810, 270 node.location = 810, 270
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment