1
General / Re: I need to export Photos
« on: October 07, 2015, 04:05:37 PM »Here is a short script I wrote using examples from a couple of sources
This will copy all the photos used in the current chunk into a folder you choose. Run the script and a menu item will appear under "Custom Menu"
import os
import shutil
import PhotoScan
def main():
dest_path = PhotoScan.app.getExistingDirectory("Export assets to folder:")
doc = PhotoScan.app.document
chunk = doc.chunk
print ("Exporting cameras ...")
for camera in chunk.cameras:
print (camera.photo.path)
shutil.copy2(camera.photo.path, dest_path)
print("Script finished. Assets exported to " + dest_path + "\n")
PhotoScan.app.addMenuItem("Custom menu/Export Assets", main)
Thank you very very very much. You saved me from long time spendings. Brilliant!!!
How can we learn codes of scripting? I know basics of programming. I can exactly understand when read your script codes.
But I dont know what is method names or which variables Photoscan Has, is there any API document for that?
Thank you again!! thank you....