@@ -900,94 +900,6 @@ FocusScope {
900900 }
901901 }
902902
903- // LightingCalibration: display circle
904- ExifOrientedViewer {
905- property var activeNode: _reconstruction .activeNodes .get (" SphereDetection" ).node
906-
907- anchors .centerIn : parent
908- orientationTag: imgContainer .orientationTag
909- xOrigin: imgContainer .width / 2
910- yOrigin: imgContainer .height / 2
911- active: displayLightingCircleLoader .checked && activeNode
912-
913- sourceComponent: CircleGizmo {
914- property var jsonFolder: activeNode .attribute (" output" ).value
915- property var json: null
916- property var currentViewId: _reconstruction .selectedViewId
917- property var nodeCircleX: activeNode .attribute (" sphereCenter.x" ).value
918- property var nodeCircleY: activeNode .attribute (" sphereCenter.y" ).value
919- property var nodeCircleRadius: activeNode .attribute (" sphereRadius" ).value
920-
921- width: imgContainer .width
922- height: imgContainer .height
923- readOnly: activeNode .attribute (" autoDetect" ).value
924- circleX: nodeCircleX
925- circleY: nodeCircleY
926- circleRadius: nodeCircleRadius
927- circleBorder .width : Math .max (1 , (3.0 / imgContainer .scale ))
928-
929- onJsonFolderChanged: {
930- json = null
931- if (activeNode .attribute (" autoDetect" ).value ) {
932- // Auto detection enabled
933- var jsonPath = activeNode .attribute (" output" ).value
934- Request .get (Filepath .stringToUrl (jsonPath), function (xhr ) {
935- if (xhr .readyState === XMLHttpRequest .DONE ) {
936- try {
937- json = JSON .parse (xhr .responseText )
938- } catch (exc) {
939- console .warn (" Failed to parse SphereDetection JSON file: " + jsonPath)
940- }
941- }
942- updateGizmo ()
943- })
944- }
945- }
946-
947- onCurrentViewIdChanged: { updateGizmo () }
948- onNodeCircleXChanged : { updateGizmo () }
949- onNodeCircleYChanged : { updateGizmo () }
950- onNodeCircleRadiusChanged : { updateGizmo () }
951-
952- function updateGizmo () {
953- if (activeNode .attribute (" autoDetect" ).value ) {
954- // Update gizmo from auto detection JSON file
955- if (json) {
956- // JSON file found
957- var data = json[currentViewId]
958- if (data && data[0 ]) {
959- // Current view id found
960- circleX = data[0 ].x
961- circleY= data[0 ].y
962- circleRadius = data[0 ].r
963- return
964- }
965- }
966- // No auto detection data
967- circleX = - 1
968- circleY= - 1
969- circleRadius = 0
970- }
971- else {
972- // Update gizmo from node manual parameters
973- circleX = nodeCircleX
974- circleY = nodeCircleY
975- circleRadius = nodeCircleRadius
976- }
977- }
978-
979- onMoved: {
980- _reconstruction .setAttribute (activeNode .attribute (" sphereCenter" ),
981- JSON .stringify ([xoffset, yoffset]))
982- }
983-
984- onIncrementRadius: {
985- _reconstruction .setAttribute (activeNode .attribute (" sphereRadius" ),
986- activeNode .attribute (" sphereRadius" ).value + radiusOffset)
987- }
988- }
989- }
990-
991903 // ColorCheckerViewer: display color checker detection results
992904 // Note: use a Loader to evaluate if a ColorCheckerDetection node exist and displayColorChecker checked at runtime
993905 ExifOrientedViewer {
@@ -1634,19 +1546,6 @@ FocusScope {
16341546 visible: activeNode
16351547 }
16361548
1637- MaterialToolButton {
1638- id: displayLightingCircleLoader
1639- property var activeNode: _reconstruction .activeNodes .get (" SphereDetection" ).node
1640- ToolTip .text : " Display Lighting Circle: " + (activeNode ? activeNode .label : " No Node" )
1641- text: MaterialIcons .location_searching
1642- font .pointSize : 11
1643- Layout .minimumWidth : 0
1644- checkable: true
1645- checked: false
1646- enabled: activeNode
1647- visible: activeNode
1648- }
1649-
16501549 MaterialToolButton {
16511550 id: displayPhongLighting
16521551 property var activeNode: _reconstruction .activeNodes .get (' PhotometricStereo' ).node
0 commit comments