mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-02 16:28:51 +02:00
Merge pull request #1852 from alicevision/mug/improveLoadDepthMap3D
[ui] Load 3D Depth Map: minor improvements
This commit is contained in:
commit
27ce3df5cb
4 changed files with 23 additions and 12 deletions
|
@ -258,7 +258,8 @@ FocusScope {
|
|||
onDisplayedNodeChanged: {
|
||||
// clear metadata if no displayed node
|
||||
if (!displayedNode) {
|
||||
metadata = {};
|
||||
root.source = "";
|
||||
root.metadata = {};
|
||||
}
|
||||
|
||||
// update output attribute names
|
||||
|
@ -274,6 +275,9 @@ FocusScope {
|
|||
}
|
||||
names.push("gallery");
|
||||
outputAttribute.names = names;
|
||||
|
||||
root.source = getImageFile();
|
||||
root.metadata = getMetadata();
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
@ -1163,18 +1167,26 @@ FocusScope {
|
|||
id: fontMetrics
|
||||
}
|
||||
Layout.preferredWidth: model.reduce((acc, label) => Math.max(acc, fontMetrics.boundingRect(label).width), 0) + 3.0 * Qt.application.font.pixelSize
|
||||
|
||||
onNameChanged: {
|
||||
root.source = getImageFile();
|
||||
root.metadata = getMetadata();
|
||||
}
|
||||
}
|
||||
|
||||
MaterialToolButton {
|
||||
property var activeNode: root.aliceVisionPluginAvailable && _reconstruction ? _reconstruction.activeNodes.get('allDepthMap').node : null
|
||||
enabled: activeNode
|
||||
ToolTip.text: "View Depth Map in 3D (" + (activeNode ? activeNode.label : "No DepthMap Node Selected") + ")"
|
||||
id: displayImageOutputIn3D
|
||||
enabled: root.aliceVisionPluginAvailable && _reconstruction && displayedNode && Filepath.basename(root.source).includes("depthMap")
|
||||
ToolTip.text: "View Depth Map in 3D"
|
||||
text: MaterialIcons.input
|
||||
font.pointSize: 11
|
||||
Layout.minimumWidth: 0
|
||||
|
||||
onClicked: {
|
||||
root.viewIn3D(root.getFileAttributePath(activeNode, "depth", _reconstruction.selectedViewId));
|
||||
root.viewIn3D(
|
||||
root.source,
|
||||
displayedNode.name + ":" + outputAttribute.name + " " + String(_reconstruction.selectedViewId)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue