FS#77376 - [blender] Unable to import glTF 2.0 models due to removed numpy attribute.
Attached to Project:
Community Packages
Opened by Aaron Barany (akb825) - Saturday, 04 February 2023, 00:19 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 08 February 2023, 03:43 GMT
Opened by Aaron Barany (akb825) - Saturday, 04 February 2023, 00:19 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 08 February 2023, 03:43 GMT
|
Details
Description:
When attempting to load a glTF 2.0 model within Blender, an error is triggered due to numpy having removed a deprecated name for an attribute. This attribute was marked as deprecated in numpy 1.20 and removed in the 1.24 release. I can fix the error locally by opening /usr/share/blender/3.4/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py and changing "np.bool" to "np.bool_" on line 612. The final line should be: poly_smooths = np.empty(num_polys, dtype=np.bool_) Additional info: * package version: blender 17:3.4.1-10, used with numpy 1.24 (such as with the python-numpy package) * Upstream numpy change removing the deprecated attribute: https://github.com/numpy/numpy/pull/22607 * See attached error message from Blender. Steps to reproduce: 1. Go to File -> Import -> glTF 2.0 (.glb/.gltf) menu option. 2. Select a .gltf or .glb file to load. 3. Observe the error due to removed attribute. |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Wednesday, 08 February 2023, 03:43 GMT
Reason for closing: Fixed
Wednesday, 08 February 2023, 03:43 GMT
Reason for closing: Fixed
I can see if I can report it upstream, though last time I submitted a similar issue they responded that they only support the embedded version of Python they ship with the binary releases.