From b5a249d7f4dbbbf91c970993eb0eb949797c5565 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 13 Apr 2021 01:27:00 +0300 Subject: [PATCH] Force the usage of normalmap as RGB data --- blender/io_mspgl/material.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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' -- 2.45.2