[Bf-extensions-cvs] [23661bdd] master: glTF exporter: Fix when custom node has no type

Julien Duroure noreply at git.blender.org
Mon Jan 9 11:27:44 CET 2023


Commit: 23661bdd40144efb1f681396947c38cdecbe0163
Author: Julien Duroure
Date:   Mon Jan 9 11:27:39 2023 +0100
Branches: master
https://developer.blender.org/rBA23661bdd40144efb1f681396947c38cdecbe0163

glTF exporter: Fix when custom node has no type

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/exp/gltf2_blender_get.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 40104386..a1b1a925 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
index 1a5bb681..6e1d2d0f 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py
@@ -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)



More information about the Bf-extensions-cvs mailing list