Conversion of bmp images to png fails during GLB export in Blender 3.3 Beta
See original GitHub issueDescribe the bug Conversion of bmp images to png fails during GLB export in Blender 3.3 Beta. Using Blender 3.2.2 or previous versions is successful.
To Reproduce Steps to reproduce the behavior:
- Create a bitmap image (*.bmp) with Windows Paint App.
- Open Blender 3.3 Beta
- Add a ‘Plane’ mesh
- Add new “Principled BSDF” material to the mesh.
- Change it’s “Emission” to a Image Texture. Attach the bitmap image.
- Export GLB.
- See error
or
- Extract bug-report-20220807.zip
- Open the extracted .blend file with Blender 3.3 Beta.
- Export GLB.
- See error
Read prefs: C:\Users\saturday06\AppData\Roaming\Blender Foundation\Blender\3.3\config\userpref.blend
Read blend: C:\Users\saturday06\Desktop\bug-report-20220807\bug-report-20220807\bug-report-20220807.blend
11:54:33 | INFO: Draco mesh compression is available, use library at C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\python\lib\site-packages\extern_draco.dll
11:54:37 | INFO: Starting glTF 2.0 export
11:54:37 | INFO: Extracting primitive: Plane
11:54:37 | INFO: Primitives created: 1
Traceback (most recent call last):
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\__init__.py", line 648, in execute
return gltf2_blender_export.save(context, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 35, in save
json, buffer = __export(export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 52, in __export
__gather_gltf(exporter, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_export.py", line 66, in __gather_gltf
active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 30, in gather_gltf2
scenes.append(__gather_scene(blender_scene, export_settings))
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather.py", line 69, in __gather_scene
node = gltf2_blender_gather_nodes.gather_node(
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 35, in gather_node
mesh=__gather_mesh(vnode, blender_object, export_settings),
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_nodes.py", line 246, in __gather_mesh
result = gltf2_blender_gather_mesh.gather_mesh(blender_mesh,
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 61, in gather_mesh
primitives=__gather_primitives(blender_mesh, uuid_for_skined_data, vertex_groups, modifiers, materials, export_settings),
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_mesh.py", line 147, in __gather_primitives
return gltf2_blender_gather_primitives.gather_primitives(blender_mesh,
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_primitives.py", line 83, in gather_primitives
material = gltf2_blender_gather_materials.gather_material(
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 56, in gather_material
emissive_texture, uvmap_actives_emissive_texture = __gather_emissive_texture(blender_material, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials.py", line 215, in __gather_emissive_texture
return export_emission_texture(blender_material, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_materials_emission.py", line 54, in export_emission_texture
emissive_texture, use_actives_uvmap_emissive, _ = gltf2_blender_gather_texture_info.gather_texture_info(emissive, (emissive,), export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture_info.py", line 23, in gather_texture_info
return __gather_texture_info_helper(primary_socket, blender_shader_sockets, 'DEFAULT', filter_type, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture_info.py", line 44, in __gather_texture_info_helper
index, factor = __gather_index(blender_shader_sockets, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture_info.py", line 141, in __gather_index
return gltf2_blender_gather_texture.gather_texture(blender_shader_sockets, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture.py", line 31, in gather_texture
source, factor = __gather_source(blender_shader_sockets, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_texture.py", line 83, in __gather_source
return gltf2_blender_gather_image.gather_image(blender_shader_sockets, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_image.py", line 46, in gather_image
buffer_view, factor_buffer_view = __gather_buffer_view(image_data, mime_type, name, export_settings)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_cache.py", line 38, in wrapper_cached
result = func(*args, **kwargs)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_gather_image.py", line 106, in __gather_buffer_view
data, factor = image_data.encode(mime_type)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_image.py", line 136, in encode
return self.__encode_happy(), None
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_image.py", line 146, in __encode_happy
return self.__encode_from_image(self.blender_image())
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_image.py", line 228, in __encode_from_image
return _encode_temp_image(tmp_image, self.file_format)
File "C:\Users\saturday06\Desktop\blender-3.3.0-beta\3.3\scripts\addons\io_scene_gltf2\blender\exp\gltf2_blender_image.py", line 240, in _encode_temp_image
with open(tmpfilename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\SATURD~1\\AppData\\Local\\Temp\\tmprau94mjh/img'
Expected behavior
No error.
Screenshots
https://user-images.githubusercontent.com/532872/183290636-eee21707-4818-47ac-ae7e-e619feabb881.mp4
.blend file/ .gltf
Version
- OS: Windows 11, macOS Monterey
- Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-08-05 17:53, hash:
rB74f983738ab4
- Worked: 3.2.2, 2.83.20
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Results From Across the Web
Export GLTF/GLB with animation fails in Blender 3.3 and below
I import your file (without any change in import option), then export with all default export option -> No crash, glb file is...
Read more >Exporting GLB files from Blender for MyARStudio - YouTube
In this tutorial we will see how to export a GLB file from Blender to be loaded into My AR Studio. Try My...
Read more >List of file formats - Wikipedia
This is a list of file formats used by computers, organized by type. Filename extension it is usually noted in parentheses if they...
Read more >Search Results - CVE
A maliciously crafted PNG file in Autodesk Image Processing component may be used to attempt to free an object that has already been...
Read more >MetaDefender Core v4.19.0 - OPSWAT Knowledge Center
Is Metadefender Core compromised while scanning files? ... MetaDefender Core v4 shows a large number of files that failed to scan.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems upstream bug is now fixed. Let’s wait tomorrow’s build to test and close this ticket
Ok, seems the issue comes from Blender API, not from the addon. I opened the issue on Blender tracker: https://developer.blender.org/T100281