mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-31 18:06:31 +02:00
[ui] save after drag&drop: meshroom scenes detected as separated type of file
In FilesByType, new attribute meshroomScene allowing to detected separately the meshroom scenes from the other types of file.
This commit is contained in:
parent
58e9bafa45
commit
b74cada8ef
4 changed files with 30 additions and 21 deletions
|
@ -69,6 +69,7 @@ videoExtensions = (
|
|||
'.mxf',
|
||||
)
|
||||
panoramaInfoExtensions = ('.xml')
|
||||
meshroomSceneExtensions = ('.mg')
|
||||
|
||||
|
||||
def hasExtension(filepath, extensions):
|
||||
|
@ -81,15 +82,17 @@ class FilesByType:
|
|||
self.images = []
|
||||
self.videos = []
|
||||
self.panoramaInfo = []
|
||||
self.meshroomScene = []
|
||||
self.other = []
|
||||
|
||||
def __bool__(self):
|
||||
return self.images or self.videos or self.panoramaInfo
|
||||
return self.images or self.videos or self.panoramaInfo or self.meshroomScene
|
||||
|
||||
def extend(self, other):
|
||||
self.images.extend(other.images)
|
||||
self.videos.extend(other.videos)
|
||||
self.panoramaInfo.extend(other.panoramaInfo)
|
||||
self.meshroomScene.extend(other.meshroomScene)
|
||||
self.other.extend(other.other)
|
||||
|
||||
def addFile(self, file):
|
||||
|
@ -99,6 +102,8 @@ class FilesByType:
|
|||
self.videos.append(file)
|
||||
elif hasExtension(file, panoramaInfoExtensions):
|
||||
self.panoramaInfo.append(file)
|
||||
elif hasExtension(file, meshroomSceneExtensions):
|
||||
self.meshroomScene.append(file)
|
||||
else:
|
||||
self.other.append(file)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue