from_node, _ = get_linked_node_and_socket(node_tree, input_socket)
alpha_from = None
if from_node:
+ usage = None
if from_node.type=='NORMAL_MAP':
from_node, _ = get_linked_node_and_socket(node_tree, from_node.inputs["Color"])
+ usage = 'RGB'
elif from_node.type=='RGBTOBW':
from_node, _ = get_linked_node_and_socket(node_tree, from_node.inputs["Color"])
if from_node.type=='TEX_IMAGE':
self.texture = from_node
- if alpha_from:
+ if usage:
+ self.tex_usage = usage
+ elif alpha_from:
self.tex_usage = 'RGBA'
elif type(self.value)==tuple:
self.tex_usage = 'RGB'