@@ -487,31 +487,23 @@ def saveProject(self):
487
487
488
488
def saveGroomedFiles (self ):
489
489
dir = qt .QFileDialog .getExistingDirectory (None , "Open Directory" , self .shapeworksTempDir , qt .QFileDialog .ShowDirsOnly | qt .QFileDialog .DontResolveSymlinks )
490
- #print("Dir to save groomed files:", dir)
491
490
with open (self .projectFileName ) as projFile :
492
491
data = json .load (projFile )
493
- #print(data["data"])
494
492
for d in data ["data" ]:
495
- #print(d["name"])
496
- #print(d["groomed_file"])
497
- _ , groomFile = os .path .split (d ["groomed_file" ])
498
- fullGroomPath = os .path .join (self .shapeworksTempDir , d ["groomed_file" ])
499
- #print(fullGroomPath)
493
+ _ , filename = os .path .split (d ["groomed_file" ])
494
+ fileToCopy = os .path .join (self .shapeworksTempDir , d ["groomed_file" ])
500
495
import shutil
501
- shutil .copyfile (fullGroomPath , os .path .join (dir , groomFile ))
496
+ shutil .copyfile (fileToCopy , os .path .join (dir , filename ))
502
497
503
498
def saveOptimizedFiles (self ):
504
499
dir = qt .QFileDialog .getExistingDirectory (None , "Open Directory" , self .shapeworksTempDir , qt .QFileDialog .ShowDirsOnly | qt .QFileDialog .DontResolveSymlinks )
505
500
with open (self .projectFileName ) as projFile :
506
501
data = json .load (projFile )
507
502
for d in data ["data" ]:
508
- #print(d["name"])
509
- #print(d["groomed_file"])
510
- _ , groomFile = os .path .split (d ["world_particles_file" ])
511
- fullGroomPath = os .path .join (self .shapeworksTempDir , d ["world_particles_file" ])
512
- #print(fullGroomPath)
503
+ _ , filename = os .path .split (d ["world_particles_file" ])
504
+ fileToCopy = os .path .join (self .shapeworksTempDir , d ["world_particles_file" ])
513
505
import shutil
514
- shutil .copyfile (fullGroomPath , os .path .join (dir , groomFile ))
506
+ shutil .copyfile (fileToCopy , os .path .join (dir , filename ))
515
507
516
508
def runShapeworksCommand (self , inputParams , name ):
517
509
swCmd = "{0}: {1} {2}" .format (name , self .shapeworksPath , ' ' .join (inputParams ))
0 commit comments