]> git.tdb.fi Git - libs/gl.git/commitdiff
Recognize textures through an RGB to BW node in Blender
authorMikko Rasa <tdb@tdb.fi>
Sun, 11 Apr 2021 20:39:16 +0000 (23:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 11 Apr 2021 20:39:16 +0000 (23:39 +0300)
blender/io_mspgl/material.py

index f7f2c5eb6138d20099975259578cbc9100bdf81f..5e06fd8aa061ef83ca9540b1d97163657d0011be 100644 (file)
@@ -32,6 +32,8 @@ class MaterialProperty:
                        if from_node:
                                if from_node.type=='NORMAL_MAP':
                                        from_node, _ = get_linked_node_and_socket(node_tree, from_node.inputs["Color"])
+                               elif from_node.type=='RGBTOBW':
+                                       from_node, _ = get_linked_node_and_socket(node_tree, from_node.inputs["Color"])
 
                                if alpha_socket:
                                        alpha_from, _ = get_linked_node_and_socket(node_tree, alpha_socket)