Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 0 additions & 101 deletions meshroom/ui/qml/Viewer/Viewer2D.qml
Original file line number Diff line number Diff line change
Expand Up @@ -900,94 +900,6 @@ FocusScope {
}
}

// LightingCalibration: display circle
ExifOrientedViewer {
property var activeNode: _reconstruction.activeNodes.get("SphereDetection").node

anchors.centerIn: parent
orientationTag: imgContainer.orientationTag
xOrigin: imgContainer.width / 2
yOrigin: imgContainer.height / 2
active: displayLightingCircleLoader.checked && activeNode

sourceComponent: CircleGizmo {
property var jsonFolder: activeNode.attribute("output").value
property var json: null
property var currentViewId: _reconstruction.selectedViewId
property var nodeCircleX: activeNode.attribute("sphereCenter.x").value
property var nodeCircleY: activeNode.attribute("sphereCenter.y").value
property var nodeCircleRadius: activeNode.attribute("sphereRadius").value

width: imgContainer.width
height: imgContainer.height
readOnly: activeNode.attribute("autoDetect").value
circleX: nodeCircleX
circleY: nodeCircleY
circleRadius: nodeCircleRadius
circleBorder.width: Math.max(1, (3.0 / imgContainer.scale))

onJsonFolderChanged: {
json = null
if (activeNode.attribute("autoDetect").value) {
// Auto detection enabled
var jsonPath = activeNode.attribute("output").value
Request.get(Filepath.stringToUrl(jsonPath), function(xhr) {
if (xhr.readyState === XMLHttpRequest.DONE) {
try {
json = JSON.parse(xhr.responseText)
} catch(exc) {
console.warn("Failed to parse SphereDetection JSON file: " + jsonPath)
}
}
updateGizmo()
})
}
}

onCurrentViewIdChanged: { updateGizmo() }
onNodeCircleXChanged : { updateGizmo() }
onNodeCircleYChanged : { updateGizmo() }
onNodeCircleRadiusChanged : { updateGizmo() }

function updateGizmo() {
if (activeNode.attribute("autoDetect").value) {
// Update gizmo from auto detection JSON file
if (json) {
// JSON file found
var data = json[currentViewId]
if (data && data[0]) {
// Current view id found
circleX = data[0].x
circleY= data[0].y
circleRadius = data[0].r
return
}
}
// No auto detection data
circleX = -1
circleY= -1
circleRadius = 0
}
else {
// Update gizmo from node manual parameters
circleX = nodeCircleX
circleY = nodeCircleY
circleRadius = nodeCircleRadius
}
}

onMoved: {
_reconstruction.setAttribute(activeNode.attribute("sphereCenter"),
JSON.stringify([xoffset, yoffset]))
}

onIncrementRadius: {
_reconstruction.setAttribute(activeNode.attribute("sphereRadius"),
activeNode.attribute("sphereRadius").value + radiusOffset)
}
}
}

// ColorCheckerViewer: display color checker detection results
// Note: use a Loader to evaluate if a ColorCheckerDetection node exist and displayColorChecker checked at runtime
ExifOrientedViewer {
Expand Down Expand Up @@ -1634,19 +1546,6 @@ FocusScope {
visible: activeNode
}

MaterialToolButton {
id: displayLightingCircleLoader
property var activeNode: _reconstruction.activeNodes.get("SphereDetection").node
ToolTip.text: "Display Lighting Circle: " + (activeNode ? activeNode.label : "No Node")
text: MaterialIcons.location_searching
font.pointSize: 11
Layout.minimumWidth: 0
checkable: true
checked: false
enabled: activeNode
visible: activeNode
}

MaterialToolButton {
id: displayPhongLighting
property var activeNode: _reconstruction.activeNodes.get('PhotometricStereo').node
Expand Down
1 change: 0 additions & 1 deletion meshroom/ui/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ class Reconstruction(UIGraph):
"PhotometricStereo",
"PanoramaInit",
"ColorCheckerDetection",
"SphereDetection",
]

def __init__(self, undoStack: commands.UndoStack, taskManager: TaskManager, defaultPipeline: str="", parent: QObject=None):
Expand Down