I am getting positive feedback telling me that the texture is being built but the viewport does not reflect the status. Only started to occur after I updated to 1.1.2, unless i missed something?
Here is my code;
import PhotoScan
import os
import sys
from PySide.QtGui import QPixmap, QApplication
import time
import getpass
import subprocess
# Get User
username = getpass.getuser()
def Custom():
# Define: Home Directory
path = os.getcwd()
print ("Home Directory: ", path)
ImageDirectory = path+"\\raw\\tiff\\"
os.chdir(ImageDirectory)
print ("Image Directory: ", ImageDirectory)
print("Running")
print ("Script Location: C:\Program Files\Agisoft\PhotoScan Pro\scripts")
# Set Application Objects
doc = PhotoScan.app.document
print ("Processing Images...")
# Define Chunk
chunk = PhotoScan.app.document.addChunk()
chunk.label = "MainChunk"
# Find Images
ImageFiles = []
for photo in os.listdir (ImageDirectory):
if photo.endswith('.tif'):
ImageFiles.append(photo)
if len(ImageFiles)>0:
print(ImageFiles)
if len(ImageFiles)==0:
print('no images found!')
# Load Image Files into Chunk Camera
chunk.addPhotos(ImageFiles)
chunk.importMasks(path='',method='alpha')
camera = chunk.cameras[0]
# match Photos
chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy,preselection=PhotoScan.GenericPreselection, filter_mask=True)
# align Photos
chunk.alignCameras()
# Build Dense Cloud
chunk.buildDenseCloud(quality=PhotoScan.MediumQuality)
#Build Model
chunk.buildModel(surface=PhotoScan.Arbitrary,interpolation=PhotoScan.EnabledInterpolation)
# Build UVs
chunk.buildUV(mapping=PhotoScan.GenericMapping)
# Build Texture
chunk.buildTexture(blending=PhotoScan.MosaicBlending, size=4096)
# Decimate Model
#chunk.decimateModel(100000)
modelname = path+"\\output\\model.obj"
#Export Model & Save Doc
chunk.exportModel(modelname,texture_format="tif", texture=True,format="obj")
time.sleep(5)
doc.save("AgisoftProject.psz")
time.sleep(5)
sys.exit()
quit()
return 1
label = "Custom/Run"
PhotoScan.app.addMenuItem(label, Custom, "r")
print("Custom Menu Added")
print ("press r to run")
any help would be greatly appreciated... not sure what I missed or broke.