From: Mikko Rasa Date: Wed, 31 Jul 2024 21:50:02 +0000 (+0300) Subject: Fix for material export with certain unusual emission configurations X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=be8c83457e7aab12c04f974fd4fa632f453e6197;p=libs%2Fgl.git Fix for material export with certain unusual emission configurations If the color and strength inputs are both unconnected, it's fine for them to have arbitrary values. --- diff --git a/blender/io_mspgl/material.py b/blender/io_mspgl/material.py index a20d7718..a9c349d0 100644 --- a/blender/io_mspgl/material.py +++ b/blender/io_mspgl/material.py @@ -211,9 +211,9 @@ class MaterialProperty: from_node, from_sock = get_linked_node_and_socket(node_tree, input_socket) if strength_socket: if not from_node: - if input_socket.default_value[:3]!=(1.0, 1.0, 1.0): - raise Exception("Unsupported material property scale {}".format(input_socket.default_value)) from_node, from_sock = get_linked_node_and_socket(node_tree, strength_socket) + if from_node and input_socket.default_value[:3]!=(1.0, 1.0, 1.0): + raise Exception("Unsupported material property scale {}".format(tuple(input_socket.default_value))) elif strength_socket.is_linked: raise Exception("Separate inputs for value and strength are not supported") elif strength_socket.default_value!=1.0: