diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-04-15 17:36:58 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-04-15 17:36:58 +0300 |
commit | 167810169ee8c83ed6d8f093e1d78105a28de8cb (patch) | |
tree | 2594e34cda786c34f9c4730110d97ade09e0853d /io_scene_gltf2 | |
parent | 961d9e240c2af834d7c604ac0bc7cfe225609ecc (diff) |
glTF exporter: use extension from filename, not from image name
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py | 2 |
1 files changed, 1 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 cb4a03c6..331636de 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_image.py @@ -80,7 +80,7 @@ def __gather_extras(sockets_or_slots, export_settings): def __gather_mime_type(sockets_or_slots, export_settings): if export_settings["gltf_image_format"] == "NAME": image_name = __get_texname_from_slot(sockets_or_slots, export_settings) - _, extension = os.path.splitext(image_name) + _, extension = os.path.splitext(bpy.data.images[image_name].filepath) extension = extension.lower() if extension in [".jpeg", ".jpg", ".png"]: return { |