Skip to content

Commit

Permalink
save with model_name & texture_name #7
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniKimmy committed May 5, 2021
1 parent e076592 commit daf2fd9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/sketchfab_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def parse(url, output_path):
for texture in textures:
print('开始下载贴图... (%s/%s)' % (cnt, len(textures)))
texture_url = _get_image_url(texture['images'])
fn = urlparse(texture_url).path.split('/')[-1]
texture_name = os.path.splitext(texture['name'])[0]
suffix = os.path.splitext(texture_url)[1]
fn = texture_name + suffix
ok = _download(texture_url, os.path.join(download_dir_path, 'texture', fn))
if not ok:
failed_download_url_list.append(texture_url)
Expand Down

0 comments on commit daf2fd9

Please sign in to comment.