[Fixed][Copy files] 3D models copy issues

- PCB not loaded if the only action was to copy the 3D models
- Problems for STEP models when copying models
This commit is contained in:
Salvador E. Tropea 2023-05-22 12:50:41 -03:00
parent 55ecf06aec
commit 63f5a6de20
1 changed files with 2 additions and 1 deletions

View File

@ -121,6 +121,7 @@ class Copy_FilesOptions(Base3DOptions):
def get_3d_models(self, f):
""" Look for the 3D models and make a list, optionally download them """
GS.check_pcb()
GS.load_board()
dest_dir = f.dest
if dest_dir and dest_dir[-1] == '+':
dest_dir = dest_dir[:-1]
@ -148,7 +149,7 @@ class Copy_FilesOptions(Base3DOptions):
if os.path.isfile(fn):
new_list.append(fn)
elif fn.endswith('.step'):
fn = f[:-5]+'.wrl'
fn = fn[:-5]+'.wrl'
if os.path.isfile(fn):
new_list.append(fn)
return files_list+fnmatch.filter(new_list, f.source)