Skip to content

Commit

Permalink
converter: Allow non-standard absolute paths in image URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Moguri committed Mar 31, 2024
1 parent 95e2621 commit da1db08
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gltf/_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,11 @@ def load_embedded_image(name, ext, data):
texture = load_embedded_image(name, ext, data)
else:
uri = urllib.parse.unquote(uri)
uri = Filename.from_os_specific(uri)
fulluri = Filename(self.filedir, uri)
fname = Filename.from_os_specific(uri)
if not os.path.isabs(uri):
fulluri = Filename(self.filedir, uri)
else:
fulluri = fname
texture = TexturePool.load_texture(fulluri, 0, False, LoaderOptions())
if not texture:
raise RuntimeError(f'failed to load texture: {fulluri}')
Expand Down

0 comments on commit da1db08

Please sign in to comment.