diff options
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py index 9309eb64..183da33e 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py @@ -26,6 +26,7 @@ from io_scene_gltf2.io.exp import gltf2_io_image_data from io_scene_gltf2.io.com import gltf2_io_debug from io_scene_gltf2.blender.exp import gltf2_blender_image from io_scene_gltf2.blender.exp.gltf2_blender_gather_cache import cached +from io_scene_gltf2.io.exp.gltf2_io_user_extensions import export_user_extensions @cached @@ -47,7 +48,7 @@ def gather_image( uri = __gather_uri(image_data, mime_type, name, export_settings) buffer_view = __gather_buffer_view(image_data, mime_type, name, export_settings) - return __make_image( + image = __make_image( buffer_view, __gather_extensions(blender_shader_sockets_or_texture_slots, export_settings), __gather_extras(blender_shader_sockets_or_texture_slots, export_settings), @@ -57,6 +58,10 @@ def gather_image( export_settings ) + export_user_extensions('gather_image_hook', export_settings, image, blender_shader_sockets_or_texture_slots) + + return image + @cached def __make_image(buffer_view, extensions, extras, mime_type, name, uri, export_settings): return gltf2_io.Image( |