Skip to content

Commit

Permalink
[ui] TO SQUASH add new patterns to load images in viewer2D
Browse files Browse the repository at this point in the history
  • Loading branch information
broods committed Apr 17, 2023
1 parent 0a1f049 commit 6072542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meshroom/ui/components/filepath.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def extension(self, path):
@Slot(QUrl, result=str)
def removeExtension(self, path):
""" Returns the pathname without its extension (.ext)"""
return os.path.splitext(path)[0]
return os.path.splitext(self.asStr(path))[0]

@Slot(str, result=bool)
@Slot(QUrl, result=bool)
Expand Down
6 changes: 3 additions & 3 deletions meshroom/ui/qml/Viewer/Viewer2D.qml
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ FocusScope {

var viewId = -1;
var intrinsicId = -1;
var fileName = -1;
var fileName = "";
if (_reconstruction) {
viewId = _reconstruction.selectedViewId;
intrinsicId = getViewpointAttribute("intrinsicId", viewId);
fileName = Filepath.removeExtension(Filepath.basename(Filepath.stringToUrl(getViewpointAttribute("path",viewId))));
fileName = Filepath.removeExtension(Filepath.basename(getViewpointAttribute("path",viewId)));
}
var patterns = {"<VIEW_ID>": viewId,"<INTRINSIC_ID>": intrinsicId, "<FILENAME>": fileName}
return getFileAttributePath(displayedNode, outputAttribute.name,patterns);
Expand Down Expand Up @@ -262,7 +262,7 @@ FocusScope {
return vp.childAttribute(attributeName).value;
}
}
return "";
return undefined;
}

function getViewpointMetadata(viewId) {
Expand Down

0 comments on commit 6072542

Please sign in to comment.