mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] add Import Images menu
This commit is contained in:
parent
0e434908a5
commit
f9477eadfc
2 changed files with 36 additions and 1 deletions
|
@ -726,10 +726,24 @@ class Reconstruction(UIGraph):
|
|||
recursive: List files in folders recursively.
|
||||
|
||||
"""
|
||||
logging.warning("importImagesFromFolder: " + str(path))
|
||||
filesByType = multiview.findFilesByTypeInFolder(path, recursive)
|
||||
if filesByType.images:
|
||||
self.buildIntrinsics(self.cameraInit, filesByType.images)
|
||||
|
||||
@Slot("QVariant")
|
||||
def importImagesUrls(self, imagePaths, recursive=False):
|
||||
paths = []
|
||||
for imagePath in imagePaths:
|
||||
if isinstance(imagePath, (QUrl)):
|
||||
p = imagePath.toLocalFile()
|
||||
if not p:
|
||||
p = imagePath.toString()
|
||||
else:
|
||||
p = imagePath
|
||||
paths.append(p)
|
||||
self.importImagesFromFolder(paths)
|
||||
|
||||
def importImagesAsync(self, images, cameraInit):
|
||||
""" Add the given list of images to the Reconstruction. """
|
||||
# Start the process of updating views and intrinsics
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue