glTF exporter: Fix when custom node has no type

This commit is contained in:
Julien Duroure 2023-01-09 11:27:39 +01:00
parent a2cfd4cf92
commit 23661bdd40
Notes: blender-bot 2023-02-13 13:52:54 +01:00
Referenced by issue blender/blender#102967: 3.4: Potential candidates for corrective releases
Referenced by issue blender/blender#102967, 3.4: Potential candidates for corrective releases
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,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": (3, 5, 11),
"version": (3, 5, 12),
'blender': (3, 4, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -244,7 +244,7 @@ def get_factor_from_socket(socket, kind):
if node is not None:
x1, x2 = None, None
if kind == 'RGB':
if node.type in 'MIX' and node.data_type == "RGBA" and node.blend_type == 'MULTIPLY':
if node.type == 'MIX' and node.data_type == "RGBA" and node.blend_type == 'MULTIPLY':
# TODO: handle factor in inputs[0]?
x1 = get_const_from_socket(node.inputs[6], kind)
x2 = get_const_from_socket(node.inputs[7], kind)