From 1880b263d43effe80eca2522c2606dffd5097a7a Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 27 Aug 2015 11:09:55 -0700 Subject: [PATCH 01/12] Add entity search radius field to entities list --- examples/html/entityList.html | 1 + examples/html/style.css | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/html/entityList.html b/examples/html/entityList.html index 62bbbd08a6..9554ba7c02 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -226,6 +226,7 @@
+  m
diff --git a/examples/html/style.css b/examples/html/style.css index e63b6338fc..3614ea821b 100644 --- a/examples/html/style.css +++ b/examples/html/style.css @@ -102,13 +102,23 @@ input[type=button] { } #search-area { - width: 100%; padding: 0.5em; box-sizing: border-box; + padding-right: 6em; } -#search-area input { - width: 100%; +#filter { + width: 99%; +} + +#radius-and-unit { + width: 6em; + float: right; + margin-right: -6em; +} + +#radius { + width: 4em; } textarea, input { From d628a88f5219c36e2f594ab1310eebf78172bf16 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 27 Aug 2015 11:10:20 -0700 Subject: [PATCH 02/12] Fix some invalid HTML --- examples/html/entityList.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/html/entityList.html b/examples/html/entityList.html index 9554ba7c02..9d53d3c12d 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -218,9 +218,9 @@
- - - + + +
From a553022adf6287af5c72839e1eb62e86e5f7eeb2 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 27 Aug 2015 11:11:05 -0700 Subject: [PATCH 03/12] Update entities list as search radius value is changed --- examples/html/entityList.html | 11 ++++++++++- examples/libraries/entityList.js | 7 ++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/examples/html/entityList.html b/examples/html/entityList.html index 9d53d3c12d..d7524c199c 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -20,7 +20,9 @@ elRefresh = document.getElementById("refresh"); elDelete = document.getElementById("delete"); elTeleport = document.getElementById("teleport"); + elRadius = document.getElementById("radius"); elNoEntitiesMessage = document.getElementById("no-entities"); + elNoEntitiesRadius = document.getElementById("no-entities-radius"); document.getElementById("entity-name").onclick = function() { setSortColumn('name'); @@ -186,6 +188,13 @@ } }, false); + elRadius.onchange = function () { + elRadius.value = Math.max(elRadius.value, 0); + EventBridge.emitWebEvent(JSON.stringify({ type: 'radius', radius: elRadius.value })); + refreshEntities(); + elNoEntitiesRadius.firstChild.nodeValue = elRadius.value; + } + if (window.EventBridge !== undefined) { EventBridge.scriptEventReceived.connect(function(data) { data = JSON.parse(data); @@ -247,7 +256,7 @@
- No entities found within 50 meter radius. Try moving to a different location and refreshing. + No entities found within a 50 meter radius. Try moving to a different location and refreshing.
diff --git a/examples/libraries/entityList.js b/examples/libraries/entityList.js index 241ffb2766..e6bca9e7e1 100644 --- a/examples/libraries/entityList.js +++ b/examples/libraries/entityList.js @@ -4,6 +4,8 @@ EntityListTool = function(opts) { var url = Script.resolvePath('html/entityList.html'); var webView = new WebWindow('Entities', url, 200, 280, true); + var searchDiameter = 100; + var visible = false; webView.setVisible(visible); @@ -33,7 +35,7 @@ EntityListTool = function(opts) { that.sendUpdate = function() { var entities = []; - var ids = Entities.findEntities(MyAvatar.position, 100); + var ids = Entities.findEntities(MyAvatar.position, searchDiameter); for (var i = 0; i < ids.length; i++) { var id = ids[i]; var properties = Entities.getEntityProperties(id); @@ -80,6 +82,9 @@ EntityListTool = function(opts) { } } else if (data.type == "delete") { deleteSelectedEntities(); + } else if (data.type === "radius") { + searchDiameter = 2 * data.radius; + that.sendUpdate(); } }); From 005851a74a3e66d520cefe120b8dad811f56cf7d Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 27 Aug 2015 12:13:04 -0700 Subject: [PATCH 04/12] Increase default entity search radius to 100m --- examples/html/entityList.html | 4 ++-- examples/libraries/entityList.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/html/entityList.html b/examples/html/entityList.html index d7524c199c..2e3fdb1874 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -235,7 +235,7 @@
-  m +  m
@@ -256,7 +256,7 @@
- No entities found within a 50 meter radius. Try moving to a different location and refreshing. + No entities found within a 100 meter radius. Try moving to a different location and refreshing.
diff --git a/examples/libraries/entityList.js b/examples/libraries/entityList.js index e6bca9e7e1..55262c745d 100644 --- a/examples/libraries/entityList.js +++ b/examples/libraries/entityList.js @@ -4,7 +4,7 @@ EntityListTool = function(opts) { var url = Script.resolvePath('html/entityList.html'); var webView = new WebWindow('Entities', url, 200, 280, true); - var searchDiameter = 100; + var searchDiameter = 200; var visible = false; From 9353eaf35afc9b65e03b10fe3646c8ffeef19497 Mon Sep 17 00:00:00 2001 From: Seiji Emery Date: Fri, 28 Aug 2015 10:33:30 -0700 Subject: [PATCH 05/12] Added signal to detect + close address bar when user clicks outside of it --- interface/resources/qml/AddressBarDialog.qml | 9 +++++++++ interface/resources/qml/Root.qml | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index 3852ea3819..bc26cf2be2 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -151,6 +151,14 @@ DialogContainer { } } + // Connect to parent's signals (Root.qml) + onParentChanged: { + // Hide the address bar when the user clicks outside it (ie. parent recieved an unhandled mouse click) + // Note: if the user clicks on another dialog this won't get called. + parent.onUnhandledClick.connect(function () { + root.enabled = false; + }); + } onVisibleChanged: { if (!visible) { addressLine.text = "" @@ -165,6 +173,7 @@ DialogContainer { } } + Keys.onPressed: { switch (event.key) { case Qt.Key_Escape: diff --git a/interface/resources/qml/Root.qml b/interface/resources/qml/Root.qml index 1b0f09558f..f05fea720e 100644 --- a/interface/resources/qml/Root.qml +++ b/interface/resources/qml/Root.qml @@ -6,6 +6,16 @@ import QtQuick 2.3 Root { id: root anchors.fill: parent + signal onUnhandledClick (); + + // Detects a mouseclick that is not handled by any child components. + // Used by AddressBarDialog.qml to close when user clicks outside of it. + MouseArea { + anchors.fill: parent + onClicked: { + onUnhandledClick(); + } + } onParentChanged: { forceActiveFocus(); From c704fb7b125ef253c1d7e3708d4ba311ea5590d9 Mon Sep 17 00:00:00 2001 From: Seiji Emery Date: Fri, 28 Aug 2015 11:01:30 -0700 Subject: [PATCH 06/12] Fixed to follow signal naming conventions, and added null check --- interface/resources/qml/AddressBarDialog.qml | 11 +++++++---- interface/resources/qml/Root.qml | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index bc26cf2be2..e8b562105b 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -153,11 +153,14 @@ DialogContainer { // Connect to parent's signals (Root.qml) onParentChanged: { - // Hide the address bar when the user clicks outside it (ie. parent recieved an unhandled mouse click) + // Hide the address bar when the user clicks outside it // Note: if the user clicks on another dialog this won't get called. - parent.onUnhandledClick.connect(function () { - root.enabled = false; - }); + + if (parent && parent.unhandledClick) { + parent.unhandledClick.connect(function () { + root.enabled = false; + }); + } } onVisibleChanged: { if (!visible) { diff --git a/interface/resources/qml/Root.qml b/interface/resources/qml/Root.qml index f05fea720e..8e57f0ac11 100644 --- a/interface/resources/qml/Root.qml +++ b/interface/resources/qml/Root.qml @@ -6,14 +6,14 @@ import QtQuick 2.3 Root { id: root anchors.fill: parent - signal onUnhandledClick (); + signal unhandledClick (); // Detects a mouseclick that is not handled by any child components. // Used by AddressBarDialog.qml to close when user clicks outside of it. MouseArea { anchors.fill: parent onClicked: { - onUnhandledClick(); + unhandledClick(); } } From e0f6db215243e7e1809bc54f228dcac12b6fadb5 Mon Sep 17 00:00:00 2001 From: Seiji Emery Date: Fri, 28 Aug 2015 16:36:44 -0700 Subject: [PATCH 07/12] Coding style --- interface/resources/qml/Root.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/Root.qml b/interface/resources/qml/Root.qml index 8e57f0ac11..7e11ff0d74 100644 --- a/interface/resources/qml/Root.qml +++ b/interface/resources/qml/Root.qml @@ -6,7 +6,7 @@ import QtQuick 2.3 Root { id: root anchors.fill: parent - signal unhandledClick (); + signal unhandledClick(); // Detects a mouseclick that is not handled by any child components. // Used by AddressBarDialog.qml to close when user clicks outside of it. From e2ee074b7a5890aa28e9ce1634aed78b5af6181e Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 31 Aug 2015 13:51:03 -0700 Subject: [PATCH 08/12] Entity search uses radius, not diameter --- examples/libraries/entityList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/libraries/entityList.js b/examples/libraries/entityList.js index 55262c745d..12d325db50 100644 --- a/examples/libraries/entityList.js +++ b/examples/libraries/entityList.js @@ -4,7 +4,7 @@ EntityListTool = function(opts) { var url = Script.resolvePath('html/entityList.html'); var webView = new WebWindow('Entities', url, 200, 280, true); - var searchDiameter = 200; + var searchRadius = 100; var visible = false; @@ -35,7 +35,7 @@ EntityListTool = function(opts) { that.sendUpdate = function() { var entities = []; - var ids = Entities.findEntities(MyAvatar.position, searchDiameter); + var ids = Entities.findEntities(MyAvatar.position, searchRadius); for (var i = 0; i < ids.length; i++) { var id = ids[i]; var properties = Entities.getEntityProperties(id); @@ -83,7 +83,7 @@ EntityListTool = function(opts) { } else if (data.type == "delete") { deleteSelectedEntities(); } else if (data.type === "radius") { - searchDiameter = 2 * data.radius; + searchRadius = data.radius; that.sendUpdate(); } }); From 76923583ee8fbb35f24e965616dd26905413f2de Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 1 Sep 2015 13:31:34 -0700 Subject: [PATCH 09/12] Interface only sends joint data to avatar-mixer if they have changed enough since the last send --- assignment-client/src/avatars/AvatarMixer.cpp | 2 +- .../src/avatars/ScriptableAvatar.cpp | 3 -- interface/src/avatar/Avatar.cpp | 8 ++-- interface/src/avatar/MyAvatar.cpp | 8 ++-- interface/src/avatar/MyAvatar.h | 2 +- libraries/avatars/src/AvatarData.cpp | 47 ++++++++++++++----- libraries/avatars/src/AvatarData.h | 4 +- libraries/script-engine/src/ScriptEngine.cpp | 2 +- 8 files changed, 47 insertions(+), 29 deletions(-) diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index 3a3176b78d..eefb654737 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -295,7 +295,7 @@ void AvatarMixer::broadcastAvatarData() { avatarPacketList.startSegment(); numAvatarDataBytes += avatarPacketList.write(otherNode->getUUID().toRfc4122()); - numAvatarDataBytes += avatarPacketList.write(otherAvatar.toByteArray()); + numAvatarDataBytes += avatarPacketList.write(otherAvatar.toByteArray(false)); avatarPacketList.endSegment(); diff --git a/assignment-client/src/avatars/ScriptableAvatar.cpp b/assignment-client/src/avatars/ScriptableAvatar.cpp index 3d243d78ec..0b7af01c94 100644 --- a/assignment-client/src/avatars/ScriptableAvatar.cpp +++ b/assignment-client/src/avatars/ScriptableAvatar.cpp @@ -77,10 +77,7 @@ void ScriptableAvatar::update(float deltatime) { int mapping = animationJoints.indexOf(modelJoints[i]); if (mapping != -1 && !_maskedJoints.contains(modelJoints[i])) { JointData& data = _jointData[i]; - data.valid = true; data.rotation = safeMix(floorFrame.rotations.at(i), ceilFrame.rotations.at(i), frameFraction); - } else { - _jointData[i].valid = false; } } } else { diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index e7423336b1..6d1505ced9 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -200,11 +200,9 @@ void Avatar::simulate(float deltaTime) { if (!_shouldRenderBillboard && inViewFrustum) { { PerformanceTimer perfTimer("skeleton"); - if (_hasNewJointRotations) { - for (int i = 0; i < _jointData.size(); i++) { - const JointData& data = _jointData.at(i); - _skeletonModel.setJointState(i, data.valid, data.rotation); - } + for (int i = 0; i < _jointData.size(); i++) { + const JointData& data = _jointData.at(i); + _skeletonModel.setJointState(i, true, data.rotation); } _skeletonModel.simulate(deltaTime, _hasNewJointRotations); simulateAttachments(deltaTime); diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 39d2637b9e..6939720f32 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -123,18 +123,18 @@ MyAvatar::~MyAvatar() { _lookAtTargetAvatar.reset(); } -QByteArray MyAvatar::toByteArray() { +QByteArray MyAvatar::toByteArray(bool cullSmallChanges) { CameraMode mode = Application::getInstance()->getCamera()->getMode(); if (mode == CAMERA_MODE_THIRD_PERSON || mode == CAMERA_MODE_INDEPENDENT) { // fake the avatar position that is sent up to the AvatarMixer glm::vec3 oldPosition = _position; _position = getSkeletonPosition(); - QByteArray array = AvatarData::toByteArray(); + QByteArray array = AvatarData::toByteArray(cullSmallChanges); // copy the correct position back _position = oldPosition; return array; } - return AvatarData::toByteArray(); + return AvatarData::toByteArray(cullSmallChanges); } void MyAvatar::reset() { @@ -220,7 +220,7 @@ void MyAvatar::simulate(float deltaTime) { _jointData.resize(_rig->getJointStateCount()); for (int i = 0; i < _jointData.size(); i++) { JointData& data = _jointData[i]; - data.valid = _rig->getJointStateRotation(i, data.rotation); + _rig->getJointStateRotation(i, data.rotation); } } diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index 9e7ab11aa6..89f3b236f4 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -200,7 +200,7 @@ private: glm::vec3 getWorldBodyPosition() const; glm::quat getWorldBodyOrientation() const; - QByteArray toByteArray(); + QByteArray toByteArray(bool cullSmallChanges); void simulate(float deltaTime); void updateFromTrackers(float deltaTime); virtual void render(RenderArgs* renderArgs, const glm::vec3& cameraPositio) override; diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index 9ef1f94c55..d761d861c3 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -31,6 +31,10 @@ quint64 DEFAULT_FILTERED_LOG_EXPIRY = 2 * USECS_PER_SECOND; +// this controls how large a change in joint-rotation must be before the interface sends it to the avatar mixer +const float MIN_ROTATION_DOT = 0.9999999f; + + using namespace std; const glm::vec3 DEFAULT_LOCAL_AABOX_CORNER(-0.5f); @@ -141,7 +145,7 @@ void AvatarData::setHandPosition(const glm::vec3& handPosition) { _handPosition = glm::inverse(getOrientation()) * (handPosition - _position); } -QByteArray AvatarData::toByteArray() { +QByteArray AvatarData::toByteArray(bool cullSmallChanges) { // TODO: DRY this up to a shared method // that can pack any type given the number of bytes // and return the number of bytes to push the pointer @@ -234,11 +238,19 @@ QByteArray AvatarData::toByteArray() { // joint data *destinationBuffer++ = _jointData.size(); + unsigned char* validityPosition = destinationBuffer; unsigned char validity = 0; int validityBit = 0; - foreach (const JointData& data, _jointData) { - if (data.valid) { - validity |= (1 << validityBit); + + _lastSentJointData.resize(_jointData.size()); + + // foreach (const JointData& data, _jointData) { + for (int i=0; i < _jointData.size(); i++) { + const JointData& data = _jointData.at(i); + if (_lastSentJointData[i].rotation != data.rotation) { + if (!cullSmallChanges || fabsf(glm::dot(data.rotation, _lastSentJointData[i].rotation)) <= MIN_ROTATION_DOT) { + validity |= (1 << validityBit); + } } if (++validityBit == BITS_IN_BYTE) { *destinationBuffer++ = validity; @@ -248,9 +260,18 @@ QByteArray AvatarData::toByteArray() { if (validityBit != 0) { *destinationBuffer++ = validity; } - foreach (const JointData& data, _jointData) { - if (data.valid) { + + validityBit = 0; + validity = *validityPosition++; + for (int i = 0; i < _jointData.size(); i ++) { + const JointData& data = _jointData[ i ]; + if (validity & (1 << validityBit)) { destinationBuffer += packOrientationQuatToBytes(destinationBuffer, data.rotation); + _lastSentJointData[i].rotation = data.rotation; + } + if (++validityBit == BITS_IN_BYTE) { + validityBit = 0; + validity = *validityPosition++; } } @@ -494,6 +515,10 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { } int numValidJoints = 0; _jointData.resize(numJoints); + + QVector valids; + valids.resize(numJoints); + { // validity bits unsigned char validity = 0; int validityBit = 0; @@ -505,7 +530,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { if (valid) { ++numValidJoints; } - _jointData[i].valid = valid; + valids[i] = valid; validityBit = (validityBit + 1) % BITS_IN_BYTE; } } @@ -527,7 +552,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) { { // joint data for (int i = 0; i < numJoints; i++) { JointData& data = _jointData[i]; - if (data.valid) { + if (valids[i]) { _hasNewJointRotations = true; sourceBuffer += unpackOrientationQuatFromBytes(sourceBuffer, data.rotation); } @@ -731,7 +756,6 @@ void AvatarData::setJointData(int index, const glm::quat& rotation) { _jointData.resize(index + 1); } JointData& data = _jointData[index]; - data.valid = true; data.rotation = rotation; } @@ -746,7 +770,6 @@ void AvatarData::clearJointData(int index) { if (_jointData.size() <= index) { _jointData.resize(index + 1); } - _jointData[index].valid = false; } bool AvatarData::isJointDataValid(int index) const { @@ -759,7 +782,7 @@ bool AvatarData::isJointDataValid(int index) const { Q_RETURN_ARG(bool, result), Q_ARG(int, index)); return result; } - return index < _jointData.size() && _jointData.at(index).valid; + return index < _jointData.size() /* && _jointData.at(index).valid */; } glm::quat AvatarData::getJointRotation(int index) const { @@ -1060,7 +1083,7 @@ void AvatarData::setJointMappingsFromNetworkReply() { void AvatarData::sendAvatarDataPacket() { auto nodeList = DependencyManager::get(); - QByteArray avatarByteArray = toByteArray(); + QByteArray avatarByteArray = toByteArray(true); auto avatarPacket = NLPacket::create(PacketType::AvatarData, avatarByteArray.size()); avatarPacket->write(avatarByteArray); diff --git a/libraries/avatars/src/AvatarData.h b/libraries/avatars/src/AvatarData.h index 8bb874bc71..278ec2047c 100644 --- a/libraries/avatars/src/AvatarData.h +++ b/libraries/avatars/src/AvatarData.h @@ -171,7 +171,7 @@ public: glm::vec3 getHandPosition() const; void setHandPosition(const glm::vec3& handPosition); - virtual QByteArray toByteArray(); + virtual QByteArray toByteArray(bool cullSmallChanges); /// \return true if an error should be logged bool shouldLogError(const quint64& now); @@ -357,6 +357,7 @@ protected: char _handState; QVector _jointData; ///< the state of the skeleton joints + QVector _lastSentJointData; ///< the state of the skeleton joints last time we transmitted // key state KeyState _keyState; @@ -408,7 +409,6 @@ Q_DECLARE_METATYPE(AvatarData*) class JointData { public: - bool valid; glm::quat rotation; }; diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index b42daa710a..aa395b1b06 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -599,7 +599,7 @@ void ScriptEngine::run() { / (1000 * 1000)) + 0.5); const int SCRIPT_AUDIO_BUFFER_BYTES = SCRIPT_AUDIO_BUFFER_SAMPLES * sizeof(int16_t); - QByteArray avatarByteArray = _avatarData->toByteArray(); + QByteArray avatarByteArray = _avatarData->toByteArray(true); auto avatarPacket = NLPacket::create(PacketType::AvatarData, avatarByteArray.size()); avatarPacket->write(avatarByteArray); From 6f80c484b4eeb8e7c675138a6e766f81a25cf6c3 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 1 Sep 2015 13:33:19 -0700 Subject: [PATCH 10/12] cleanups --- libraries/avatars/src/AvatarData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index d761d861c3..123c9707ba 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -782,7 +782,7 @@ bool AvatarData::isJointDataValid(int index) const { Q_RETURN_ARG(bool, result), Q_ARG(int, index)); return result; } - return index < _jointData.size() /* && _jointData.at(index).valid */; + return index < _jointData.size(); } glm::quat AvatarData::getJointRotation(int index) const { From e32b9191f55b4a99a2bdc49ad6bff6b83015e387 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 1 Sep 2015 13:35:58 -0700 Subject: [PATCH 11/12] bump AvatarData protocol version --- libraries/networking/src/udt/PacketHeaders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/networking/src/udt/PacketHeaders.cpp b/libraries/networking/src/udt/PacketHeaders.cpp index 7e73b4c660..ac72f1bd68 100644 --- a/libraries/networking/src/udt/PacketHeaders.cpp +++ b/libraries/networking/src/udt/PacketHeaders.cpp @@ -69,7 +69,7 @@ PacketVersion versionForPacketType(PacketType::Value packetType) { case EntityData: return VERSION_ENTITIES_PARTICLE_MODIFICATIONS; case AvatarData: - return 12; + return 13; default: return 11; } From 232fd72e5320d95973a0d5d1bc0c8cc363854a19 Mon Sep 17 00:00:00 2001 From: Leonardo Murillo Date: Tue, 1 Sep 2015 16:32:29 -0600 Subject: [PATCH 12/12] Revert "Address bar now closes when you click outside of it" --- interface/resources/qml/AddressBarDialog.qml | 12 ------------ interface/resources/qml/Root.qml | 10 ---------- 2 files changed, 22 deletions(-) diff --git a/interface/resources/qml/AddressBarDialog.qml b/interface/resources/qml/AddressBarDialog.qml index e8b562105b..3852ea3819 100644 --- a/interface/resources/qml/AddressBarDialog.qml +++ b/interface/resources/qml/AddressBarDialog.qml @@ -151,17 +151,6 @@ DialogContainer { } } - // Connect to parent's signals (Root.qml) - onParentChanged: { - // Hide the address bar when the user clicks outside it - // Note: if the user clicks on another dialog this won't get called. - - if (parent && parent.unhandledClick) { - parent.unhandledClick.connect(function () { - root.enabled = false; - }); - } - } onVisibleChanged: { if (!visible) { addressLine.text = "" @@ -176,7 +165,6 @@ DialogContainer { } } - Keys.onPressed: { switch (event.key) { case Qt.Key_Escape: diff --git a/interface/resources/qml/Root.qml b/interface/resources/qml/Root.qml index 7e11ff0d74..1b0f09558f 100644 --- a/interface/resources/qml/Root.qml +++ b/interface/resources/qml/Root.qml @@ -6,16 +6,6 @@ import QtQuick 2.3 Root { id: root anchors.fill: parent - signal unhandledClick(); - - // Detects a mouseclick that is not handled by any child components. - // Used by AddressBarDialog.qml to close when user clicks outside of it. - MouseArea { - anchors.fill: parent - onClicked: { - unhandledClick(); - } - } onParentChanged: { forceActiveFocus();