+def get_unlit_inputs(node_tree, node):
+ if node.type=='GROUP':
+ return check_group(node_tree, node, get_unlit_inputs)
+ elif node.type=='MIX_SHADER':
+ from .util import get_linked_node_and_socket
+
+ shader1, _ = get_linked_node_and_socket(node_tree, node.inputs[1])
+ shader2, _ = get_linked_node_and_socket(node_tree, node.inputs[2])
+ if shader1.type=='BSDF_TRANSPARENT' and shader2.type=='EMISSION':
+ factor_input = node.inputs["Fac"]
+ factor_from, _ = get_linked_node_and_socket(node_tree, factor_input)
+ color_input = shader2.inputs["Color"]
+ color_from, _ = get_linked_node_and_socket(node_tree, color_input)
+ if factor_from==color_from:
+ return (color_input, factor_input)
+ elif node.type=='EMISSION':
+ return (node.inputs["Color"], None)
+ return (None, None)
+