Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2020-09-05 16:35:41 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-09-05 16:35:41 +0300
commit5118d312b7a5b760897ec69ffdab56888e0b7678 (patch)
tree387902ab74d3fbb325a26a1a39ececd556f22011 /io_scene_gltf2/io/imp
parent3a5aaa9b9999a0eada72076ba5b5bacc653e4528 (diff)
gTF importer: perf: ensure normalized accessors decode to float32s
Diffstat (limited to 'io_scene_gltf2/io/imp')
-rwxr-xr-xio_scene_gltf2/io/imp/gltf2_io_binary.py4
1 files changed, 2 insertions, 2 deletions
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