Blender 2.3.1 - edge case - Gizmo code errors out on node.children = None

Version: SU/AAU/WU XX - 1.XX.XX.X SDK 1.2 Blender 2.3.1

Frequency: Rarely

Severity: *High

Context: What package? When editing or mounted from Community? In main menu or in flight? etc…

Bug description:
In some edge cases when exporting with armatures - a node and its children can be None. This will block the gather_scene_hook

with this error

gather_scene_hook fails on <io_scene_gltf2_msfs_2024.glTF2ExportUserExtension object at 0x000002540711E9B0>
‘NoneType’ object is not iterable

Repro steps:

Attachments:

Private attachments: Send a PM to @PrivateContent with the link to this topic and the link to download your content

Possible fix:
in asobo_gizmo_object.py

    @staticmethod
    def export(nodes, blender_scene, export_settings):
        """
        Let the Khronos exporter gather the gizmo to calculate the proper TRS with the parent to make sure everything is correct,
        then remove the gizmo from the collected nodes and set the proper mesh extensions
        """
        #print("AsoboGizmoObject - export Start", nodes)
        if nodes is None:
            return
        #print("AsoboGizmoObject - export past None", nodes)
        for node in nodes:
            node_extensions = []
            mesh_extensions = []
            if node.children is None:
                print("AsoboGizmoObject - export for", node.children)
                continue
            for child in list(node.children):

Hello and thank you,

This has already been fixed, and the fix will be included in the next SDK update.

Regards,
Boris

1 Like