diff --git a/BUILD_OSX.md b/BUILD_OSX.md index ccf32d71a8..2f9246f6a6 100644 --- a/BUILD_OSX.md +++ b/BUILD_OSX.md @@ -1,6 +1,6 @@ # Build OSX -*Last Updated on July 3, 2020* +*Last Updated on July 13, 2020* Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only macOS specific instructions are found in this document. @@ -28,7 +28,9 @@ For OpenSSL installed via homebrew, set OPENSSL_ROOT_DIR via ### Xcode -If Xcode is your editor of choice, you can ask CMake to generate Xcode project files instead of Unix Makefiles. +If Xcode is your editor of choice, you can ask CMake to generate Xcode project files instead of Unix Makefiles. You will need to select the Xcode installation in the terminal first if you have not done so already. + + sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer cmake .. -G Xcode diff --git a/cmake/ports/sranipal/portfile.cmake b/cmake/ports/sranipal/portfile.cmake index 2e6acea361..4c4d88e567 100644 --- a/cmake/ports/sranipal/portfile.cmake +++ b/cmake/ports/sranipal/portfile.cmake @@ -7,9 +7,9 @@ file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSE if (WIN32) vcpkg_download_distfile( SRANIPAL_SOURCE_ARCHIVE - URLS "${EXTERNAL_BUILD_ASSETS}/seth/sranipal-1.1.0.1-windows.zip" - SHA512 b09ce012abe4e3c71e8e69626bdd7823ff6576601a821ab365275f2764406a3e5f7b65fcf2eb1d0962eff31eb5958a148b00901f67c229dc6ace56eb5e6c9e1b - FILENAME sranipal-1.1.0.1-windows.zip + URLS "${EXTERNAL_BUILD_ASSETS}/seth/sranipal-1.1.0.1-2-windows.zip" + SHA512 f1f68f6beef52ae5e034bc3f44932ae0800ee187b75d80e76ae7b17b8ddd7bc54c039ce5594d231035e3caf3a61fed36f38621a860b4fb20170cb0176d9c28f0 + FILENAME sranipal-1.1.0.1-2-windows.zip ) vcpkg_extract_source_archive(${SRANIPAL_SOURCE_ARCHIVE}) diff --git a/interface/resources/qml/hifi/tablet/ControllerSettings.qml b/interface/resources/qml/hifi/tablet/ControllerSettings.qml index 5db784789e..ea694ae2d7 100644 --- a/interface/resources/qml/hifi/tablet/ControllerSettings.qml +++ b/interface/resources/qml/hifi/tablet/ControllerSettings.qml @@ -1,6 +1,7 @@ // // Created by Dante Ruiz on 6/1/17. // Copyright 2017 High Fidelity, Inc. +// Copyright 2020 Vircadia contributors. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -96,7 +97,8 @@ Item { HifiControls.ImageMessageBox { id: imageMessageBox - anchors.fill: parent + anchors.top: parent.top + anchors.topMargin: 444 z: 2000 imageWidth: 442 imageHeight: 670 @@ -179,7 +181,7 @@ Item { HifiControls.CheckBox { id: checkBox colorScheme: hifi.colorSchemes.dark - text: "show all input devices" + text: "Show all input devices" onClicked: { box.model = inputPlugins(); diff --git a/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml b/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml index a9d67fec35..f1275a39fb 100644 --- a/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml +++ b/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml @@ -1,6 +1,7 @@ // // Created by Dante Ruiz on 6/5/17. // Copyright 2017 High Fidelity, Inc. +// Copyright 2020 Vircadia contributors. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html @@ -71,6 +72,7 @@ Flickable { property int state: buttonState.disabled property var lastConfiguration: null + property bool isConfiguring: false HifiConstants { id: hifi } @@ -360,9 +362,9 @@ Flickable { RalewayRegular { id: info - text: "See Recommended Tracker Placement" + text: "See Recommended Placement" color: hifi.colors.blueHighlight - size: 10 + size: 12 anchors { left: additional.right leftMargin: 10 @@ -415,7 +417,6 @@ Flickable { id: feetBox width: 15 height: 15 - boxRadius: 7 onClicked: { if (!checked) { @@ -446,7 +447,6 @@ Flickable { id: hipBox width: 15 height: 15 - boxRadius: 7 onClicked: { if (checked) { @@ -486,7 +486,6 @@ Flickable { id: chestBox width: 15 height: 15 - boxRadius: 7 onClicked: { if (checked) { @@ -524,7 +523,6 @@ Flickable { id: shoulderBox width: 15 height: 15 - boxRadius: 7 onClicked: { if (checked) { @@ -823,7 +821,6 @@ Flickable { id: viveInDesktop width: 15 height: 15 - boxRadius: 7 anchors.top: advanceSettings.bottom anchors.topMargin: 5 @@ -840,9 +837,71 @@ Flickable { } } + + HifiControls.CheckBox { + id: eyeTracking + width: 15 + height: 15 + + anchors.top: viveInDesktop.bottom + anchors.topMargin: 5 + anchors.left: openVrConfiguration.left + anchors.leftMargin: leftMargin + 10 + + onClicked: { + sendConfigurationSettings(); + } + } + + RalewayBold { + id: eyeTrackingLabel + size: 12 + text: "Use eye tracking (if available)." + color: hifi.colors.lightGrayText + anchors { + left: eyeTracking.right + leftMargin: 5 + verticalCenter: eyeTracking.verticalCenter + } + } + + RalewayRegular { + id: privacyPolicy + text: "Privacy Policy" + color: hifi.colors.blueHighlight + size: 12 + anchors { + left: eyeTrackingLabel.right + leftMargin: 10 + verticalCenter: eyeTrackingLabel.verticalCenter + } + + Rectangle { + id: privacyPolicyUnderline + color: hifi.colors.blueHighlight + width: privacyPolicy.width + height: 1 + anchors { + top: privacyPolicy.bottom + topMargin: 1 + left: privacyPolicy.left + } + visible: false + } + + MouseArea { + anchors.fill: parent; + hoverEnabled: true + onEntered: privacyPolicyUnderline.visible = true; + onExited: privacyPolicyUnderline.visible = false; + onClicked: HiFiAbout.openUrl("https://vircadia.com/privacy-policy"); + } + } + + Row { id: outOfRangeDataStrategyRow - anchors.top: viveInDesktop.bottom + anchors.top: eyeTracking.bottom anchors.topMargin: 5 anchors.left: openVrConfiguration.left anchors.leftMargin: leftMargin + 10 @@ -966,6 +1025,8 @@ Flickable { } function displayConfiguration() { + isConfiguring = true; + var settings = InputConfiguration.configurationSettings(openVrConfiguration.pluginName); var configurationType = settings["trackerConfiguration"]; displayTrackerConfiguration(configurationType); @@ -982,6 +1043,7 @@ Flickable { var viveController = settings["handController"]; var desktopMode = settings["desktopMode"]; var hmdDesktopPosition = settings["hmdDesktopTracking"]; + var eyeTrackingEnabled = settings["eyeTrackingEnabled"]; armCircumference.realValue = settings.armCircumference; shoulderWidth.realValue = settings.shoulderWidth; @@ -1004,6 +1066,7 @@ Flickable { viveInDesktop.checked = desktopMode; hmdInDesktop.checked = hmdDesktopPosition; + eyeTracking.checked = eyeTrackingEnabled; outOfRangeDataStrategyComboBox.currentIndex = outOfRangeDataStrategyComboBox.model.indexOf(settings.outOfRangeDataStrategy); initializeButtonState(); @@ -1014,6 +1077,8 @@ Flickable { }; UserActivityLogger.logAction("mocap_ui_open_dialog", data); + + isConfiguring = false; } function displayTrackerConfiguration(type) { @@ -1170,6 +1235,7 @@ Flickable { "shoulderWidth": shoulderWidth.realValue, "desktopMode": viveInDesktop.checked, "hmdDesktopTracking": hmdInDesktop.checked, + "eyeTrackingEnabled": eyeTracking.checked, "outOfRangeDataStrategy": outOfRangeDataStrategyComboBox.model[outOfRangeDataStrategyComboBox.currentIndex] } @@ -1177,6 +1243,10 @@ Flickable { } function sendConfigurationSettings() { + if (isConfiguring) { + // Ignore control value changes during dialog initialization. + return; + } var settings = composeConfigurationSettings(); InputConfiguration.setConfigurationSettings(settings, openVrConfiguration.pluginName); updateCalibrationButton(); diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp index 37871a8c4c..3629698e11 100644 --- a/plugins/openvr/src/ViveControllerManager.cpp +++ b/plugins/openvr/src/ViveControllerManager.cpp @@ -264,6 +264,10 @@ void ViveControllerManager::setConfigurationSettings(const QJsonObject configura _hmdDesktopTracking = configurationSettings["hmdDesktopTracking"].toBool(); } + if (configurationSettings.contains("eyeTrackingEnabled")) { + _eyeTrackingEnabled = configurationSettings["eyeTrackingEnabled"].toBool(); + } + _inputDevice->configureCalibrationSettings(configurationSettings); saveSettings(); } @@ -274,6 +278,7 @@ QJsonObject ViveControllerManager::configurationSettings() { QJsonObject configurationSettings = _inputDevice->configurationSettings(); configurationSettings["desktopMode"] = _desktopMode; configurationSettings["hmdDesktopTracking"] = _hmdDesktopTracking; + configurationSettings["eyeTrackingEnabled"] = _eyeTrackingEnabled; return configurationSettings; } @@ -793,7 +798,7 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu } #ifdef VIVE_PRO_EYE - if (_viveProEye) { + if (_viveProEye && _eyeTrackingEnabled) { updateEyeTracker(deltaTime, inputCalibrationData); } @@ -815,6 +820,9 @@ void ViveControllerManager::loadSettings() { _inputDevice->_shoulderWidth = settings.value("shoulderWidth", QVariant(DEFAULT_SHOULDER_WIDTH)).toDouble(); _inputDevice->_outOfRangeDataStrategy = stringToOutOfRangeDataStrategy(settings.value("outOfRangeDataStrategy", QVariant(DEFAULT_OUT_OF_RANGE_STRATEGY)).toString()); } + + const bool DEFAULT_EYE_TRACKING_ENABLED = false; + _eyeTrackingEnabled = settings.value("eyeTrackingEnabled", QVariant(DEFAULT_EYE_TRACKING_ENABLED)).toBool(); } settings.endGroup(); } @@ -829,6 +837,8 @@ void ViveControllerManager::saveSettings() const { settings.setValue(QString("shoulderWidth"), _inputDevice->_shoulderWidth); settings.setValue(QString("outOfRangeDataStrategy"), outOfRangeDataStrategyToString(_inputDevice->_outOfRangeDataStrategy)); } + + settings.setValue(QString("eyeTrackingEnabled"), _eyeTrackingEnabled); } settings.endGroup(); } @@ -857,6 +867,9 @@ void ViveControllerManager::InputDevice::update(float deltaTime, const controlle if (_headsetName == "HTC") { _headsetName += " Vive"; } + if (oculusViaOpenVR()) { + _headsetName = "OpenVR"; // Enables calibration dialog to function when debugging using Oculus. + } } // While the keyboard is open, we defer strictly to the keyboard values if (isOpenVrKeyboardShown()) { diff --git a/plugins/openvr/src/ViveControllerManager.h b/plugins/openvr/src/ViveControllerManager.h index 4cd1f46dfb..956b2b5eaf 100644 --- a/plugins/openvr/src/ViveControllerManager.h +++ b/plugins/openvr/src/ViveControllerManager.h @@ -262,6 +262,8 @@ private: vr::IVRSystem* _system { nullptr }; std::shared_ptr _inputDevice { std::make_shared(_system) }; + bool _eyeTrackingEnabled{ false }; + #ifdef VIVE_PRO_EYE bool _viveProEye { false }; std::shared_ptr _viveProEyeReadThread; diff --git a/scripts/communityScripts/explore/explore.js b/scripts/communityScripts/explore/explore.js index 74158580ec..589bc5cde8 100644 --- a/scripts/communityScripts/explore/explore.js +++ b/scripts/communityScripts/explore/explore.js @@ -42,7 +42,8 @@ ui = new AppUi({ buttonName: "EXPLORE", home: Script.resolvePath("explore.html"), - graphicsDirectory: scriptDir + graphicsDirectory: scriptDir, + sortOrder: 8 }); }