Hey,
I'm trying to copy the image files to a new location and then change the paths in PS to reference the new location and then save the project. The images are copied correctly, and the image paths are changed, but if I close the project and open it again the image paths have changed back to what they were before. It seems like it doesn't save it properly.
If I save it under a different name the new image paths are saved like they are supposed to, but I can't seem to overwrite the old project...
The code where I copy the images:
for i in range(len(chunk.cameras)):
imPath = projectDir+'/Images/'+os.path.basename(chunk.cameras[i].photo.path)
shutil.copy(chunk.cameras[i].photo.path, imPath) # copying the image
chunk.cameras[i].photo.path = imPath # setting the new image path
print('copyIm: '+chunk.cameras[i].photo.path)
The code where I save:
if not(doc.save(projectPath + "%03d" % projectIncrement + '.psx')):
app.messageBox('Saving project failed!')
print('hej1')
print("%03d" % projectIncrement)
print('--- Saving project to: ' + projectPath + "%03d" % projectIncrement + '.psx')
The output after the save:
2016-03-17 09:40:31 Saving project...
2016-03-17 09:40:31 saved project in 0.007 sec
2016-03-17 09:40:32 Finished processing in 0.007 sec (exit code 1)
2016-03-17 09:40:32 hej1
2016-03-17 09:40:32 003
2016-03-17 09:40:32 --- Saving project to: E:/Miriam/Projects/testProjectI/testProjectI003.psx
(The project name is correct, but it still doesn't seem to work)
Any help would be appreciated!