From 101ec9d7539d1fdf882d4d66f5c292f901deab41 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 4 Nov 2019 09:49:24 -0800 Subject: [PATCH 01/14] Remove LipsUpperOpen and LipsLowerOpen, the last of the legacy faceshift blendshapes These blendshapes are not present in ARKit and are not used by any of our procedural face animations (talking, blinking etc). This change should have been part of #16400 but was accidently left out. --- interface/resources/controllers/standard.json | 2 -- interface/resources/controllers/standard_nomovement.json | 2 -- interface/src/avatar/MyHead.cpp | 2 -- libraries/controllers/src/controllers/Actions.cpp | 2 -- libraries/controllers/src/controllers/Actions.h | 2 -- libraries/controllers/src/controllers/StandardController.cpp | 2 -- libraries/controllers/src/controllers/StandardControls.h | 2 -- libraries/shared/src/BlendshapeConstants.cpp | 2 -- libraries/shared/src/BlendshapeConstants.h | 5 +++-- 9 files changed, 3 insertions(+), 18 deletions(-) diff --git a/interface/resources/controllers/standard.json b/interface/resources/controllers/standard.json index b6cb4e3e27..aa995c6ecb 100644 --- a/interface/resources/controllers/standard.json +++ b/interface/resources/controllers/standard.json @@ -201,8 +201,6 @@ { "from": "Standard.LipsStretch_R", "to": "Actions.LipsStretch_R" }, { "from": "Standard.LipsUpperClose", "to": "Actions.LipsUpperClose" }, { "from": "Standard.LipsLowerClose", "to": "Actions.LipsLowerClose" }, - { "from": "Standard.LipsUpperOpen", "to": "Actions.LipsUpperOpen" }, - { "from": "Standard.LipsLowerOpen", "to": "Actions.LipsLowerOpen" }, { "from": "Standard.LipsFunnel", "to": "Actions.LipsFunnel" }, { "from": "Standard.LipsPucker", "to": "Actions.LipsPucker" }, { "from": "Standard.Puff", "to": "Actions.Puff" }, diff --git a/interface/resources/controllers/standard_nomovement.json b/interface/resources/controllers/standard_nomovement.json index 04c0d2f329..9e1437d2e8 100644 --- a/interface/resources/controllers/standard_nomovement.json +++ b/interface/resources/controllers/standard_nomovement.json @@ -96,8 +96,6 @@ { "from": "Standard.LipsStretch_R", "to": "Actions.LipsStretch_R" }, { "from": "Standard.LipsUpperClose", "to": "Actions.LipsUpperClose" }, { "from": "Standard.LipsLowerClose", "to": "Actions.LipsLowerClose" }, - { "from": "Standard.LipsUpperOpen", "to": "Actions.LipsUpperOpen" }, - { "from": "Standard.LipsLowerOpen", "to": "Actions.LipsLowerOpen" }, { "from": "Standard.LipsFunnel", "to": "Actions.LipsFunnel" }, { "from": "Standard.LipsPucker", "to": "Actions.LipsPucker" }, { "from": "Standard.Puff", "to": "Actions.Puff" }, diff --git a/interface/src/avatar/MyHead.cpp b/interface/src/avatar/MyHead.cpp index a0e70a3049..1b88a518c8 100644 --- a/interface/src/avatar/MyHead.cpp +++ b/interface/src/avatar/MyHead.cpp @@ -57,8 +57,6 @@ static controller::Action blendshapeActions[] = { controller::Action::LIPSSTRETCH_R, controller::Action::LIPSUPPERCLOSE, controller::Action::LIPSLOWERCLOSE, - controller::Action::LIPSUPPEROPEN, - controller::Action::LIPSLOWEROPEN, controller::Action::LIPSFUNNEL, controller::Action::LIPSPUCKER, controller::Action::PUFF, diff --git a/libraries/controllers/src/controllers/Actions.cpp b/libraries/controllers/src/controllers/Actions.cpp index 36f454b5d0..30f4181b43 100644 --- a/libraries/controllers/src/controllers/Actions.cpp +++ b/libraries/controllers/src/controllers/Actions.cpp @@ -386,8 +386,6 @@ namespace controller { makeAxisPair(Action::LIPSSTRETCH_R, "LipsStretch_R"), makeAxisPair(Action::LIPSUPPERCLOSE, "LipsUpperClose"), makeAxisPair(Action::LIPSLOWERCLOSE, "LipsLowerClose"), - makeAxisPair(Action::LIPSUPPEROPEN, "LipsUpperOpen"), - makeAxisPair(Action::LIPSLOWEROPEN, "LipsLowerOpen"), makeAxisPair(Action::LIPSFUNNEL, "LipsFunnel"), makeAxisPair(Action::LIPSPUCKER, "LipsPucker"), makeAxisPair(Action::PUFF, "Puff"), diff --git a/libraries/controllers/src/controllers/Actions.h b/libraries/controllers/src/controllers/Actions.h index 5c96923dc3..6868483a14 100644 --- a/libraries/controllers/src/controllers/Actions.h +++ b/libraries/controllers/src/controllers/Actions.h @@ -220,8 +220,6 @@ enum class Action { LIPSSTRETCH_R, LIPSUPPERCLOSE, LIPSLOWERCLOSE, - LIPSUPPEROPEN, - LIPSLOWEROPEN, LIPSFUNNEL, LIPSPUCKER, PUFF, diff --git a/libraries/controllers/src/controllers/StandardController.cpp b/libraries/controllers/src/controllers/StandardController.cpp index 936f1c391f..41835223ea 100644 --- a/libraries/controllers/src/controllers/StandardController.cpp +++ b/libraries/controllers/src/controllers/StandardController.cpp @@ -392,8 +392,6 @@ Input::NamedVector StandardController::getAvailableInputs() const { makePair(LIPSSTRETCH_R, "LipsStretch_R"), makePair(LIPSUPPERCLOSE, "LipsUpperClose"), makePair(LIPSLOWERCLOSE, "LipsLowerClose"), - makePair(LIPSUPPEROPEN, "LipsUpperOpen"), - makePair(LIPSLOWEROPEN, "LipsLowerOpen"), makePair(LIPSFUNNEL, "LipsFunnel"), makePair(LIPSPUCKER, "LipsPucker"), makePair(PUFF, "Puff"), diff --git a/libraries/controllers/src/controllers/StandardControls.h b/libraries/controllers/src/controllers/StandardControls.h index 965c095187..051f6dcc3a 100644 --- a/libraries/controllers/src/controllers/StandardControls.h +++ b/libraries/controllers/src/controllers/StandardControls.h @@ -127,8 +127,6 @@ namespace controller { LIPSSTRETCH_R, LIPSUPPERCLOSE, LIPSLOWERCLOSE, - LIPSUPPEROPEN, - LIPSLOWEROPEN, LIPSFUNNEL, LIPSPUCKER, PUFF, diff --git a/libraries/shared/src/BlendshapeConstants.cpp b/libraries/shared/src/BlendshapeConstants.cpp index 91b68ed8a9..172df461fd 100644 --- a/libraries/shared/src/BlendshapeConstants.cpp +++ b/libraries/shared/src/BlendshapeConstants.cpp @@ -47,8 +47,6 @@ const char* FACESHIFT_BLENDSHAPES[] = { "LipsStretch_R", "LipsUpperClose", "LipsLowerClose", - "LipsUpperOpen", - "LipsLowerOpen", "LipsFunnel", "LipsPucker", "Puff", diff --git a/libraries/shared/src/BlendshapeConstants.h b/libraries/shared/src/BlendshapeConstants.h index 8db29856c3..e74146eb56 100644 --- a/libraries/shared/src/BlendshapeConstants.h +++ b/libraries/shared/src/BlendshapeConstants.h @@ -51,8 +51,6 @@ enum class Blendshapes : int { LipsStretch_R, LipsUpperClose, LipsLowerClose, - LipsUpperOpen, - LipsLowerOpen, LipsFunnel, LipsPucker, Puff, @@ -114,5 +112,8 @@ enum class LegacyBlendshpaes : int { // * Sneer (split in ARKit) // * ChinLowerRaise (not in ARKit) // * ChinUpperRaise (not in ARKit) +// * LipsUpperOpen (not in ARKit) +// * LipsLowerOpen (not in ARKit) + #endif // hifi_BlendshapeConstants_h From 821a46697af082c2bff4fe37304563c49398d8b0 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 4 Nov 2019 10:55:05 -0800 Subject: [PATCH 02/14] Update fixUpLegacyBlendshapes as well --- libraries/fbx/src/FSTReader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/fbx/src/FSTReader.cpp b/libraries/fbx/src/FSTReader.cpp index 2835151bfe..b647fe2e7f 100644 --- a/libraries/fbx/src/FSTReader.cpp +++ b/libraries/fbx/src/FSTReader.cpp @@ -82,6 +82,8 @@ static void fixUpLegacyBlendshapes(QVariantHash& properties) { removeBlendshape(bs, "JawChew"); removeBlendshape(bs, "ChinLowerRaise"); removeBlendshape(bs, "ChinUpperRaise"); + removeBlendshape(bs, "LipsUpperOpen"); + removeBlendshape(bs, "LipsLowerOpen"); // These blendshapes are split in ARKit, we replace them with their left and right sides with a weight of 1/2. splitBlendshapes(bs, "LipsUpperUp", "MouthUpperUp_L", "MouthUpperUp_R"); From de2d2de938b1305560335cb5c42d74c280ce42e3 Mon Sep 17 00:00:00 2001 From: luiscuenca Date: Mon, 4 Nov 2019 13:33:00 -0700 Subject: [PATCH 03/14] Head woes in 1st person part 2 --- interface/src/avatar/MyAvatar.cpp | 29 ++++++++++++++++++++--------- interface/src/avatar/MyAvatar.h | 1 + 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 7c730e865b..2522d0e4c6 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -3452,7 +3452,7 @@ void MyAvatar::updateOrientation(float deltaTime) { bool isCameraYawing = getDriveKey(DELTA_YAW) + getDriveKey(STEP_YAW) + getDriveKey(YAW) != 0.0f; bool isRotatingWhileSeated = !isCameraYawing && isMovingSideways && _characterController.getSeated(); glm::quat previousOrientation = getWorldOrientation(); - + glm::quat previousYaw = _lookAtYaw; if (!computeLookAt) { setWorldOrientation(getWorldOrientation() * glm::quat(glm::radians(glm::vec3(0.0f, totalBodyYaw, 0.0f)))); _lookAtCameraTarget = eyesPosition + getWorldOrientation() * Vectors::FRONT; @@ -3462,6 +3462,7 @@ void MyAvatar::updateOrientation(float deltaTime) { // Compute new look at vectors if (totalBodyYaw != 0.0f) { _lookAtYaw = _lookAtYaw * glm::quat(glm::radians(glm::vec3(0.0f, totalBodyYaw, 0.0f))); + _lookAtYawSpeed = glm::degrees(glm::angle(_lookAtYaw * glm::inverse(previousYaw))) / deltaTime; } float pitchIncrement = getDriveKey(PITCH) * _pitchSpeed * deltaTime + getDriveKey(DELTA_PITCH) * _pitchSpeed / PITCH_SPEED_DEFAULT; @@ -3482,7 +3483,19 @@ void MyAvatar::updateOrientation(float deltaTime) { const float REORIENT_FORWARD_BLEND = 0.25f; const float REORIENT_TURN_BLEND = 0.03f; const float DIAGONAL_TURN_BLEND = 0.1f; + const float AVATAR_TURNS_TO_CAM_IN_SPEED = 130.0f; // Degrees per second + const float AVATAR_TURNS_TO_CAM_OUT_SPEED = 720.0f; // Degrees per second + float blend = (_shouldTurnToFaceCamera ? REORIENT_TURN_BLEND : REORIENT_FORWARD_BLEND) * timeScale; + if (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT && _lookAtYawSpeed > AVATAR_TURNS_TO_CAM_IN_SPEED) { + // When the camera is rotating fast we should accelerate the avatar's face forward speed + // to avoid showing the cauterized head; + float cameraYawSpeed = glm::min(_lookAtYawSpeed, AVATAR_TURNS_TO_CAM_OUT_SPEED); + float blendFactor = REORIENT_TURN_BLEND + REORIENT_FORWARD_BLEND * ((cameraYawSpeed - AVATAR_TURNS_TO_CAM_IN_SPEED) / + (AVATAR_TURNS_TO_CAM_OUT_SPEED - AVATAR_TURNS_TO_CAM_IN_SPEED)); + blend = glm::min(1.0f, blendFactor * timeScale); + } + if (blend > 1.0f) { blend = 1.0f; } @@ -3573,7 +3586,6 @@ void MyAvatar::updateOrientation(float deltaTime) { if (frontBackDot < limitAngle) { if (frontBackDot < 0.0f) { ajustedYawVector = (leftRightDot < 0.0f ? -avatarVectorRight : avatarVectorRight); - cameraVector = (ajustedYawVector * _lookAtPitch) * Vectors::FRONT; } if (!isRotatingWhileSeated) { if (frontBackDot < triggerAngle) { @@ -6762,19 +6774,18 @@ glm::vec3 MyAvatar::getLookAtPivotPoint() { glm::vec3 MyAvatar::getCameraEyesPosition(float deltaTime) { glm::vec3 defaultEyesPosition = getLookAtPivotPoint(); - if (isFlying()) { - return defaultEyesPosition; - } + glm::vec3 avatarFrontVector = getWorldOrientation() * Vectors::FRONT; glm::vec3 avatarUpVector = getWorldOrientation() * Vectors::UP; // Compute the offset between the default and real eye positions. glm::vec3 defaultEyesToEyesVector = getHead()->getEyePosition() - defaultEyesPosition; - float FRONT_OFFSET_IDLE_MULTIPLIER = 2.5f; - float FRONT_OFFSET_JUMP_MULTIPLIER = 1.5f; + const float FRONT_OFFSET_IDLE_MULTIPLIER = 3.5f; + const float FRONT_OFFSET_JUMP_MULTIPLIER = 1.5f; float frontOffset = FRONT_OFFSET_IDLE_MULTIPLIER * glm::length(defaultEyesPosition - getDefaultEyePosition()); - - // Looking down will aproximate move the camera forward to meet the real eye position + + // Looking down will move the camera forward to meet the real eye position float mixAlpha = glm::dot(_lookAtPitch * Vectors::FRONT, -avatarUpVector); + bool isLanding = false; // When jumping the camera should follow the real eye on the Y coordenate float upOffset = 0.0f; diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 4d0dea61c1..5a59e6129a 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -2693,6 +2693,7 @@ private: const float MAX_LOOK_AT_TIME_SCRIPT_CONTROL = 2.0f; glm::quat _lookAtPitch; glm::quat _lookAtYaw; + float _lookAtYawSpeed { 0.0f }; glm::vec3 _lookAtCameraTarget; glm::vec3 _lookAtScriptTarget; bool _headLookAtActive { false }; From b2ab33116fc402284d0053084b7247f3e22806a4 Mon Sep 17 00:00:00 2001 From: amer cerkic Date: Mon, 4 Nov 2019 15:03:53 -0800 Subject: [PATCH 04/14] removing double calls to switch devices, handling default changes from scripting interface instead --- interface/src/scripting/AudioDevices.cpp | 92 ++++++------------- libraries/audio-client/src/AudioClient.cpp | 28 +----- libraries/audio-client/src/AudioClient.h | 2 - .../audio-client/src/HifiAudioDeviceInfo.cpp | 1 + .../audio-client/src/HifiAudioDeviceInfo.h | 5 +- 5 files changed, 34 insertions(+), 94 deletions(-) diff --git a/interface/src/scripting/AudioDevices.cpp b/interface/src/scripting/AudioDevices.cpp index 688b4df8cd..31b3e9ecee 100644 --- a/interface/src/scripting/AudioDevices.cpp +++ b/interface/src/scripting/AudioDevices.cpp @@ -287,18 +287,19 @@ void AudioDeviceList::onDevicesChanged(QAudio::Mode mode, const QListinfo.deviceName() == device.info.deviceName()) { - isNewDevice = false; - break; - } - } - - if (isNewDevice) { - emit selectedDevicePlugged(device.info, isHMD); - } } } @@ -403,6 +386,15 @@ void AudioDeviceList::onDevicesChanged(QAudio::Mode mode, const QListgetActiveAudioDevice(QAudio::AudioInput), contextIsHMD); - _outputs.onDeviceChanged(client->getActiveAudioDevice(QAudio::AudioOutput), contextIsHMD); - - // connections are made after client is initialized, so we must also fetch the devices - const QList& devicesInput = client->getAudioDevices(QAudio::AudioInput); - const QList& devicesOutput = client->getAudioDevices(QAudio::AudioOutput); - - if (devicesInput.size() > 0 && devicesOutput.size() > 0) { - //setup devices - _inputs.onDevicesChanged(QAudio::AudioInput, devicesInput); - _outputs.onDevicesChanged(QAudio::AudioOutput, devicesOutput); - } } AudioDevices::~AudioDevices() {} @@ -526,29 +505,12 @@ void AudioDevices::onDevicesChanged(QAudio::Mode mode, const QList().data(); - _inputs._hmdSavedDeviceName = getTargetDevice(true, QAudio::AudioInput); _inputs._desktopSavedDeviceName = getTargetDevice(false, QAudio::AudioInput); - //fallback to default device - if (_inputs._desktopSavedDeviceName.isEmpty()) { - _inputs._desktopSavedDeviceName = client->getActiveAudioDevice(QAudio::AudioInput).deviceName(); - } - //fallback to desktop device - if (_inputs._hmdSavedDeviceName.isEmpty()) { - _inputs._hmdSavedDeviceName = _inputs._desktopSavedDeviceName; - } - _outputs._hmdSavedDeviceName = getTargetDevice(true, QAudio::AudioOutput); _outputs._desktopSavedDeviceName = getTargetDevice(false, QAudio::AudioOutput); - if (_outputs._desktopSavedDeviceName.isEmpty()) { - _outputs._desktopSavedDeviceName = client->getActiveAudioDevice(QAudio::AudioOutput).deviceName(); - } - if (_outputs._hmdSavedDeviceName.isEmpty()) { - _outputs._hmdSavedDeviceName = _outputs._desktopSavedDeviceName; - } onContextChanged(QString()); }); diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index d6faea4396..61e0a37161 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -153,9 +153,6 @@ void AudioClient::checkDevices() { auto inputDevices = getAvailableDevices(QAudio::AudioInput, hmdInputName); auto outputDevices = getAvailableDevices(QAudio::AudioOutput, hmdOutputName); - checkDefaultChanges(inputDevices); - checkDefaultChanges(outputDevices); - Lock lock(_deviceMutex); if (inputDevices != _inputDevices) { _inputDevices.swap(inputDevices); @@ -168,14 +165,6 @@ void AudioClient::checkDevices() { } } -void AudioClient::checkDefaultChanges(QList& devices) { - foreach(auto device, devices) { - if (device.isDefault()) { - QMetaObject::invokeMethod(this, "changeDefault", Q_ARG(HifiAudioDeviceInfo, device), Q_ARG(QAudio::Mode, device.getMode())); - } - } -} - HifiAudioDeviceInfo AudioClient::getActiveAudioDevice(QAudio::Mode mode) const { Lock lock(_deviceMutex); @@ -996,13 +985,6 @@ void AudioClient::selectAudioFormat(const QString& selectedCodecName) { } -void AudioClient::changeDefault(HifiAudioDeviceInfo newDefault, QAudio::Mode mode) { - HifiAudioDeviceInfo currentDevice = mode == QAudio::AudioInput ? _inputDeviceInfo : _outputDeviceInfo; - if (currentDevice.isDefault() && currentDevice.getDeviceType() == newDefault.getDeviceType() && currentDevice.getDevice() != newDefault.getDevice()) { - switchAudioDevice(mode, newDefault); - } -} - bool AudioClient::switchAudioDevice(QAudio::Mode mode, const HifiAudioDeviceInfo& deviceInfo) { auto device = deviceInfo; if (deviceInfo.getDevice().isNull()) { @@ -1883,11 +1865,8 @@ bool AudioClient::switchInputToAudioDevice(const HifiAudioDeviceInfo inputDevice qCDebug(audioclient) << "The audio input device" << inputDeviceInfo.deviceName() << ":" << inputDeviceInfo.getDevice().deviceName() << "is available."; //do not update UI that we're changing devices if default or same device - bool doEmit = _inputDeviceInfo.deviceName() != inputDeviceInfo.deviceName(); _inputDeviceInfo = inputDeviceInfo; - if (doEmit) { - emit deviceChanged(QAudio::AudioInput, _inputDeviceInfo); - } + emit deviceChanged(QAudio::AudioInput, _inputDeviceInfo); if (adjustedFormatForAudioDevice(_inputDeviceInfo.getDevice(), _desiredInputFormat, _inputFormat)) { qCDebug(audioclient) << "The format to be used for audio input is" << _inputFormat; @@ -2125,11 +2104,8 @@ bool AudioClient::switchOutputToAudioDevice(const HifiAudioDeviceInfo outputDevi qCDebug(audioclient) << "The audio output device" << outputDeviceInfo.deviceName() << ":" << outputDeviceInfo.getDevice().deviceName() << "is available."; //do not update UI that we're changing devices if default or same device - bool doEmit = _outputDeviceInfo.deviceName() != outputDeviceInfo.deviceName(); _outputDeviceInfo = outputDeviceInfo; - if (doEmit) { - emit deviceChanged(QAudio::AudioOutput, _outputDeviceInfo); - } + emit deviceChanged(QAudio::AudioOutput, _outputDeviceInfo); if (adjustedFormatForAudioDevice(_outputDeviceInfo.getDevice(), _desiredOutputFormat, _outputFormat)) { qCDebug(audioclient) << "The format to be used for audio output is" << _outputFormat; diff --git a/libraries/audio-client/src/AudioClient.h b/libraries/audio-client/src/AudioClient.h index dafa81081c..e31b4789ce 100644 --- a/libraries/audio-client/src/AudioClient.h +++ b/libraries/audio-client/src/AudioClient.h @@ -237,8 +237,6 @@ public slots: int setOutputBufferSize(int numFrames, bool persist = true); bool shouldLoopbackInjectors() override { return _shouldEchoToServer; } - Q_INVOKABLE void changeDefault(HifiAudioDeviceInfo newDefault, QAudio::Mode mode); - void checkDefaultChanges(QList& devices); // calling with a null QAudioDevice will use the system default bool switchAudioDevice(QAudio::Mode mode, const HifiAudioDeviceInfo& deviceInfo = HifiAudioDeviceInfo()); diff --git a/libraries/audio-client/src/HifiAudioDeviceInfo.cpp b/libraries/audio-client/src/HifiAudioDeviceInfo.cpp index 73d0670fa6..2a4c9065f4 100644 --- a/libraries/audio-client/src/HifiAudioDeviceInfo.cpp +++ b/libraries/audio-client/src/HifiAudioDeviceInfo.cpp @@ -23,6 +23,7 @@ HifiAudioDeviceInfo& HifiAudioDeviceInfo::operator=(const HifiAudioDeviceInfo& o _mode = other.getMode(); _isDefault = other.isDefault(); _deviceType = other.getDeviceType(); + _debugName = other.getDevice().deviceName(); return *this; } diff --git a/libraries/audio-client/src/HifiAudioDeviceInfo.h b/libraries/audio-client/src/HifiAudioDeviceInfo.h index 5bc7125574..ddf5493241 100644 --- a/libraries/audio-client/src/HifiAudioDeviceInfo.h +++ b/libraries/audio-client/src/HifiAudioDeviceInfo.h @@ -35,13 +35,15 @@ public: _mode = deviceInfo.getMode(); _isDefault = deviceInfo.isDefault(); _deviceType = deviceInfo.getDeviceType(); + _debugName = deviceInfo.getDevice().deviceName(); } HifiAudioDeviceInfo(QAudioDeviceInfo deviceInfo, bool isDefault, QAudio::Mode mode, DeviceType devType=both) : _audioDeviceInfo(deviceInfo), _isDefault(isDefault), _mode(mode), - _deviceType(devType){ + _deviceType(devType), + _debugName(deviceInfo.deviceName()) { } void setMode(QAudio::Mode mode) { _mode = mode; } @@ -70,6 +72,7 @@ private: bool _isDefault { false }; QAudio::Mode _mode { QAudio::AudioInput }; DeviceType _deviceType{ both }; + QString _debugName; public: static const QString DEFAULT_DEVICE_NAME; From 81881acafcdf86473706608d22f18a07c3e33064 Mon Sep 17 00:00:00 2001 From: amer cerkic Date: Mon, 4 Nov 2019 15:08:06 -0800 Subject: [PATCH 05/14] fixing a few spacing issues --- interface/src/scripting/AudioDevices.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/scripting/AudioDevices.cpp b/interface/src/scripting/AudioDevices.cpp index 31b3e9ecee..57d4865eed 100644 --- a/interface/src/scripting/AudioDevices.cpp +++ b/interface/src/scripting/AudioDevices.cpp @@ -350,7 +350,8 @@ void AudioDeviceList::onDevicesChanged(QAudio::Mode mode, const QList Date: Mon, 4 Nov 2019 15:44:15 -0800 Subject: [PATCH 06/14] removed extra spaces --- interface/src/scripting/AudioDevices.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/src/scripting/AudioDevices.cpp b/interface/src/scripting/AudioDevices.cpp index 57d4865eed..500cedcb09 100644 --- a/interface/src/scripting/AudioDevices.cpp +++ b/interface/src/scripting/AudioDevices.cpp @@ -395,7 +395,6 @@ void AudioDeviceList::onDevicesChanged(QAudio::Mode mode, const QList Date: Mon, 4 Nov 2019 15:24:33 -0800 Subject: [PATCH 07/14] Fix codesign --- cmake/init.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/init.cmake b/cmake/init.cmake index 3f632b30f8..aac350ce0b 100644 --- a/cmake/init.cmake +++ b/cmake/init.cmake @@ -58,3 +58,7 @@ if (ANDROID) list(APPEND EXTERNAL_ARGS -DANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}) list(APPEND EXTERNAL_ARGS -DANDROID_STL=${ANDROID_STL}) endif () + +if (APPLE) + set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep") +endif() \ No newline at end of file From da7b83514478203dae9a0d56fe2d8e81bc57c071 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Tue, 5 Nov 2019 11:10:52 -0800 Subject: [PATCH 08/14] Fix for avatar recordings not playing back blendshapes --- assignment-client/src/Agent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assignment-client/src/Agent.cpp b/assignment-client/src/Agent.cpp index 2cad2ca722..ad68b07bb1 100644 --- a/assignment-client/src/Agent.cpp +++ b/assignment-client/src/Agent.cpp @@ -399,6 +399,7 @@ void Agent::executeScript() { } // these procedural movements are included in the recordings + scriptedAvatar->setHasScriptedBlendshapes(true); scriptedAvatar->setHasProceduralEyeFaceMovement(false); scriptedAvatar->setHasProceduralBlinkFaceMovement(false); scriptedAvatar->setHasAudioEnabledFaceMovement(false); @@ -406,6 +407,7 @@ void Agent::executeScript() { scriptedAvatar->clearRecordingBasis(); // restore procedural blendshape movement + scriptedAvatar->setHasScriptedBlendshapes(false); scriptedAvatar->setHasProceduralEyeFaceMovement(true); scriptedAvatar->setHasProceduralBlinkFaceMovement(true); scriptedAvatar->setHasAudioEnabledFaceMovement(true); From 27d4bfdd01e4dda6638ef144c840db90523c3de4 Mon Sep 17 00:00:00 2001 From: ingerjm0 Date: Tue, 5 Nov 2019 12:20:51 -0800 Subject: [PATCH 09/14] DOC-193 #comment Documented legacy vs current camera modes, along with code samples to re-enable legacy code --- libraries/shared/src/shared/Camera.cpp | 31 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/libraries/shared/src/shared/Camera.cpp b/libraries/shared/src/shared/Camera.cpp index 6727f89d29..c96b4ed28f 100644 --- a/libraries/shared/src/shared/Camera.cpp +++ b/libraries/shared/src/shared/Camera.cpp @@ -25,38 +25,45 @@ * * First Person * "first person" - * Legacy first person camera mode. The camera is positioned such that you have the same view as your avatar. - * The camera moves and rotates with your avatar. + *

The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with + * your avatar.

+ *

Legacy first person camera mode.

* * * First Person Look At * "first person look at" - * Default first person camera mode. The camera is positioned such that you have the same view as your avatar. - * The camera moves and rotates with your avatar's head. + *

The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with + * your avatar's head.

+ *

Default first person camera mode.

* * * Third Person * "third person" - * The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates with - * your avatar. + *

The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates + * with your avatar.

+ *

Legacy third person camera camera mode. To re-enable this behavior:

+ *
Camera.mode = "third person";
* * * Look At * "look at" - * The camera is positioned behind your avatar. The camera moves and rotates independently from your avatar. - * The avatar's head always faces the camera look at point. + *

The camera is positioned behind your avatar. The camera moves and rotates independently from your avatar. The + * avatar's head always faces the camera look at point.

+ *

Default third person camera mode. * * * Selfie * "selfie" - * The camera is positioned in front of your avatar. The camera moves and rotates independently from your avatar. - * Your avatar's head is always facing the camera. + *

The camera is positioned in front of your avatar. The camera moves and rotates independently from your avatar. + * Your avatar's head is always facing the camera.

Default "look at myself" camera mode.

* * * Mirror * "mirror" - * The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with your - * avatar. + *

The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with + * your avatar.

+ *

Legacy "look at myself" behavior. To re-enable this behavior:

+ *
Camera.mode = "mirror";
* * * Independent From bc41087ea940851576d936209097aaaf98fdcfc3 Mon Sep 17 00:00:00 2001 From: amerhifi Date: Tue, 5 Nov 2019 12:50:59 -0800 Subject: [PATCH 10/14] removing lock from WASAPI initialization --- libraries/audio-client/src/AudioClient.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libraries/audio-client/src/AudioClient.cpp b/libraries/audio-client/src/AudioClient.cpp index 61e0a37161..612493db2e 100644 --- a/libraries/audio-client/src/AudioClient.cpp +++ b/libraries/audio-client/src/AudioClient.cpp @@ -324,12 +324,10 @@ AudioClient::AudioClient() { connect(&_receivedAudioStream, &InboundAudioStream::mismatchedAudioCodec, this, &AudioClient::handleMismatchAudioFormat); - { - QReadLocker readLock(&_hmdNameLock); - // initialize wasapi; if getAvailableDevices is called from the CheckDevicesThread before this, it will crash - getAvailableDevices(QAudio::AudioInput, _hmdInputName); - getAvailableDevices(QAudio::AudioOutput, _hmdOutputName); - } + // initialize wasapi; if getAvailableDevices is called from the CheckDevicesThread before this, it will crash + getAvailableDevices(QAudio::AudioInput, QString()); + getAvailableDevices(QAudio::AudioOutput, QString()); + // start a thread to detect any device changes _checkDevicesTimer = new QTimer(this); const unsigned long DEVICE_CHECK_INTERVAL_MSECS = 2 * 1000; From faa4c97f8a26bf56cedc67cc2af369ec1660add6 Mon Sep 17 00:00:00 2001 From: ingerjm0 Date: Tue, 5 Nov 2019 14:04:01 -0800 Subject: [PATCH 11/14] Revisions per review --- libraries/shared/src/shared/Camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/shared/Camera.cpp b/libraries/shared/src/shared/Camera.cpp index c96b4ed28f..cac5429829 100644 --- a/libraries/shared/src/shared/Camera.cpp +++ b/libraries/shared/src/shared/Camera.cpp @@ -60,8 +60,8 @@ * * Mirror * "mirror" - *

The camera is positioned such that you are looking directly at your avatar. The camera moves and rotates with - * your avatar.

+ *

The camera is positioned such that you are looking directly at your avatar. The camera is fixed and does not + * move with your avatar.

*

Legacy "look at myself" behavior. To re-enable this behavior:

*
Camera.mode = "mirror";
* From 499a0a806764e4c40e0b1c086ef46b9cc344017a Mon Sep 17 00:00:00 2001 From: ingerjm0 Date: Tue, 5 Nov 2019 14:14:46 -0800 Subject: [PATCH 12/14] Clean up code per review --- libraries/shared/src/shared/Camera.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/shared/src/shared/Camera.cpp b/libraries/shared/src/shared/Camera.cpp index cac5429829..85761e0d29 100644 --- a/libraries/shared/src/shared/Camera.cpp +++ b/libraries/shared/src/shared/Camera.cpp @@ -41,7 +41,7 @@ * "third person" *

The camera is positioned such that you have a view from just behind your avatar. The camera moves and rotates * with your avatar.

- *

Legacy third person camera camera mode. To re-enable this behavior:

+ *

Legacy third person camera camera mode.

*
Camera.mode = "third person";
* * @@ -55,14 +55,15 @@ * Selfie * "selfie" *

The camera is positioned in front of your avatar. The camera moves and rotates independently from your avatar. - * Your avatar's head is always facing the camera.

Default "look at myself" camera mode.

+ * Your avatar's head is always facing the camera.

+ *

Default "look at myself" camera mode.

* * * Mirror * "mirror" *

The camera is positioned such that you are looking directly at your avatar. The camera is fixed and does not * move with your avatar.

- *

Legacy "look at myself" behavior. To re-enable this behavior:

+ *

Legacy "look at myself" behavior.

*
Camera.mode = "mirror";
* * From 8dc91d640b5cf4648d057eb86864b88b0f411fd9 Mon Sep 17 00:00:00 2001 From: Matt Hardcastle Date: Tue, 5 Nov 2019 09:23:36 -0800 Subject: [PATCH 13/14] Remove `this` and connection from lambda expression Clang in Xcode 11 is more aggressive about its warnings. This resolves one of the issue Clang noticed in order to support building w/Xcode 11. I first attempted to remove `this` completes, but VS complained that `QObject::disconnect` was being called without `this`. This change satisfies both Clang and VS. A second attempt added this back and then called `disconnect` directly. This also generated a Clang warning. This version resolves the issue by removing the error handler. This also resolves a memory leak caused by the error handler. --- interface/src/AvatarBookmarks.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/interface/src/AvatarBookmarks.cpp b/interface/src/AvatarBookmarks.cpp index 2ebe769bec..6f6a93ff19 100644 --- a/interface/src/AvatarBookmarks.cpp +++ b/interface/src/AvatarBookmarks.cpp @@ -232,12 +232,6 @@ void AvatarBookmarks::loadBookmark(const QString& bookmarkName) { emit bookmarkLoaded(bookmarkName); }); - std::shared_ptr connection2 = std::make_shared(); - *connection2 = connect(myAvatar.get(), &MyAvatar::onLoadFailed, [this, bookmarkName, connection2]() { - qCDebug(interfaceapp) << "Failed to load avatar bookmark" << bookmarkName; - QObject::disconnect(*connection2); - }); - qCDebug(interfaceapp) << "Start loading avatar bookmark" << bookmarkName; const QString& avatarUrl = bookmark.value(ENTRY_AVATAR_URL, "").toString(); From a2f784d2251d2e15450bfa1faaf903302eb93dc7 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 6 Nov 2019 11:26:10 -0800 Subject: [PATCH 14/14] DEV-2695: Update Zone Haze floor and ceiling mins and maxes in the UI --- .../create/entityProperties/html/js/entityProperties.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/system/create/entityProperties/html/js/entityProperties.js b/scripts/system/create/entityProperties/html/js/entityProperties.js index 76264429ac..e581fbd194 100644 --- a/scripts/system/create/entityProperties/html/js/entityProperties.js +++ b/scripts/system/create/entityProperties/html/js/entityProperties.js @@ -398,8 +398,8 @@ const GROUPS = [ { label: "Base", type: "number-draggable", - min: -1000, - max: 1000, + min: -16000, + max: 16000, step: 1, decimals: 0, unit: "m", @@ -409,8 +409,8 @@ const GROUPS = [ { label: "Ceiling", type: "number-draggable", - min: -1000, - max: 5000, + min: -16000, + max: 16000, step: 1, decimals: 0, unit: "m",