Simple UV scrolling nodes in place. Simple approach will probably remain since the only interaction will be with image textures nodes
This commit is contained in:
parent
ea82d24356
commit
9a344d0652
|
@ -126,11 +126,14 @@ to provide an exact emulation"""
|
|||
|
||||
bsdf = material.node_tree.nodes.new("ShaderNodeBsdfPrincipled")
|
||||
|
||||
|
||||
texImage = material.node_tree.nodes.new('ShaderNodeTexImage')
|
||||
texImage.image = bpy.data.images.load(diffuse_texture_path)
|
||||
texImage.image.alpha_mode = 'CHANNEL_PACKED'
|
||||
material.node_tree.links.new(bsdf.inputs['Base Color'], texImage.outputs['Color'])
|
||||
|
||||
texture_input_nodes.append(texImage)
|
||||
|
||||
bsdf.inputs["Roughness"].default_value = 1.0
|
||||
bsdf.inputs["Specular"].default_value = 0.0
|
||||
|
||||
|
@ -174,6 +177,20 @@ to provide an exact emulation"""
|
|||
material.node_tree.links.new(output.inputs['Surface'], surfaces_output.outputs[0])
|
||||
|
||||
|
||||
if "SCROLL" in mat_props.rendertype:
|
||||
uv_input = material.node_tree.nodes.new("ShaderNodeUVMap")
|
||||
|
||||
vector_add = material.node_tree.nodes.new("ShaderNodeVectorMath")
|
||||
|
||||
material.node_tree.links.new(vector_add.inputs[0], uv_input.outputs[0])
|
||||
|
||||
for texture_node in texture_input_nodes:
|
||||
material.node_tree.links.new(texture_node.inputs["Vector"], vector_add.outputs[0])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'''
|
||||
else:
|
||||
|
||||
|
|
Loading…
Reference in New Issue