From: Mikko Rasa Date: Mon, 12 Apr 2021 22:27:00 +0000 (+0300) Subject: Force the usage of normalmap as RGB data X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b5a249d7f4dbbbf91c970993eb0eb949797c5565;p=libs%2Fgl.git Force the usage of normalmap as RGB data --- diff --git a/blender/io_mspgl/material.py b/blender/io_mspgl/material.py index 93f17790..e69cab84 100644 --- a/blender/io_mspgl/material.py +++ b/blender/io_mspgl/material.py @@ -30,8 +30,10 @@ class MaterialProperty: 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"]) @@ -42,7 +44,9 @@ class MaterialProperty: 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'