[ui] Import images asynchronously with the "Import Images" menu action

Loading images with the "Import Images" menu action is a blocking
operation that might freeze the app if there are many images to import.

This commit performs the import asynchronously (similarly to what is done
when images are dropped in the Image Gallery): Meshroom remains unusable
while the images are imported and the intrinsics built (which is a wanted
behaviour), but it does not freeze at all.
This commit is contained in:
Candice Bentéjac 2023-02-14 12:52:38 +01:00
parent 6c5fea5f36
commit b5fab79e09

View file

@ -801,7 +801,7 @@ class Reconstruction(UIGraph):
logging.debug("importImagesFromFolder: " + str(path))
filesByType = multiview.findFilesByTypeInFolder(path, recursive)
if filesByType.images:
self.buildIntrinsics(self.cameraInit, filesByType.images)
self.importImagesAsync(filesByType.images, self.cameraInit)
@Slot("QVariant")
def importImagesUrls(self, imagePaths, recursive=False):