diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-05-04 19:34:59 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-05-04 19:34:59 +0300 |
commit | 0372ff2ba735f3559953753ec7f17fb8bde4ec57 (patch) | |
tree | 37f46eafca0b033fd442ed84fb4a3b102f921fe9 /io_scene_gltf2/io | |
parent | b72a6c057999e51c03f103706b7cd5da79e9c4b2 (diff) |
glTF: code cleanup - remove no more needed import
Diffstat (limited to 'io_scene_gltf2/io')
-rwxr-xr-x | io_scene_gltf2/io/exp/gltf2_io_export.py | 6 | ||||
-rwxr-xr-x | io_scene_gltf2/io/imp/gltf2_io_binary.py | 1 | ||||
-rwxr-xr-x | io_scene_gltf2/io/imp/gltf2_io_gltf.py | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/io_scene_gltf2/io/exp/gltf2_io_export.py b/io_scene_gltf2/io/exp/gltf2_io_export.py index 07cf8820..54181206 100755 --- a/io_scene_gltf2/io/exp/gltf2_io_export.py +++ b/io_scene_gltf2/io/exp/gltf2_io_export.py @@ -103,16 +103,14 @@ def save_gltf(gltf, export_settings, encoder, glb_buffer): file.write(struct.pack("I", length_gltf)) file.write('JSON'.encode()) file.write(gltf_data) - for i in range(0, spaces_gltf): - file.write(' '.encode()) + file.write(b' ' * spaces_gltf) # Chunk 1 (BIN) if length_bin > 0: file.write(struct.pack("I", length_bin)) file.write('BIN\0'.encode()) file.write(binary) - for i in range(0, zeros_bin): - file.write('\0'.encode()) + file.write(b'\0' * zeros_bin) file.close() diff --git a/io_scene_gltf2/io/imp/gltf2_io_binary.py b/io_scene_gltf2/io/imp/gltf2_io_binary.py index 9057c17c..7cfcbc40 100755 --- a/io_scene_gltf2/io/imp/gltf2_io_binary.py +++ b/io_scene_gltf2/io/imp/gltf2_io_binary.py @@ -13,7 +13,6 @@ # limitations under the License. import struct -import base64 from ..com.gltf2_io import Accessor diff --git a/io_scene_gltf2/io/imp/gltf2_io_gltf.py b/io_scene_gltf2/io/imp/gltf2_io_gltf.py index 88ba5356..640e552a 100755 --- a/io_scene_gltf2/io/imp/gltf2_io_gltf.py +++ b/io_scene_gltf2/io/imp/gltf2_io_gltf.py @@ -18,7 +18,7 @@ import logging import json import struct import base64 -from os.path import dirname, join, isfile, basename +from os.path import dirname, join, isfile from urllib.parse import unquote |