glTF exporter: Regression: RGB to Shader socket unlit management
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (4, 3, 16),
|
||||
"version": (4, 3, 17),
|
||||
'blender': (4, 2, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
||||
@@ -343,6 +343,13 @@ class NodeNav:
|
||||
color = color[:3] # drop unused alpha component (assumes shader tree)
|
||||
return color, "node_tree." + nav.out_socket.path_from_id() + ".default_value"
|
||||
|
||||
elif self.in_socket.type == 'SHADER':
|
||||
# Historicaly, we manage RGB node plugged into a shader socket (output node)
|
||||
if nav.node.type == 'RGB':
|
||||
color = list(nav.out_socket.default_value)
|
||||
color = color[:3]
|
||||
return color, "node_tree." + nav.out_socket.path_from_id() + ".default_value"
|
||||
|
||||
elif self.in_socket.type == 'VALUE':
|
||||
if nav.node.type == 'VALUE':
|
||||
return nav.out_socket.default_value, "node_tree." + nav.out_socket.path_from_id() + ".default_value"
|
||||
|
||||
Reference in New Issue
Block a user