Thank you so much for making glTF-Blender-IO - it is awesome!!!
I am writing a "geometry clipboard" utility for Blender, Unreal, Houdini, etc that uses a glb memory buffer.
For exporting from Blender, I am using glTF-Blender-IO. But I need to disable writing the output to a file, and instead just return the buffer and json of the glb to a callback.
I am just uncertain how to pass a callback function to the exporter.
My operator is calling:
bpy.ops.export_scene.gltf(filepath=export_path, export_format='GLB', use_selection=True, use_memory_buffer = True)
(use_memory_buffer is a bool setting I added for testing)
I was hoping to pass the exporter an additional callback method instead of that bool.
In gltf2_blender_export.py source, save(context, export_settings):
I have located the data I want:
json, buffer = __export(export_settings)
and also the file write I want to disable:
__write_file(json, buffer, export_settings)
Can I add a PointerProperty setting and use it to pass a callback to the exporter?
Thanks for any help/advice - I am still learning python and blender
Thank you so much for making glTF-Blender-IO - it is awesome!!!
I am writing a "geometry clipboard" utility for Blender, Unreal, Houdini, etc that uses a glb memory buffer.
For exporting from Blender, I am using glTF-Blender-IO. But I need to disable writing the output to a file, and instead just return the buffer and json of the glb to a callback.
I am just uncertain how to pass a callback function to the exporter.
My operator is calling: bpy.ops.export_scene.gltf(filepath=export_path, export_format='GLB', use_selection=True, use_memory_buffer = True)
(use_memory_buffer is a bool setting I added for testing) I was hoping to pass the exporter an additional callback method instead of that bool.
In gltf2_blender_export.py source, save(context, export_settings):
I have located the data I want: json, buffer = __export(export_settings)
and also the file write I want to disable: __write_file(json, buffer, export_settings)
Can I add a PointerProperty setting and use it to pass a callback to the exporter?
Thanks for any help/advice - I am still learning python and blender