1
Python and Java API / Export textures from independent cameras
« on: January 30, 2017, 10:48:16 PM »
Hello, I have a "Photoscan" file with a 3D mesh and a series of cameras prepared to be projected onto the mesh. I need to export each texture generated by each camera to a separate "TIF" file. Is this possible?. I have only been able to automatically export the union of all textures.
Would appreciate any help ...
Would appreciate any help ...
Code: [Select]
import PhotoScan, os
path = PhotoScan.app.getExistingDirectory("Please choose the folder with .psz files:")
print("Script started")
doc = PhotoScan.app.document
doc.clear()
project_list = os.listdir(path)
for project_name in project_list:
if ".PSZ" in project_name.upper():
doc.open(path + "/" + project_name)
chunk = doc.chunks[0]
chunk.buildTexture(blending=PhotoScan.DisabledBlending, size=4096)
print("Processed project: " + project_name)
chunk.exportModel(path + "/" + project_name[:-3] + "obj", texture_format = 'tif', texture = True, format = "obj")
print("Script finished.")