Merge branch 'blender2.81'

This commit is contained in:
Luke Street 2019-12-22 18:32:55 -05:00
commit 56c3221733
2 changed files with 50 additions and 53 deletions

View File

@ -736,10 +736,8 @@ def make_uva0():
uv_scale = new_grp.nodes.new('ShaderNodeMapping')
uv_scale.location = (400, -400)
uv_scale.vector_type = 'TEXTURE'
uv_scale.scale[0] = 2.0
uv_scale.scale[1] = 2.0
uv_scale.translation[0] = 1.0
uv_scale.translation[1] = 1.0
uv_scale.inputs['Scale'].default_value = (2.0, 2.0, 0.0)
uv_scale.inputs['Location'].default_value = (1.0, 1.0, 0.0)
# Links
new_grp.links.new(grp_in.outputs[0], vec_xf.inputs[0])
@ -784,8 +782,7 @@ def make_uva2():
# Mapping
mapping = new_grp.nodes.new('ShaderNodeMapping')
mapping.location = (-235, 125)
drvs = mapping.driver_add('scale')
for drv in drvs:
for drv in mapping.inputs['Scale'].driver_add('default_value'):
drv.driver.expression = 'frame/60'
# Adder1
@ -888,7 +885,7 @@ def make_uva4():
# Mapping
map1 = new_grp.nodes.new('ShaderNodeMapping')
map1.scale = (1.0, 0.0, 0.0)
map1.inputs['Scale'].default_value = (1.0, 0.0, 0.0)
map1.location = (200, 0)
# Add
@ -973,7 +970,7 @@ def make_uva5():
# Mapping
map1 = new_grp.nodes.new('ShaderNodeMapping')
map1.scale = (0.0, 1.0, 0.0)
map1.inputs['Scale'].default_value = (0.0, 1.0, 0.0)
map1.location = (200, 0)
# Add
@ -1065,7 +1062,7 @@ def make_uva7():
view_flip = new_grp.nodes.new('ShaderNodeMapping')
view_flip.location = (-800, -150)
view_flip.vector_type = 'TEXTURE'
view_flip.scale = (-1.0, -1.0, 1.0)
view_flip.inputs['Scale'].default_value = (-1.0, -1.0, 1.0)
# Separate
sep1 = new_grp.nodes.new('ShaderNodeSeparateRGB')

View File

@ -562,7 +562,7 @@ void FinishBlenderMesh(hecl::blender::PyOutStream& os, unsigned matSetCount, int
" present_mats.add(poly.material_index)\n"
"for mat_idx in reversed(range(len(mesh.materials))):\n"
" if mat_idx not in present_mats:\n"
" mesh.materials.pop(index=mat_idx, update_data=True)\n"
" mesh.materials.pop(index=mat_idx)\n"
"\n"
"mesh.update()\n"
"\n";