Skip to content

Commit

Permalink
Merge pull request #312 from Hubs-Foundation/fix-blender-4.2-navmesh-…
Browse files Browse the repository at this point in the history
…export

Fix the Navigation Mesh component export for Blender 4.2
  • Loading branch information
Exairnous authored Oct 19, 2024
2 parents 8ccf0ac + 62de303 commit a425fff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addons/io_hubs_addon/io/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ def gather_properties(export_settings, object, component):
if value:
return value
else:
return {"__empty_component_dummy": None}
# Hubs expects this to just be an empty dictionary, but the glTF exporter strips them out with its __fix_json function in gltf2_blender_export.py
# Add one dummy component per __fix_json call so that we end up with an empty dictionary.
if bpy.app.version < (4, 2, 0):
return {"__empty_component_dummy": None}
else:
return {"__empty_component_dummy": {"__empty_component_dummy": None}}


def gather_property(export_settings, blender_object, target, property_name):
Expand Down

0 comments on commit a425fff

Please sign in to comment.