Closed Spiderguy-F closed 5 months ago
I've found some signature issues that I've fixed here: https://github.com/MozillaReality/hubs-blender-exporter/pull/289
Aside from the comments I left inline, I found that this is having trouble with video texture targets and lightmaps in 4.0 (and possibly more components, not sure); I don't think they get exported and I believe these are related errors in the terminal:
gather_scene_hook fails on <io_hubs_addon.io.gltf_exporter.glTF2ExportUserExtension object at 0x7fc9055b7be0> ExportImage.blender_image() takes 1 positional argument but 2 were given
gather_material_hook fails on <io_hubs_addon.io.gltf_exporter.glTF2ExportUserExtension object at 0x7fc9055b7be0> ExportImage.blender_image() takes 1 positional argument but 2 were given
gather_node_hook fails on <io_hubs_addon.io.gltf_exporter.glTF2ExportUserExtension object at 0x7fc9055b7be0> ExportImage.blender_image() takes 1 positional argument but 2 were given
There were more, but I think adding in the changes from #292 fixed some of them.
I believe my PR fixes this.
I believe my PR fixes this.
This was encountered with the changes in your PR applied while attempting to export this file: Export_dev_test_2_packed.zip
Aside from these errors, I just found that there is one spot in the add-on that uses a context override for an operator and Blender 4.0 removed support for context overrides to operators. You now have to use a temp_override context manager. See: https://projects.blender.org/blender/blender/commit/ac263a9bce53e190d07d679a058a230e91e722be and https://docs.blender.org/api/4.0/bpy.types.Context.html#bpy.types.Context.temp_override
Temp overrides were introduced in Blender 3.2, so I think it's safe to just use them. The spot that needs changing begins at line 325 in components/operators.py
I've updated my related PR to fix some lightmap node issues in 4.0.
Regarding:
Aside from these errors, I just found that there is one spot in the add-on that uses a context override for an operator and Blender 4.0 removed support for context overrides to operators. You now have to use a temp_override context manager. See: https://projects.blender.org/blender/blender/commit/ac263a9bce53e190d07d679a058a230e91e722be and https://docs.blender.org/api/4.0/bpy.types.Context.html#bpy.types.Context.temp_override
Can you to open another PR with that so we can land this and the follow-up PRs?
Merged with the windows fix in master, all seems to work in both versions now.