mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:58:09 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into coco
This commit is contained in:
commit
ad60c51197
3 changed files with 52 additions and 12 deletions
|
@ -1428,7 +1428,7 @@ int Avatar::getJointIndex(const QString& name) const {
|
||||||
|
|
||||||
withValidJointIndicesCache([&]() {
|
withValidJointIndicesCache([&]() {
|
||||||
if (_modelJointIndicesCache.contains(name)) {
|
if (_modelJointIndicesCache.contains(name)) {
|
||||||
result = _modelJointIndicesCache[name] - 1;
|
result = _modelJointIndicesCache.value(name) - 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
|
@ -1439,9 +1439,7 @@ QStringList Avatar::getJointNames() const {
|
||||||
withValidJointIndicesCache([&]() {
|
withValidJointIndicesCache([&]() {
|
||||||
// find out how large the vector needs to be
|
// find out how large the vector needs to be
|
||||||
int maxJointIndex = -1;
|
int maxJointIndex = -1;
|
||||||
QHashIterator<QString, int> k(_modelJointIndicesCache);
|
for (auto k = _modelJointIndicesCache.constBegin(); k != _modelJointIndicesCache.constEnd(); k++) {
|
||||||
while (k.hasNext()) {
|
|
||||||
k.next();
|
|
||||||
int index = k.value();
|
int index = k.value();
|
||||||
if (index > maxJointIndex) {
|
if (index > maxJointIndex) {
|
||||||
maxJointIndex = index;
|
maxJointIndex = index;
|
||||||
|
@ -1450,9 +1448,7 @@ QStringList Avatar::getJointNames() const {
|
||||||
// iterate through the hash and put joint names
|
// iterate through the hash and put joint names
|
||||||
// into the vector at their indices
|
// into the vector at their indices
|
||||||
QVector<QString> resultVector(maxJointIndex+1);
|
QVector<QString> resultVector(maxJointIndex+1);
|
||||||
QHashIterator<QString, int> i(_modelJointIndicesCache);
|
for (auto i = _modelJointIndicesCache.constBegin(); i != _modelJointIndicesCache.constEnd(); i++) {
|
||||||
while (i.hasNext()) {
|
|
||||||
i.next();
|
|
||||||
int index = i.value();
|
int index = i.value();
|
||||||
resultVector[index] = i.key();
|
resultVector[index] = i.key();
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ function setAwayProperties() {
|
||||||
if (!wasMuted) {
|
if (!wasMuted) {
|
||||||
Audio.muted = !Audio.muted;
|
Audio.muted = !Audio.muted;
|
||||||
}
|
}
|
||||||
MyAvatar.setEnableMeshVisible(false); // just for our own display, without changing point of view
|
MyAvatar.setEnableMeshVisible(false); // just for our own display, without changing point of view
|
||||||
playAwayAnimation(); // animation is still seen by others
|
playAwayAnimation(); // animation is still seen by others
|
||||||
showOverlay();
|
showOverlay();
|
||||||
|
|
||||||
|
@ -223,8 +223,8 @@ function setAwayProperties() {
|
||||||
|
|
||||||
function setActiveProperties() {
|
function setActiveProperties() {
|
||||||
isAway = false;
|
isAway = false;
|
||||||
if (!wasMuted) {
|
if (Audio.muted && !wasMuted) {
|
||||||
Audio.muted = !Audio.muted;
|
Audio.muted = false;
|
||||||
}
|
}
|
||||||
MyAvatar.setEnableMeshVisible(true); // IWBNI we respected Developer->Avatar->Draw Mesh setting.
|
MyAvatar.setEnableMeshVisible(true); // IWBNI we respected Developer->Avatar->Draw Mesh setting.
|
||||||
stopAwayAnimation();
|
stopAwayAnimation();
|
||||||
|
@ -254,7 +254,7 @@ function setActiveProperties() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function maybeGoActive(event) {
|
function maybeGoActive(event) {
|
||||||
if (event.isAutoRepeat) { // isAutoRepeat is true when held down (or when Windows feels like it)
|
if (event.isAutoRepeat) { // isAutoRepeat is true when held down (or when Windows feels like it)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!isAway && (event.text === 'ESC')) {
|
if (!isAway && (event.text === 'ESC')) {
|
||||||
|
@ -314,6 +314,13 @@ function setEnabled(value) {
|
||||||
isEnabled = value;
|
isEnabled = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkAudioToggled() {
|
||||||
|
if (isAway && !Audio.muted) {
|
||||||
|
goActive();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
|
var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
|
||||||
var handleMessage = function(channel, message, sender) {
|
var handleMessage = function(channel, message, sender) {
|
||||||
if (channel === CHANNEL_AWAY_ENABLE && sender === MyAvatar.sessionUUID) {
|
if (channel === CHANNEL_AWAY_ENABLE && sender === MyAvatar.sessionUUID) {
|
||||||
|
@ -324,9 +331,10 @@ var handleMessage = function(channel, message, sender) {
|
||||||
Messages.subscribe(CHANNEL_AWAY_ENABLE);
|
Messages.subscribe(CHANNEL_AWAY_ENABLE);
|
||||||
Messages.messageReceived.connect(handleMessage);
|
Messages.messageReceived.connect(handleMessage);
|
||||||
|
|
||||||
var maybeIntervalTimer = Script.setInterval(function(){
|
var maybeIntervalTimer = Script.setInterval(function() {
|
||||||
maybeMoveOverlay();
|
maybeMoveOverlay();
|
||||||
maybeGoAway();
|
maybeGoAway();
|
||||||
|
checkAudioToggled();
|
||||||
}, BASIC_TIMER_INTERVAL);
|
}, BASIC_TIMER_INTERVAL);
|
||||||
|
|
||||||
|
|
||||||
|
|
36
tools/ci-scripts/hifi_backtrace_post.py
Normal file
36
tools/ci-scripts/hifi_backtrace_post.py
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Parameters:
|
||||||
|
# 1 - $BACKTRACE_UPLOAD_TOKEN
|
||||||
|
# 2 - $SYMBOLS_ARCHIVE
|
||||||
|
# 3 - $RELEASE_NUMBER
|
||||||
|
#
|
||||||
|
import sys
|
||||||
|
import urllib.request
|
||||||
|
import urllib.parse
|
||||||
|
|
||||||
|
print("Running python script to upload to BackTrace")
|
||||||
|
|
||||||
|
post_headers = {}
|
||||||
|
post_headers['Content-Type'] = 'application/json'
|
||||||
|
post_headers['Expect'] = ''
|
||||||
|
|
||||||
|
post_url = 'https://highfidelity.sp.backtrace.io:6098/post?format=symbols&token=' + sys.argv[1] + '&upload_file=' + sys.argv[2] + '&tag=' + sys.argv[3]
|
||||||
|
|
||||||
|
try:
|
||||||
|
post_data = open(sys.argv[2], 'rb')
|
||||||
|
except:
|
||||||
|
print('file ' + sys.argv[2] + ' not found')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
try:
|
||||||
|
post_request = urllib.request.Request(post_url, post_data, post_headers)
|
||||||
|
except:
|
||||||
|
print('urllib.request.Request failed')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
try:
|
||||||
|
post_response = urllib.request.urlopen(post_request)
|
||||||
|
except:
|
||||||
|
print('urllib.request.urlopen failed')
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
print("Upload to BackTrace completed without errors")
|
Loading…
Reference in a new issue