gTF importer: perf: ensure normalized accessors decode to float32s

This commit is contained in:
Julien Duroure 2020-09-05 15:35:41 +02:00
parent 3a5aaa9b99
commit 5118d312b7
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (1, 4, 16),
"version": (1, 4, 17),
'blender': (2, 90, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -183,8 +183,8 @@ class BinaryData():
array = np.maximum(-1.0, array / 32767.0)
elif accessor.component_type == 5123: # uint16
array = array / 65535.0
else:
array = array.astype(np.float64)
array = array.astype(np.float32, copy=False)
return array