@@ -82,7 +82,7 @@ def create_material_passes( mat, n=8, textures=True ):
82
82
r = []
83
83
x = 680
84
84
for i in range ( n ):
85
- node = tree .nodes .new ( type = 'MATERIAL_EXT ' )
85
+ node = tree .nodes .new ( type = 'ShaderNodeExtendedMaterial ' )
86
86
node .name = 'GEN.%s' % i
87
87
node .location .x = x ; node .location .y = 640
88
88
r .append ( node )
@@ -100,18 +100,18 @@ def create_texture_nodes( mat, n=6, geoms=True ):
100
100
for i ,m in enumerate (mats ):
101
101
r ['material' ] = m ; r ['textures' ] = []; r ['geoms' ] = []
102
102
inputs = [] # other inputs mess up material preview #
103
- for tag in ['Mirror' , 'Ambient' , 'Emit' , 'SpecTra' , 'Ray Mirror ' , 'Translucency' ]:
103
+ for tag in ['Mirror' , 'Ambient' , 'Emit' , 'SpecTra' , 'Reflectivity ' , 'Translucency' ]:
104
104
inputs .append ( m .inputs [ tag ] )
105
105
for j in range (n ):
106
- tex = mat .node_tree .nodes .new ( type = 'TEXTURE ' )
106
+ tex = mat .node_tree .nodes .new ( type = 'ShaderNodeTexture ' )
107
107
tex .name = 'TEX.%s.%s' % (j , m .name )
108
108
tex .location .x = x - (j * 16 )
109
109
tex .location .y = - (j * 230 )
110
110
input = inputs [j ]; output = tex .outputs ['Color' ]
111
111
link = mat .node_tree .links .new ( input , output )
112
112
r ['textures' ].append ( tex )
113
113
if geoms :
114
- geo = mat .node_tree .nodes .new ( type = 'GEOMETRY ' )
114
+ geo = mat .node_tree .nodes .new ( type = 'ShaderNodeGeometry ' )
115
115
link = mat .node_tree .links .new ( tex .inputs ['Vector' ], geo .outputs ['UV' ] )
116
116
geo .location .x = x - (j * 16 ) - 250
117
117
geo .location .y = - (j * 250 ) - 1500
0 commit comments