glTF exporter: fix parenting check

When bone parent is still set, but user moved to "OBJECT" parent type, without resetting bone parent
This commit is contained in:
Julien Duroure 2023-01-29 21:54:57 +01:00
parent f24d858514
commit bddbd5ed5f
Notes: blender-bot 2023-05-02 04:16:23 +02:00
Referenced by issue #104583, gltf export fail; parent_bone not being ignored when Parent Type is "Object"
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, 20),
"version": (3, 5, 21),
'blender': (3, 4, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -239,7 +239,7 @@ class VExportTree:
# Object parented to bone
if blender_bone is not None:
for child_object in [c for c in blender_children[blender_object] if c.parent_bone is not None and c.parent_bone == blender_bone.name]:
for child_object in [c for c in blender_children[blender_object] if c.parent_type == "BONE" and c.parent_bone is not None and c.parent_bone == blender_bone.name]:
self.recursive_node_traverse(child_object, None, node.uuid, parent_coll_matrix_world, blender_children)
# Duplis