mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-16 10:36:29 +02:00
[ui] WorkspaceView: open images in the 2D Viewer from the Graph/NodeEditor
Double click on a node or an attribute with an image file to display it in the 2D viewer.
This commit is contained in:
parent
bc1eb83d92
commit
dbcfce7c90
3 changed files with 53 additions and 5 deletions
|
@ -78,3 +78,14 @@ class FilepathHelper(QObject):
|
|||
def normpath(self, path):
|
||||
""" Returns native normalized path """
|
||||
return os.path.normpath(self.asStr(path))
|
||||
|
||||
@Slot(str, result=str)
|
||||
@Slot(QUrl, result=str)
|
||||
def globFirst(self, path):
|
||||
""" Returns the first from a list of paths matching a pathname pattern. """
|
||||
import glob
|
||||
fileList = glob.glob(self.asStr(path))
|
||||
fileList.sort()
|
||||
if fileList:
|
||||
return fileList[0]
|
||||
return ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue