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>2019-08-09 20:43:24 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-08-09 20:56:13 +0300
commit5a937edabb313e4924ba66c21a745ab142e9b5ef (patch)
tree7a6d782dde10bed8bbd587b115314b2de91f4c69 /io_scene_gltf2/blender/imp/gltf2_blender_image.py
parenta238b0325d2f7063e94df1a2e6e525ea3c43796f (diff)
glTF importer: manage escaped uri for texture files
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_image.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_image.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_image.py b/io_scene_gltf2/blender/imp/gltf2_blender_image.py
index 4d352362..546aa7e3 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_image.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_image.py
@@ -16,6 +16,7 @@ import bpy
import os
import tempfile
from os.path import dirname, join, isfile, basename
+from urllib.parse import unquote
from ...io.imp.gltf2_io_binary import BinaryData
@@ -40,8 +41,8 @@ class BlenderImage():
if idx != -1:
return False, None, None
- if isfile(join(dirname(gltf.filename), pyimage.uri)):
- return True, join(dirname(gltf.filename), pyimage.uri), basename(join(dirname(gltf.filename), pyimage.uri))
+ if isfile(join(dirname(gltf.filename), unquote(pyimage.uri))):
+ return True, join(dirname(gltf.filename), unquote(pyimage.uri)), basename(join(dirname(gltf.filename), unquote(pyimage.uri)))
else:
gltf.log.error("Missing file (index " + str(img_idx) + "): " + pyimage.uri)
return False, None, None