I am building the depth maps through the python API (in Spyder IDE) within a loop, as follows:
for frame in chunk.frames:
frame.buildDepthMaps(downscale=1, filter_mode=Ms.NoFiltering)
doc.save()
It completes and saves successfully, and says X depth maps were completed. I can verify that the depth_maps folder was created in the project.files directory. However, when I open the project within Metashape GUI, no depth maps are found. Furthermore, if I close the python console, the directories are all deleted immediately. This happens even if doc.save() is called within the loop, or if the loop contains the dense cloud building:
frame.buildDenseCloud(point_confidence=True, keep_depth=True)
However, the depth maps can be properly saved when frames are called manually, e.g.,
chunk.frames[0].buildDepthMaps(downscale=1, filter_mode=Ms.NoFiltering)
doc.save()
The maps are also saved properly if created within the Metashape GUI.