def set_alpha_test_flavor(node_tree, switch_on): """Set alpha test flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if alpha test should be switched on or off :type switch_on: bool """ if switch_on: alpha_test.init(node_tree) else: alpha_test.delete(node_tree)
def set_alpha_test_flavor(node_tree, switch_on): """Set alpha test flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if alpha test should be switched on or off :type switch_on: bool """ if switch_on and not blend_over.is_set(node_tree): out_node = node_tree.nodes[DifSpecMultDifSpec.OUT_MAT_NODE] in_node = node_tree.nodes[DifSpecMultDifSpec.VCOL_GROUP_NODE] location = (out_node.location.x - 185 * 2, out_node.location.y - 500) alpha_test.init(node_tree, location, in_node.outputs['Vertex Color Alpha'], out_node.inputs['Alpha']) else: alpha_test.delete(node_tree)
def set_alpha_test_flavor(node_tree, switch_on): """Set alpha test flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if alpha test should be switched on or off :type switch_on: bool """ if switch_on: out_node = node_tree.nodes[Dif.OUT_MAT_NODE] in_node = node_tree.nodes[Dif.BASE_TEX_NODE] location = (out_node.location.x - 185 * 2, out_node.location.y - 500) alpha_test.init(node_tree, location, in_node.outputs['Value'], out_node.inputs['Alpha']) else: alpha_test.delete(node_tree)
def set_alpha_test_flavor(node_tree, switch_on): """Set alpha test flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if alpha test should be switched on or off :type switch_on: bool """ if switch_on and not blend_over.is_set(node_tree): out_node = node_tree.nodes[UnlitVcolTex.OUTPUT_NODE] in_node = node_tree.nodes[UnlitVcolTex.OPACITY_NODE] location = (out_node.location.x - 185 * 2, out_node.location.y - 500) alpha_test.init(node_tree, location, in_node.outputs["Value"], out_node.inputs["Alpha"]) else: alpha_test.delete(node_tree)
def set_alpha_test_flavor(node_tree, switch_on): """Set alpha test flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if alpha test should be switched on or off :type switch_on: bool """ if switch_on and not blend_over.is_set(node_tree): out_node = node_tree.nodes[Dif.OUT_MAT_NODE] in_node = node_tree.nodes[Dif.BASE_TEX_NODE] location = (out_node.location.x - 185 * 2, out_node.location.y - 500) alpha_test.init(node_tree, location, in_node.outputs['Value'], out_node.inputs['Alpha']) else: alpha_test.delete(node_tree)