[3D models][Download][Fixed] Name of the other model
Whe using a suffix See #567
This commit is contained in:
parent
8c35fe66da
commit
bac3c8cd16
|
|
@ -207,14 +207,14 @@ class Base3DOptions(VariantOptions):
|
||||||
# Successfully downloaded
|
# Successfully downloaded
|
||||||
downloaded.add(full_name)
|
downloaded.add(full_name)
|
||||||
# If this is a .wrl also download the .step
|
# If this is a .wrl also download the .step
|
||||||
if url.endswith('.wrl'):
|
extra_fname = None
|
||||||
url = url[:-4]+'.step'
|
if fname.endswith('.wrl'):
|
||||||
fname = fname[:-4]+'.step'
|
extra_fname = fname[:-4]+'.step'
|
||||||
self.download_model(url, fname, rel_dirs)
|
|
||||||
elif force_wrl: # This should be a .step, so we download the wrl
|
elif force_wrl: # This should be a .step, so we download the wrl
|
||||||
url = os.path.splitext(url)[0]+'.wrl'
|
extra_fname = os.path.splitext(fname)[0]+'.wrl'
|
||||||
fname = os.path.splitext(fname)[0]+'.wrl'
|
if extra_fname is not None:
|
||||||
self.download_model(url, fname, rel_dirs)
|
url = self.kicad_3d_url+urllib.parse.quote_plus(extra_fname)+self.kicad_3d_url_suffix
|
||||||
|
self.download_model(url, extra_fname, rel_dirs)
|
||||||
return replace
|
return replace
|
||||||
|
|
||||||
def try_download_easyeda(self, model, full_name, downloaded, sch_comp, lcsc_field):
|
def try_download_easyeda(self, model, full_name, downloaded, sch_comp, lcsc_field):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue