Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def append_vec_math_node(nodes, operation='NORMALIZE', name=None, a_name='A', b_name='B', output_a_name='Vector', output_b_name='Fac', a_default=(0.57735, 0.57735, 0.57735), b_default=(0.57735, 0.57735, 0.57735), parent=None, custom_color=None):
- vec_math = nodes.new('ShaderNodeVectorMath')
- vec_math.operation = operation
- vec_math.parent = parent
- if name:
- vec_math.label = vec_math.name = name
- else:
- vec_math.label = vec_math.name = operation.replace('_', ' ').capitalize()
- if custom_color:
- vec_math.use_custom_color = True
- vec_math.color = custom_color
- vec_math.inputs[0].name = a_name
- vec_math.inputs[0].default_value = a_default
- vec_math.inputs[1].name = b_name
- vec_math.inputs[1].default_value = b_default
- vec_math.outputs[0].name = output_a_name
- vec_math.outputs[1].name = output_b_name
- return vec_math
Add Comment
Please, Sign In to add comment