mirror of https://github.com/AxioDL/metaforce.git
Blender 2.81 support
This commit is contained in:
parent
6233179de7
commit
cce11d3cd9
|
@ -736,10 +736,8 @@ def make_uva0():
|
||||||
uv_scale = new_grp.nodes.new('ShaderNodeMapping')
|
uv_scale = new_grp.nodes.new('ShaderNodeMapping')
|
||||||
uv_scale.location = (400, -400)
|
uv_scale.location = (400, -400)
|
||||||
uv_scale.vector_type = 'TEXTURE'
|
uv_scale.vector_type = 'TEXTURE'
|
||||||
uv_scale.scale[0] = 2.0
|
uv_scale.inputs['Scale'].default_value = (2.0, 2.0, 0.0)
|
||||||
uv_scale.scale[1] = 2.0
|
uv_scale.inputs['Location'].default_value = (1.0, 1.0, 0.0)
|
||||||
uv_scale.translation[0] = 1.0
|
|
||||||
uv_scale.translation[1] = 1.0
|
|
||||||
|
|
||||||
# Links
|
# Links
|
||||||
new_grp.links.new(grp_in.outputs[0], vec_xf.inputs[0])
|
new_grp.links.new(grp_in.outputs[0], vec_xf.inputs[0])
|
||||||
|
@ -784,8 +782,7 @@ def make_uva2():
|
||||||
# Mapping
|
# Mapping
|
||||||
mapping = new_grp.nodes.new('ShaderNodeMapping')
|
mapping = new_grp.nodes.new('ShaderNodeMapping')
|
||||||
mapping.location = (-235, 125)
|
mapping.location = (-235, 125)
|
||||||
drvs = mapping.driver_add('scale')
|
for drv in mapping.inputs['Scale'].driver_add('default_value'):
|
||||||
for drv in drvs:
|
|
||||||
drv.driver.expression = 'frame/60'
|
drv.driver.expression = 'frame/60'
|
||||||
|
|
||||||
# Adder1
|
# Adder1
|
||||||
|
@ -888,7 +885,7 @@ def make_uva4():
|
||||||
|
|
||||||
# Mapping
|
# Mapping
|
||||||
map1 = new_grp.nodes.new('ShaderNodeMapping')
|
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)
|
map1.location = (200, 0)
|
||||||
|
|
||||||
# Add
|
# Add
|
||||||
|
@ -973,7 +970,7 @@ def make_uva5():
|
||||||
|
|
||||||
# Mapping
|
# Mapping
|
||||||
map1 = new_grp.nodes.new('ShaderNodeMapping')
|
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)
|
map1.location = (200, 0)
|
||||||
|
|
||||||
# Add
|
# Add
|
||||||
|
@ -1065,7 +1062,7 @@ def make_uva7():
|
||||||
view_flip = new_grp.nodes.new('ShaderNodeMapping')
|
view_flip = new_grp.nodes.new('ShaderNodeMapping')
|
||||||
view_flip.location = (-800, -150)
|
view_flip.location = (-800, -150)
|
||||||
view_flip.vector_type = 'TEXTURE'
|
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
|
# Separate
|
||||||
sep1 = new_grp.nodes.new('ShaderNodeSeparateRGB')
|
sep1 = new_grp.nodes.new('ShaderNodeSeparateRGB')
|
||||||
|
|
|
@ -562,7 +562,7 @@ void FinishBlenderMesh(hecl::blender::PyOutStream& os, unsigned matSetCount, int
|
||||||
" present_mats.add(poly.material_index)\n"
|
" present_mats.add(poly.material_index)\n"
|
||||||
"for mat_idx in reversed(range(len(mesh.materials))):\n"
|
"for mat_idx in reversed(range(len(mesh.materials))):\n"
|
||||||
" if mat_idx not in present_mats:\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"
|
"\n"
|
||||||
"mesh.update()\n"
|
"mesh.update()\n"
|
||||||
"\n";
|
"\n";
|
||||||
|
|
Loading…
Reference in New Issue