Hello, I have an old script that works with 1.6.1 but need to update now. What do I need to change to get the capture.modelView to work again? I get this error Error: 'Metashape.Application' object has no attribute 'viewpoint'
Here is my script.
def image_capture():
###export image capture to FSDBTesting/FaceSketches as a jpg
import Metashape
import shutil
current_document = Metashape.app.document
file_path = Path(Metashape.app.document.path)
doc = Metashape.app.document
chunk = doc.chunk
for shape in chunk.shapes:
if not shape.label:
shape.label = shape.group.label
viewpoint = Metashape.app.viewpoint
cx = viewpoint.width
cy = viewpoint.height
cx = 1214
cy = 912
shape_name = chunk.label
shape_name = shape_name[shape_name.find("_")+1:]
save_shape_folder = "G:/Mining/Geology/Favona/FSDBTesting/FaceSketches"
chunk_name = Metashape.app.getString("Enter location name?", shape_name)
capture = Metashape.app.captureModelView( width = cx, height = cy, transparent = (False), hide_items = (False))
#source = Metashape.DataSource.ModelData, mode = Metashape.ModelViewMode.ShadedModelView)
print(capture.height)
capture.save(save_shape_folder + "/" + chunk_name + ".jpg")