Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Navigation Mesh component export for Blender 4.2 #312

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading