def set_blend_over_flavor(node_tree, switch_on): """Set blend over flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if blend over should be switched on or off :type switch_on: bool """ if switch_on: blend_over.init(node_tree) else: blend_over.delete(node_tree)
def set_retroreflective_decal_flavor(node_tree, switch_on): """Set depth retroreflective decal flavor to this shader. NOTE: this is essentially same flavor as blend_over, thus just use blend over internally :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if retroreflective decal should be switched on or off :type switch_on: bool """ if switch_on: blend_over.init(node_tree) else: blend_over.delete(node_tree)
def set_blend_over_flavor(node_tree, switch_on): """Set blend over flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if blend over should be switched on or off :type switch_on: bool """ out_node = node_tree.nodes[Sky.OUTPUT_NODE] in_node = node_tree.nodes[Sky.BASE_OVER_A_MIX_NODE] if switch_on: blend_over.init(node_tree, in_node.outputs['Color'], out_node.inputs['Alpha']) else: blend_over.delete(node_tree)
def set_retroreflective_decal_flavor(node_tree, switch_on): """Set depth retroreflective decal flavor to this shader. NOTE: this is essentially same flavor as blend_over, thus just use blend over internally :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if retroreflective decal should be switched on or off :type switch_on: bool """ # remove alpha test flavor if it was set already. Because these two can not coexist out_mat_node = node_tree.nodes[Dif.OUT_MAT_NODE] opacity_n = node_tree.nodes[Dif.OPACITY_NODE] if switch_on: blend_over.init(node_tree, opacity_n.outputs['Value'], out_mat_node.inputs['Alpha']) else: blend_over.delete(node_tree)
def set_blend_over_flavor(node_tree, switch_on): """Set blend over flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if blend over should be switched on or off :type switch_on: bool """ # remove alpha test flavor if it was set already. Because these two can not coexist if alpha_test.is_set(node_tree): DifSpecMultDifSpec.set_alpha_test_flavor(node_tree, False) out_node = node_tree.nodes[DifSpecMultDifSpec.OUT_MAT_NODE] in_node = node_tree.nodes[DifSpecMultDifSpec.VCOL_GROUP_NODE] if switch_on: blend_over.init(node_tree, in_node.outputs['Vertex Color Alpha'], out_node.inputs['Alpha']) else: blend_over.delete(node_tree)
def set_blend_over_flavor(node_tree, switch_on): """Set blend over flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if blend over should be switched on or off :type switch_on: bool """ # remove alpha test flavor if it was set already. Because these two can not coexist if alpha_test.is_set(node_tree): UnlitTex.set_alpha_test_flavor(node_tree, False) if switch_on: out_node = node_tree.nodes[UnlitTex.OUTPUT_NODE] in_node = node_tree.nodes[UnlitTex.BASE_TEX_NODE] blend_over.init(node_tree, in_node.outputs['Value'], out_node.inputs['Alpha']) else: blend_over.delete(node_tree)
def set_blend_over_flavor(node_tree, switch_on): """Set blend over flavor to this shader. :param node_tree: node tree of current shader :type node_tree: bpy.types.NodeTree :param switch_on: flag indication if blend over should be switched on or off :type switch_on: bool """ # remove alpha test flavor if it was set already. Because these two can not coexist if alpha_test.is_set(node_tree): Dif.set_alpha_test_flavor(node_tree, False) out_node = node_tree.nodes[Dif.OUT_MAT_NODE] in_node = node_tree.nodes[Dif.BASE_TEX_NODE] if switch_on: blend_over.init(node_tree, in_node.outputs['Value'], out_node.inputs['Alpha']) else: blend_over.delete(node_tree)