mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-20 04:26:28 +02:00
[ui] uvCenterOffset set according to principal point corrected or not + undistorted image path resolve according to output value of node
This commit is contained in:
parent
ad7745a7c5
commit
f6332efa7e
3 changed files with 38 additions and 31 deletions
|
@ -98,3 +98,22 @@ class FilepathHelper(QObject):
|
|||
def fileSizeMB(self, path):
|
||||
""" Returns the file size in MB. """
|
||||
return QFileInfo(self.asStr(path)).size() / (1024*1024)
|
||||
|
||||
@Slot(str, QObject, result=str)
|
||||
def resolve(self, path, vp):
|
||||
# Resolve dynamic path that depends on viewpoint
|
||||
|
||||
replacements = {
|
||||
"<VIEW_ID>": str(vp.childAttribute("viewId").value),
|
||||
"<INTRINSIC_ID>": str(vp.childAttribute("intrinsicId").value),
|
||||
"<POSE_ID>": str(vp.childAttribute("poseId").value),
|
||||
"<PATH>": vp.childAttribute("path").value,
|
||||
"<FILENAME>": FilepathHelper.basename(FilepathHelper, vp.childAttribute("path").value),
|
||||
"<FILESTEM>": FilepathHelper.removeExtension(FilepathHelper, FilepathHelper.basename(FilepathHelper, vp.childAttribute("path").value)),
|
||||
}
|
||||
|
||||
resolved = path
|
||||
for key in replacements:
|
||||
resolved = resolved.replace(key, replacements[key])
|
||||
|
||||
return resolved
|
Loading…
Add table
Add a link
Reference in a new issue