[Bf-extensions-cvs] [5118d312] master: gTF importer: perf: ensure normalized accessors decode to float32s
Julien Duroure
noreply at git.blender.org
Sat Sep 5 15:35:48 CEST 2020
Commit: 5118d312b7a5b760897ec69ffdab56888e0b7678
Author: Julien Duroure
Date: Sat Sep 5 15:35:41 2020 +0200
Branches: master
https://developer.blender.org/rBA5118d312b7a5b760897ec69ffdab56888e0b7678
gTF importer: perf: ensure normalized accessors decode to float32s
===================================================================
M io_scene_gltf2/__init__.py
M io_scene_gltf2/io/imp/gltf2_io_binary.py
===================================================================
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index df5be122..0e7fccb9 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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',
diff --git a/io_scene_gltf2/io/imp/gltf2_io_binary.py b/io_scene_gltf2/io/imp/gltf2_io_binary.py
index 728cf0f0..5346d9f5 100755
--- a/io_scene_gltf2/io/imp/gltf2_io_binary.py
+++ b/io_scene_gltf2/io/imp/gltf2_io_binary.py
@@ -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
More information about the Bf-extensions-cvs
mailing list