Hi Alexey,
Thank you for the reply, but based on the 1.6.4 doc,
Application.ModelView.captureView([width][, height][, transparent][, hide_items ])
which cannot change the ModelViewMode.
I have a couple of question related to this:
(1) Whether following code is the proper way to switch the view mode?
Metashape.app.model_view.model_view_mode = Metashape.Application.ModelView.ModelViewSolid
(2) whether the following code is proper way to
change viewpoint? (I haven't test since cannot get captureView() working)
* yrotdegree is float between [0, 360]
yrot = int(yrotdegree) * math.pi / 180
C, D = math.cos(yrot), math.sin(yrot)
ym = Metashape.Matrix([[C,0,-D,0],[0,1,0,0],[D,0,C,0],[0,0,0,1]])
Metashape.app.model_view.viewpoint.rot = ym
(3) How can captureView know which chunk it need to take screenshot?
Based on your code in other pose, I tried:
doc = Metashape.Document()
chunk = doc.addChunk()
chunk align photos ....... chunk.buildModel()
image = Metashape.app.model_view.captureView(width = 1024, height = 1024,transparent = False, hide_items = True)
image.save('testimage.png')
Then I got error: "RuntimeError: Can't save image: testimage.png"
I wonder why this happen?
The workflow I plan to use so far is:
1) Making chunk ->
2) change to "ModelViewSolid" after buildModel() ->
3) captureView() based on degree
Could you answer the three questions mentioned above?
By the way, if you see any error within these steps, please let me know.
Thank you!