mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge branch 'master' of github.com:highfidelity/hifi into friction
This commit is contained in:
commit
341abb8185
41 changed files with 328 additions and 319 deletions
|
@ -33,7 +33,7 @@ const QString ASSIGNMENT_CLIENT_MONITOR_TARGET_NAME = "assignment-client-monitor
|
|||
const int WAIT_FOR_CHILD_MSECS = 1000;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
HANDLE PROCESS_GROUP = createProcessGroup();
|
||||
void* PROCESS_GROUP = createProcessGroup();
|
||||
#endif
|
||||
|
||||
AssignmentClientMonitor::AssignmentClientMonitor(const unsigned int numAssignmentClientForks,
|
||||
|
|
|
@ -134,7 +134,7 @@ endif()
|
|||
downloadVcpkg = True
|
||||
|
||||
if not downloadVcpkg and not os.path.isfile(self.exe):
|
||||
print("Missing executable, boostrapping")
|
||||
print("Missing executable, boot-strapping")
|
||||
downloadVcpkg = True
|
||||
|
||||
# Make sure we have a vcpkg executable
|
||||
|
|
|
@ -2478,8 +2478,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -2489,8 +2489,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk02",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -2500,8 +2500,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk03",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -2511,8 +2511,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk04",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -2522,8 +2522,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk_armsdown",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -2533,8 +2533,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk_lefthand",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -2544,8 +2544,8 @@
|
|||
{
|
||||
"easingType": "easeInOutQuad",
|
||||
"id": "talk_righthand",
|
||||
"interpDuration": 1,
|
||||
"interpTarget": 1,
|
||||
"interpDuration": 20,
|
||||
"interpTarget": 20,
|
||||
"interpType": "evaluateBoth",
|
||||
"priority": 0.33,
|
||||
"resume": true,
|
||||
|
@ -5242,62 +5242,6 @@
|
|||
"interpTarget": 6,
|
||||
"interpType": "evaluateBoth",
|
||||
"transitions": [
|
||||
{
|
||||
"state": "idle",
|
||||
"var": "isNotMoving"
|
||||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
"var": "isTurningRight"
|
||||
},
|
||||
{
|
||||
"state": "turnLeft",
|
||||
"var": "isTurningLeft"
|
||||
},
|
||||
{
|
||||
"state": "fly",
|
||||
"var": "isFlying"
|
||||
},
|
||||
{
|
||||
"state": "takeoffStand",
|
||||
"var": "isTakeoffStand"
|
||||
},
|
||||
{
|
||||
"state": "TAKEOFFRUN",
|
||||
"var": "isTakeoffRun"
|
||||
},
|
||||
{
|
||||
"state": "inAirStand",
|
||||
"var": "isInAirStand"
|
||||
},
|
||||
{
|
||||
"state": "INAIRRUN",
|
||||
"var": "isInAirRun"
|
||||
},
|
||||
{
|
||||
"state": "strafeRightHmd",
|
||||
"var": "isMovingRightHmd"
|
||||
},
|
||||
{
|
||||
"state": "strafeLeftHmd",
|
||||
"var": "isMovingLeftHmd"
|
||||
},
|
||||
{
|
||||
"state": "idle",
|
||||
"var": "isNotSeated"
|
||||
|
@ -5313,19 +5257,19 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5380,19 +5324,19 @@
|
|||
},
|
||||
{
|
||||
"state": "idle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5469,19 +5413,19 @@
|
|||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "strafeRightHmd",
|
||||
|
@ -5533,19 +5477,19 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "idleSettle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5597,19 +5541,19 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "idleSettle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5661,19 +5605,19 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "idleSettle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5725,19 +5669,19 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "idleSettle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5794,19 +5738,19 @@
|
|||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnLeft",
|
||||
|
@ -5859,19 +5803,19 @@
|
|||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5919,15 +5863,15 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "idleSettle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "strafeLeftHmd",
|
||||
|
@ -5935,11 +5879,11 @@
|
|||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -5983,15 +5927,15 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "idleSettle",
|
||||
"var": "isNotMoving"
|
||||
"var": "isNotInput"
|
||||
},
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "strafeRightHmd",
|
||||
|
@ -5999,11 +5943,11 @@
|
|||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
@ -6128,19 +6072,19 @@
|
|||
"transitions": [
|
||||
{
|
||||
"state": "WALKFWD",
|
||||
"var": "isMovingForward"
|
||||
"var": "isInputForward"
|
||||
},
|
||||
{
|
||||
"state": "WALKBWD",
|
||||
"var": "isMovingBackward"
|
||||
"var": "isInputBackward"
|
||||
},
|
||||
{
|
||||
"state": "STRAFERIGHT",
|
||||
"var": "isMovingRight"
|
||||
"var": "isInputRight"
|
||||
},
|
||||
{
|
||||
"state": "STRAFELEFT",
|
||||
"var": "isMovingLeft"
|
||||
"var": "isInputLeft"
|
||||
},
|
||||
{
|
||||
"state": "turnRight",
|
||||
|
|
|
@ -580,8 +580,9 @@ Rectangle {
|
|||
sendToScript(msg);
|
||||
} else if (msg.method === "showInvalidatedLightbox") {
|
||||
lightboxPopup.titleText = "Item Invalidated";
|
||||
lightboxPopup.bodyText = 'Your item is marked "invalidated" because this item has been suspended ' +
|
||||
"from the Marketplace due to a claim against its author.";
|
||||
lightboxPopup.bodyText = 'This item has been invalidated and is no longer available.<br>' +
|
||||
'If you have questions, please contact marketplace@highfidelity.com.<br>' +
|
||||
'Thank you!';
|
||||
lightboxPopup.button1text = "CLOSE";
|
||||
lightboxPopup.button1method = function() {
|
||||
lightboxPopup.visible = false;
|
||||
|
|
|
@ -440,6 +440,7 @@ Rectangle {
|
|||
placeholderTextColor: "#8E8E8E"
|
||||
font.pixelSize: 14
|
||||
placeholderText: width - leftPadding - rightPadding < goToTextFieldMetrics.width ? shortPlaceholderText : longPlaceholderText
|
||||
blankPlaceholderTextOnFocus: false
|
||||
clip: true
|
||||
selectByMouse: true
|
||||
autoScroll: true
|
||||
|
|
|
@ -252,6 +252,7 @@
|
|||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <VersionHelpers.h>
|
||||
#include <Windows.h>
|
||||
|
||||
// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
|
||||
// FIXME seems to be broken.
|
||||
|
@ -532,6 +533,11 @@ bool isDomainURL(QUrl url) {
|
|||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static const UINT UWM_IDENTIFY_INSTANCES =
|
||||
RegisterWindowMessage("UWM_IDENTIFY_INSTANCES_{8AB82783-B74A-4258-955B-8188C22AA0D6}_" + qgetenv("USERNAME"));
|
||||
static const UINT UWM_SHOW_APPLICATION =
|
||||
RegisterWindowMessage("UWM_SHOW_APPLICATION_{71123FD6-3DA8-4DC1-9C27-8A12A6250CBA}_" + qgetenv("USERNAME"));
|
||||
|
||||
class MyNativeEventFilter : public QAbstractNativeEventFilter {
|
||||
public:
|
||||
static MyNativeEventFilter& getInstance() {
|
||||
|
@ -968,6 +974,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
|
|||
|
||||
QObject::connect(PlatformHelper::instance(), &PlatformHelper::systemWillWake, [] {
|
||||
QMetaObject::invokeMethod(DependencyManager::get<NodeList>().data(), "noteAwakening", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "noteAwakening", Qt::QueuedConnection);
|
||||
});
|
||||
|
||||
|
||||
|
@ -4957,7 +4964,7 @@ extern "C" {
|
|||
CCHAR NumberOfProcessors;
|
||||
};
|
||||
|
||||
NTSYSCALLAPI NTSTATUS NTAPI NtQuerySystemInformation(
|
||||
NTSYSCALLAPI LONG NTAPI NtQuerySystemInformation(
|
||||
_In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
||||
_Out_writes_bytes_opt_(SystemInformationLength) PVOID SystemInformation,
|
||||
_In_ ULONG SystemInformationLength,
|
||||
|
@ -4966,12 +4973,12 @@ extern "C" {
|
|||
|
||||
}
|
||||
template <typename T>
|
||||
NTSTATUS NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, T& t) {
|
||||
LONG NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, T& t) {
|
||||
return NtQuerySystemInformation(SystemInformationClass, &t, (ULONG)sizeof(T), nullptr);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
NTSTATUS NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, std::vector<T>& t) {
|
||||
LONG NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, std::vector<T>& t) {
|
||||
return NtQuerySystemInformation(SystemInformationClass, t.data(), (ULONG)(sizeof(T) * t.size()), nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,12 +91,6 @@ namespace controller {
|
|||
class StateController;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static const UINT UWM_IDENTIFY_INSTANCES =
|
||||
RegisterWindowMessage("UWM_IDENTIFY_INSTANCES_{8AB82783-B74A-4258-955B-8188C22AA0D6}_" + qgetenv("USERNAME"));
|
||||
static const UINT UWM_SHOW_APPLICATION =
|
||||
RegisterWindowMessage("UWM_SHOW_APPLICATION_{71123FD6-3DA8-4DC1-9C27-8A12A6250CBA}_" + qgetenv("USERNAME"));
|
||||
#endif
|
||||
|
||||
static const QString RUNNING_MARKER_FILENAME = "Interface.running";
|
||||
static const QString SCRIPTS_SWITCH = "scripts";
|
||||
|
|
|
@ -640,11 +640,6 @@ Menu::Menu() {
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Developer >> Tests >>>
|
||||
MenuWrapper* testMenu = developerMenu->addMenu("Tests");
|
||||
addActionToQMenuAndActionHash(testMenu, MenuOption::RunClientScriptTests, 0, dialogsManager.data(), SLOT(showTestingResults()));
|
||||
|
||||
// Developer > Timing >>>
|
||||
MenuWrapper* timingMenu = developerMenu->addMenu("Timing");
|
||||
MenuWrapper* perfTimerMenu = timingMenu->addMenu("Performance Timer");
|
||||
|
|
|
@ -178,7 +178,6 @@ namespace MenuOption {
|
|||
const QString ResetAvatarSize = "Reset Avatar Size";
|
||||
const QString ResetSensors = "Reset Sensors";
|
||||
const QString RunningScripts = "Running Scripts...";
|
||||
const QString RunClientScriptTests = "Run Client Script Tests";
|
||||
const QString RunTimingTests = "Run Timing Tests";
|
||||
const QString ScriptedMotorControl = "Enable Scripted Motor Control";
|
||||
const QString ShowTrackedObjects = "Show Tracked Objects";
|
||||
|
|
|
@ -315,6 +315,10 @@ void MySkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) {
|
|||
const float TALKING_TIME_THRESHOLD = 0.75f;
|
||||
params.isTalking = head->getTimeWithoutTalking() <= TALKING_TIME_THRESHOLD;
|
||||
|
||||
//pass X and Z input key floats (-1 to 1) to rig
|
||||
params.inputX = myAvatar->getDriveKey(MyAvatar::TRANSLATE_X);
|
||||
params.inputZ = myAvatar->getDriveKey(MyAvatar::TRANSLATE_Z);
|
||||
|
||||
myAvatar->updateRigControllerParameters(params);
|
||||
|
||||
_rig.updateFromControllerParameters(params, deltaTime);
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "Profile.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <Windows.h>
|
||||
extern "C" {
|
||||
typedef int(__stdcall * CHECKMINSPECPROC) ();
|
||||
}
|
||||
|
|
|
@ -186,15 +186,6 @@ void DialogsManager::setAddressBarVisible(bool addressBarVisible) {
|
|||
emit addressBarShown(_addressBarVisible);
|
||||
}
|
||||
|
||||
void DialogsManager::showTestingResults() {
|
||||
if (!_testingDialog) {
|
||||
_testingDialog = new TestingDialog(qApp->getWindow());
|
||||
connect(_testingDialog, SIGNAL(closed()), _testingDialog, SLOT(deleteLater()));
|
||||
}
|
||||
_testingDialog->show();
|
||||
_testingDialog->raise();
|
||||
}
|
||||
|
||||
void DialogsManager::showDomainConnectionDialog() {
|
||||
// if the dialog already exists we delete it so the connection data is refreshed
|
||||
if (_domainConnectionDialog) {
|
||||
|
|
|
@ -53,7 +53,6 @@ public slots:
|
|||
void lodTools();
|
||||
void hmdTools(bool showTools);
|
||||
void showDomainConnectionDialog();
|
||||
void showTestingResults();
|
||||
void toggleAddressBar();
|
||||
|
||||
// Application Update
|
||||
|
|
|
@ -2160,6 +2160,51 @@ void Rig::updateFromControllerParameters(const ControllerParameters& params, flo
|
|||
}
|
||||
}
|
||||
|
||||
//deadzone constant
|
||||
const float INPUT_DEADZONE_THRESHOLD = 0.05f;
|
||||
|
||||
if (fabsf(params.inputX) <= INPUT_DEADZONE_THRESHOLD && fabsf(params.inputZ) <= INPUT_DEADZONE_THRESHOLD) {
|
||||
// no WASD input
|
||||
_animVars.set("isInputForward", false);
|
||||
_animVars.set("isInputBackward", false);
|
||||
_animVars.set("isInputRight", false);
|
||||
_animVars.set("isInputLeft", false);
|
||||
_animVars.set("isNotInput", true);
|
||||
} else if (fabsf(params.inputZ) >= fabsf(params.inputX)) {
|
||||
if (params.inputZ > 0.0f) {
|
||||
// forward
|
||||
_animVars.set("isInputForward", true);
|
||||
_animVars.set("isInputBackward", false);
|
||||
_animVars.set("isInputRight", false);
|
||||
_animVars.set("isInputLeft", false);
|
||||
_animVars.set("isNotInput", false);
|
||||
} else {
|
||||
// backward
|
||||
_animVars.set("isInputForward", false);
|
||||
_animVars.set("isInputBackward", true);
|
||||
_animVars.set("isInputRight", false);
|
||||
_animVars.set("isInputLeft", false);
|
||||
_animVars.set("isNotInput", false);
|
||||
}
|
||||
} else {
|
||||
if (params.inputX > 0.0f) {
|
||||
// right
|
||||
_animVars.set("isInputForward", false);
|
||||
_animVars.set("isInputBackward", false);
|
||||
_animVars.set("isInputRight", true);
|
||||
_animVars.set("isInputLeft", false);
|
||||
_animVars.set("isNotInput", false);
|
||||
} else {
|
||||
// left
|
||||
_animVars.set("isInputForward", false);
|
||||
_animVars.set("isInputBackward", false);
|
||||
_animVars.set("isInputRight", false);
|
||||
_animVars.set("isInputLeft", true);
|
||||
_animVars.set("isNotInput", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_headEnabled = params.primaryControllerFlags[PrimaryControllerType_Head] & (uint8_t)ControllerFlags::Enabled;
|
||||
bool leftHandEnabled = params.primaryControllerFlags[PrimaryControllerType_LeftHand] & (uint8_t)ControllerFlags::Enabled;
|
||||
bool rightHandEnabled = params.primaryControllerFlags[PrimaryControllerType_RightHand] & (uint8_t)ControllerFlags::Enabled;
|
||||
|
|
|
@ -88,6 +88,8 @@ public:
|
|||
AnimPose secondaryControllerPoses[NumSecondaryControllerTypes]; // rig space
|
||||
uint8_t secondaryControllerFlags[NumSecondaryControllerTypes];
|
||||
bool isTalking;
|
||||
float inputX;
|
||||
float inputZ;
|
||||
bool reactionEnabledFlags[NUM_AVATAR_BEGIN_END_REACTIONS];
|
||||
bool reactionTriggers[NUM_AVATAR_TRIGGER_REACTIONS];
|
||||
HFMJointShapeInfo hipsShapeInfo;
|
||||
|
|
|
@ -1998,6 +1998,12 @@ void AudioClient::outputNotify() {
|
|||
}
|
||||
}
|
||||
|
||||
void AudioClient::noteAwakening() {
|
||||
qCDebug(audioclient) << "Restarting the audio devices.";
|
||||
switchInputToAudioDevice(_inputDeviceInfo);
|
||||
switchOutputToAudioDevice(_outputDeviceInfo);
|
||||
}
|
||||
|
||||
bool AudioClient::switchOutputToAudioDevice(const HifiAudioDeviceInfo outputDeviceInfo, bool isShutdownRequest) {
|
||||
Q_ASSERT_X(QThread::currentThread() == thread(), Q_FUNC_INFO, "Function invoked on wrong thread");
|
||||
|
||||
|
|
|
@ -255,6 +255,7 @@ public slots:
|
|||
void setOutputGain(float gain) { _outputGain = gain; };
|
||||
|
||||
void outputNotify();
|
||||
void noteAwakening();
|
||||
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QDesktopWidget>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QScreen>
|
||||
#include <QtGui/QWindow>
|
||||
#include <QQuickWindow>
|
||||
#include <QtQuick/QQuickWindow>
|
||||
|
||||
#include <DebugDraw.h>
|
||||
#include <shared/QtHelpers.h>
|
||||
|
@ -177,9 +177,35 @@ QPointF CompositorHelper::getMouseEventPosition(QMouseEvent* event) {
|
|||
return event->localPos();
|
||||
}
|
||||
|
||||
static bool isWindowActive() {
|
||||
for (const auto& window : QGuiApplication::topLevelWindows()) {
|
||||
if (window->isActive()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CompositorHelper::shouldCaptureMouse() const {
|
||||
if (!_allowMouseCapture) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isHMD()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!isWindowActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ui::Menu::isSomeSubmenuShown()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// if we're in HMD mode, and some window of ours is active, but we're not currently showing a popup menu
|
||||
return _allowMouseCapture && isHMD() && QApplication::activeWindow() && !ui::Menu::isSomeSubmenuShown();
|
||||
return true;
|
||||
}
|
||||
|
||||
void CompositorHelper::setAllowMouseCapture(bool capture) {
|
||||
|
@ -206,9 +232,9 @@ void CompositorHelper::handleLeaveEvent() {
|
|||
mainWidgetFrame.moveTopLeft(topLeftScreen);
|
||||
}
|
||||
QRect uncoveredRect = mainWidgetFrame;
|
||||
foreach(QWidget* widget, QApplication::topLevelWidgets()) {
|
||||
if (widget->isWindow() && widget->isVisible() && widget != mainWidget) {
|
||||
QRect widgetFrame = widget->frameGeometry();
|
||||
for(QWindow* window : QGuiApplication::topLevelWindows()) {
|
||||
if (window->isVisible() && window != mainWidget->windowHandle()) {
|
||||
QRect widgetFrame = window->frameGeometry();
|
||||
if (widgetFrame.intersects(uncoveredRect)) {
|
||||
QRect intersection = uncoveredRect & widgetFrame;
|
||||
if (intersection.top() > uncoveredRect.top()) {
|
||||
|
@ -292,7 +318,7 @@ glm::vec2 CompositorHelper::getReticleMaximumPosition() const {
|
|||
if (isHMD()) {
|
||||
result = VIRTUAL_SCREEN_SIZE;
|
||||
} else {
|
||||
QRect rec = QApplication::desktop()->screenGeometry();
|
||||
QRect rec = QGuiApplication::primaryScreen()->geometry();
|
||||
result = glm::vec2(rec.right(), rec.bottom());
|
||||
}
|
||||
return result;
|
||||
|
@ -308,8 +334,8 @@ void CompositorHelper::sendFakeMouseEvent() {
|
|||
// in HMD mode we need to fake our mouse moves...
|
||||
QPoint globalPos(_reticlePositionInHMD.x, _reticlePositionInHMD.y);
|
||||
auto button = Qt::NoButton;
|
||||
auto buttons = QApplication::mouseButtons();
|
||||
auto modifiers = QApplication::keyboardModifiers();
|
||||
auto buttons = QGuiApplication::mouseButtons();
|
||||
auto modifiers = QGuiApplication::keyboardModifiers();
|
||||
QMouseEvent event(QEvent::MouseMove, globalPos, button, buttons, modifiers);
|
||||
_fakeMouseEvent = true;
|
||||
qApp->sendEvent(_renderingWidget, &event);
|
||||
|
|
|
@ -373,7 +373,7 @@ void OpenGLDisplayPlugin::customizeContext() {
|
|||
auto usage = gpu::Texture::Usage::Builder().withColor().withAlpha();
|
||||
cursorData.texture->setUsage(usage.build());
|
||||
cursorData.texture->setStoredMipFormat(gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA));
|
||||
cursorData.texture->assignStoredMip(0, image.byteCount(), image.constBits());
|
||||
cursorData.texture->assignStoredMip(0, image.sizeInBytes(), image.constBits());
|
||||
cursorData.texture->setAutoGenerateMips(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ void HmdDisplayPlugin::internalPresent() {
|
|||
_previewTexture->setSource("HMD Preview Texture");
|
||||
_previewTexture->setUsage(gpu::Texture::Usage::Builder().withColor().build());
|
||||
_previewTexture->setStoredMipFormat(gpu::Element(gpu::VEC4, gpu::NUINT8, gpu::RGBA));
|
||||
_previewTexture->assignStoredMip(0, image.byteCount(), image.constBits());
|
||||
_previewTexture->assignStoredMip(0, image.sizeInBytes(), image.constBits());
|
||||
_previewTexture->setAutoGenerateMips(true);
|
||||
|
||||
auto viewport = getViewportForSourceSize(uvec2(_previewTexture->getDimensions()));
|
||||
|
|
|
@ -666,7 +666,7 @@ QScriptValue EntityScriptingInterface::getMultipleEntityProperties(QScriptContex
|
|||
const int ARGUMENT_EXTENDED_DESIRED_PROPERTIES = 1;
|
||||
|
||||
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
||||
const auto entityIDs = qScriptValueToValue<QVector<QUuid>>(context->argument(ARGUMENT_ENTITY_IDS));
|
||||
const auto entityIDs = qscriptvalue_cast<QVector<QUuid>>(context->argument(ARGUMENT_ENTITY_IDS));
|
||||
return entityScriptingInterface->getMultipleEntityPropertiesInternal(engine, entityIDs, context->argument(ARGUMENT_EXTENDED_DESIRED_PROPERTIES));
|
||||
}
|
||||
|
||||
|
@ -716,7 +716,7 @@ QScriptValue EntityScriptingInterface::getMultipleEntityPropertiesInternal(QScri
|
|||
psuedoPropertyFlags.set(EntityPsuedoPropertyFlag::FlagsActive);
|
||||
}
|
||||
|
||||
EntityPropertyFlags desiredProperties = qScriptValueToValue<EntityPropertyFlags>(extendedDesiredProperties);
|
||||
EntityPropertyFlags desiredProperties = qscriptvalue_cast<EntityPropertyFlags>(extendedDesiredProperties);
|
||||
bool needsScriptSemantics = desiredProperties.getHasProperty(PROP_POSITION) ||
|
||||
desiredProperties.getHasProperty(PROP_ROTATION) ||
|
||||
desiredProperties.getHasProperty(PROP_LOCAL_POSITION) ||
|
||||
|
|
|
@ -1859,7 +1859,7 @@ bool GLTFSerializer::readArray(const hifi::ByteArray& bin, int byteOffset, int c
|
|||
break;
|
||||
default:
|
||||
qWarning(modelformat) << "Unknown accessorType: " << accessorType;
|
||||
blobstream.unsetDevice();
|
||||
blobstream.setDevice(nullptr);
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < count; ++i) {
|
||||
|
@ -1869,13 +1869,13 @@ bool GLTFSerializer::readArray(const hifi::ByteArray& bin, int byteOffset, int c
|
|||
blobstream >> value;
|
||||
outarray.push_back(value);
|
||||
} else {
|
||||
blobstream.unsetDevice();
|
||||
blobstream.setDevice(nullptr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
blobstream.unsetDevice();
|
||||
blobstream.setDevice(nullptr);
|
||||
return true;
|
||||
}
|
||||
template<typename T>
|
||||
|
|
|
@ -20,7 +20,7 @@ size_t Image::getByteCount() const {
|
|||
if (_format == Format_RGBAF) {
|
||||
return sizeof(FloatPixels::value_type) * _floatData.size();
|
||||
} else {
|
||||
return _packedData.byteCount();
|
||||
return _packedData.sizeInBytes();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -808,6 +808,8 @@ void AccountManager::requestAccountSettings() {
|
|||
return;
|
||||
}
|
||||
|
||||
qCDebug(networking) << "Requesting the Account Settings from the Metaverse API";
|
||||
|
||||
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
|
||||
|
||||
QUrl lockerURL = _authURL;
|
||||
|
@ -834,6 +836,9 @@ void AccountManager::requestAccountSettingsFinished() {
|
|||
if (rootObject.contains("status") && rootObject["status"].toString() == "success") {
|
||||
if (rootObject.contains("data") && rootObject["data"].isObject()) {
|
||||
_settings.unpack(rootObject["data"].toObject());
|
||||
_lastSuccessfulSyncTimestamp = _settings.lastChangeTimestamp();
|
||||
|
||||
qCDebug(networking) << "Received the Account Settings from the Metaverse API";
|
||||
|
||||
emit accountSettingsLoaded();
|
||||
} else {
|
||||
|
@ -874,6 +879,8 @@ void AccountManager::postAccountSettings() {
|
|||
return;
|
||||
}
|
||||
|
||||
qCDebug(networking) << "Account Settings have changed, pushing them to the Metaverse API";
|
||||
|
||||
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
|
||||
|
||||
QUrl lockerURL = _authURL;
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
|
||||
#include "NetworkLogging.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
int hifiSockAddrMetaTypeId = qRegisterMetaType<HifiSockAddr>();
|
||||
|
||||
HifiSockAddr::HifiSockAddr() :
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
struct sockaddr;
|
||||
|
||||
#include <QtNetwork/QHostInfo>
|
||||
|
||||
|
|
|
@ -38,6 +38,12 @@
|
|||
#include "udt/Packet.h"
|
||||
#include "HMACAuth.h"
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include <winsock.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
static Setting::Handle<quint16> LIMITED_NODELIST_LOCAL_PORT("LimitedNodeList.LocalPort", 0);
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
|
|
@ -31,6 +31,14 @@
|
|||
|
||||
using namespace udt;
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
||||
Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) :
|
||||
QObject(parent),
|
||||
_udpSocket(parent),
|
||||
|
|
|
@ -258,7 +258,7 @@ void Font::read(QIODevice& in) {
|
|||
_texture = gpu::Texture::create2D(formatGPU, image.width(), image.height(), gpu::Texture::SINGLE_MIP,
|
||||
gpu::Sampler(gpu::Sampler::FILTER_MIN_POINT_MAG_LINEAR));
|
||||
_texture->setStoredMipFormat(formatMip);
|
||||
_texture->assignStoredMip(0, image.byteCount(), image.constBits());
|
||||
_texture->assignStoredMip(0, image.sizeInBytes(), image.constBits());
|
||||
}
|
||||
|
||||
void Font::setupGPU() {
|
||||
|
|
|
@ -46,13 +46,13 @@ void MovingPercentile::updatePercentile(qint64 sample) {
|
|||
// swap new sample with neighbors in _samplesSorted until it's in sorted order
|
||||
// try swapping up first, then down. element will only be swapped one direction.
|
||||
while (newSampleIndex < _samplesSorted.size() - 1 && sample > _samplesSorted[newSampleIndex + 1]) {
|
||||
_samplesSorted.swap(newSampleIndex, newSampleIndex + 1);
|
||||
_sampleIds.swap(newSampleIndex, newSampleIndex + 1);
|
||||
std::swap(_samplesSorted[newSampleIndex], _samplesSorted[newSampleIndex + 1]);
|
||||
std::swap(_sampleIds[newSampleIndex], _sampleIds[newSampleIndex + 1]);
|
||||
newSampleIndex++;
|
||||
}
|
||||
while (newSampleIndex > 0 && sample < _samplesSorted[newSampleIndex - 1]) {
|
||||
_samplesSorted.swap(newSampleIndex, newSampleIndex - 1);
|
||||
_sampleIds.swap(newSampleIndex, newSampleIndex - 1);
|
||||
std::swap(_samplesSorted[newSampleIndex], _samplesSorted[newSampleIndex - 1]);
|
||||
std::swap(_sampleIds[newSampleIndex], _sampleIds[newSampleIndex - 1]);
|
||||
newSampleIndex--;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <unordered_map>
|
||||
#include <chrono>
|
||||
|
||||
#include <QtCore/QOperatingSystemVersion>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
@ -793,15 +794,7 @@ void printSystemInformation() {
|
|||
qCDebug(shared).noquote() << "\tKernel Type: " << QSysInfo::kernelType();
|
||||
qCDebug(shared).noquote() << "\tKernel Version: " << QSysInfo::kernelVersion();
|
||||
|
||||
auto macVersion = QSysInfo::macVersion();
|
||||
if (macVersion != QSysInfo::MV_None) {
|
||||
qCDebug(shared) << "\tMac Version: " << macVersion;
|
||||
}
|
||||
|
||||
auto windowsVersion = QSysInfo::windowsVersion();
|
||||
if (windowsVersion != QSysInfo::WV_None) {
|
||||
qCDebug(shared) << "\tWindows Version: " << windowsVersion;
|
||||
}
|
||||
qCDebug(shared) << "\tOS Version: " << QOperatingSystemVersion::current();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
SYSTEM_INFO si;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <QtCore/qjsondocument.h>
|
||||
#include <QtCore/qjsonobject.h>
|
||||
#include <QtCore/qjsonvalue.h>
|
||||
#include <QtCore/QRegularExpression>
|
||||
#include <shared/JSONHelpers.h>
|
||||
|
||||
#include "SettingHandle.h"
|
||||
|
@ -189,7 +190,7 @@ public:
|
|||
* @returns {object[]}
|
||||
*/
|
||||
Q_INVOKABLE QObjectList getSubConfigs() const {
|
||||
auto list = findChildren<JobConfig*>(QRegExp(".*"), Qt::FindDirectChildrenOnly);
|
||||
auto list = findChildren<JobConfig*>(QRegularExpression(".*"), Qt::FindDirectChildrenOnly);
|
||||
QObjectList returned;
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
returned.push_back(list[i]);
|
||||
|
|
|
@ -56,10 +56,10 @@ void InfoView::show(const QString& path, bool firstOrChangedOnly, QString urlQue
|
|||
const QString lastVersion = infoVersion.get();
|
||||
const QString version = fetchVersion(url);
|
||||
// If we have version information stored
|
||||
if (lastVersion != QString::null) {
|
||||
if (!lastVersion.isNull()) {
|
||||
// Check to see the document version. If it's valid and matches
|
||||
// the stored version, we're done, so exit
|
||||
if (version == QString::null || version == lastVersion) {
|
||||
if (version.isNull() || version == lastVersion) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
#include "MainWindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QScreen>
|
||||
#include <QEvent>
|
||||
#include <QMoveEvent>
|
||||
#include <QResizeEvent>
|
||||
|
@ -22,8 +22,8 @@
|
|||
#include <QDragEnterEvent>
|
||||
#include <QDropEvent>
|
||||
#include <QMimeData>
|
||||
#include <QWindow>
|
||||
#include <QDebug>
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
#include "ui/Logging.h"
|
||||
#include "DockWidget.h"
|
||||
|
@ -60,7 +60,7 @@ QWindow* MainWindow::findMainWindow() {
|
|||
void MainWindow::restoreGeometry() {
|
||||
// Did not use setGeometry() on purpose,
|
||||
// see http://doc.qt.io/qt-5/qsettings.html#restoring-the-state-of-a-gui-application
|
||||
QRect windowGeometry = qApp->desktop()->availableGeometry();
|
||||
QRect windowGeometry = QGuiApplication::primaryScreen()->availableGeometry();
|
||||
#if defined(Q_OS_MAC)
|
||||
windowGeometry.setSize((windowGeometry.size() * 0.5f));
|
||||
#endif
|
||||
|
|
|
@ -92,15 +92,19 @@ public:
|
|||
ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr);
|
||||
|
||||
/**jsdoc
|
||||
* <em>Currently doesn't work.</em>
|
||||
* @function ToolbarProxy#addButton
|
||||
* @param {object} properties
|
||||
* @returns {ToolbarButtonProxy}
|
||||
* @param {object} properties - Button properties
|
||||
* @returns {object} The button added.
|
||||
* @deprecated This method is deprecated and will be removed.
|
||||
*/
|
||||
Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties);
|
||||
|
||||
/**jsdoc
|
||||
* <em>Currently doesn't work.</em>
|
||||
* @function ToolbarProxy#removeButton
|
||||
* @param {string} name
|
||||
* @param {string} name - Button name.
|
||||
* @deprecated This method is deprecated and will be removed.
|
||||
*/
|
||||
Q_INVOKABLE void removeButton(const QVariant& name);
|
||||
|
||||
|
|
|
@ -127,3 +127,8 @@ Script.scriptEnding.connect(function() {
|
|||
});
|
||||
|
||||
Menu.menuItemEvent.connect(menuItemEvent);
|
||||
|
||||
var ANDROID_UI_AUTO_LOD_ADJUST = false;
|
||||
var ANDROID_UI_LOD_ANGLE_DEG = 0.248;
|
||||
LODManager.automaticLODAdjust = ANDROID_UI_AUTO_LOD_ADJUST;
|
||||
LODManager.lodAngleDeg = ANDROID_UI_LOD_ANGLE_DEG;
|
||||
|
|
|
@ -1,117 +1,38 @@
|
|||
var isActive = false;
|
||||
(function () {
|
||||
|
||||
var toolBar = (function() {
|
||||
var that = {},
|
||||
toolBar,
|
||||
activeButton,
|
||||
newModelButton,
|
||||
newShapeButton,
|
||||
newLightButton,
|
||||
newTextButton,
|
||||
newWebButton,
|
||||
newZoneButton,
|
||||
newParticleButton,
|
||||
newMaterialButton
|
||||
|
||||
var toolIconUrl = Script.resolvePath("../../system/assets/images/tools/");
|
||||
|
||||
function initialize() {
|
||||
print("Toolbars: " + Toolbars);
|
||||
toolBar = Toolbars.getToolbar("highfidelity.edit.toolbar");
|
||||
print("Toolbar: " + toolBar);
|
||||
activeButton = toolBar.addButton({
|
||||
objectName: "activeButton",
|
||||
imageURL: toolIconUrl + "edit-01.svg",
|
||||
visible: true,
|
||||
alpha: 0.9,
|
||||
});
|
||||
|
||||
print("Button " + activeButton);
|
||||
print("Button signal " + activeButton.clicked);
|
||||
activeButton.clicked.connect(function(){
|
||||
print("Clicked on button " + isActive);
|
||||
that.setActive(!isActive);
|
||||
});
|
||||
|
||||
newModelButton = toolBar.addButton({
|
||||
objectName: "newModelButton",
|
||||
imageURL: toolIconUrl + "model-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newShapeButton = toolBar.addButton({
|
||||
objectName: "newShapeButton",
|
||||
imageURL: toolIconUrl + "cube-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newLightButton = toolBar.addButton({
|
||||
objectName: "newLightButton",
|
||||
imageURL: toolIconUrl + "light-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newTextButton = toolBar.addButton({
|
||||
objectName: "newTextButton",
|
||||
imageURL: toolIconUrl + "text-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newWebButton = toolBar.addButton({
|
||||
objectName: "newWebButton",
|
||||
imageURL: toolIconUrl + "web-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newZoneButton = toolBar.addButton({
|
||||
objectName: "newZoneButton",
|
||||
imageURL: toolIconUrl + "zone-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newParticleButton = toolBar.addButton({
|
||||
objectName: "newParticleButton",
|
||||
imageURL: toolIconUrl + "particle-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
newMaterialButton = toolBar.addButton({
|
||||
objectName: "newMaterialButton",
|
||||
imageURL: toolIconUrl + "material-01.svg",
|
||||
alpha: 0.9,
|
||||
visible: false
|
||||
});
|
||||
|
||||
that.setActive(false);
|
||||
newModelButton.clicked();
|
||||
// Get the system toolbar.
|
||||
var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
|
||||
if (!toolbar) {
|
||||
print("ERROR: Couldn't get system toolbar.");
|
||||
return;
|
||||
}
|
||||
|
||||
that.setActive = function(active) {
|
||||
if (active != isActive) {
|
||||
isActive = active;
|
||||
that.showTools(isActive);
|
||||
}
|
||||
};
|
||||
Script.setTimeout(function () {
|
||||
// Report the system toolbar visibility.
|
||||
var isToolbarVisible = toolbar.readProperty("visible");
|
||||
print("Toolbar visible: " + isToolbarVisible);
|
||||
|
||||
// Sets visibility of tool buttons, excluding the power button
|
||||
that.showTools = function(doShow) {
|
||||
newModelButton.writeProperty('visible', doShow);
|
||||
newShapeButton.writeProperty('visible', doShow);
|
||||
newLightButton.writeProperty('visible', doShow);
|
||||
newTextButton.writeProperty('visible', doShow);
|
||||
newWebButton.writeProperty('visible', doShow);
|
||||
newZoneButton.writeProperty('visible', doShow);
|
||||
newParticleButton.writeProperty('visible', doShow);
|
||||
newMaterialButton.writeProperty('visible', doShow);
|
||||
};
|
||||
// Briefly toggle the system toolbar visibility.
|
||||
print("Toggle toolbar");
|
||||
toolbar.writeProperty("visible", !isToolbarVisible);
|
||||
Script.setTimeout(function () {
|
||||
print("Toggle toolbar");
|
||||
toolbar.writeProperty("visible", isToolbarVisible);
|
||||
}, 2000);
|
||||
}, 2000);
|
||||
|
||||
Script.setTimeout(function () {
|
||||
// Report the system toolbar visibility alternative method.
|
||||
isToolbarVisible = toolbar.readProperties(["visible"]).visible;
|
||||
print("Toolbar visible: " + isToolbarVisible);
|
||||
|
||||
// Briefly toggle the system toolbar visibility.
|
||||
print("Toggle toolbar");
|
||||
toolbar.writeProperties({ visible: !isToolbarVisible });
|
||||
Script.setTimeout(function () {
|
||||
print("Toggle toolbar");
|
||||
toolbar.writeProperties({ visible: isToolbarVisible });
|
||||
}, 2000);
|
||||
}, 6000);
|
||||
|
||||
initialize();
|
||||
return that;
|
||||
}());
|
||||
|
|
|
@ -22,6 +22,31 @@ var SECONDS_IN_MINUTE = 60;
|
|||
// Delete after 5 minutes in case a nametag is hanging around in on mode
|
||||
var ALWAYS_ON_MAX_LIFETIME_IN_SECONDS = 5 * SECONDS_IN_MINUTE;
|
||||
|
||||
// *************************************
|
||||
// START STARTUP/SHUTDOWN
|
||||
// *************************************
|
||||
// #region STARTUP/SHUTDOWN
|
||||
|
||||
|
||||
// Connect the camera mode updated signal on startup
|
||||
function startup() {
|
||||
Camera.modeUpdated.connect(handleCameraModeChanged);
|
||||
cameraModeUpdatedSignalConnected = true;
|
||||
|
||||
Script.scriptEnding.connect(shutdown);
|
||||
}
|
||||
|
||||
startup();
|
||||
|
||||
function shutdown() {
|
||||
maybeDisconnectCameraModeUpdatedSignal();
|
||||
}
|
||||
|
||||
|
||||
// *************************************
|
||||
// END STARTUP/SHUTDOWN
|
||||
// *************************************
|
||||
|
||||
// *************************************
|
||||
// START UTILTY
|
||||
// *************************************
|
||||
|
@ -197,6 +222,27 @@ function toggleInterval() {
|
|||
}
|
||||
|
||||
|
||||
// Disconnect the camera mode updated signal if we have one connected for the selfie mode
|
||||
var cameraModeUpdatedSignalConnected = false;
|
||||
function maybeDisconnectCameraModeUpdatedSignal() {
|
||||
if (cameraModeUpdatedSignalConnected) {
|
||||
Camera.modeUpdated.disconnect(handleCameraModeChanged);
|
||||
cameraModeUpdatedSignalConnected = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Turn on the nametag for yourself if you are in selfie mode, other wise delete it
|
||||
function handleCameraModeChanged(mode) {
|
||||
if (mode === "selfie") {
|
||||
if (avatarNametagMode === "alwaysOn") {
|
||||
add(MyAvatar.sessionUUID);
|
||||
}
|
||||
} else {
|
||||
maybeRemove(MyAvatar.sessionUUID);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle checking to see if we should add or delete nametags in persistent mode
|
||||
var alwaysOnAvatarDistanceCheck = false;
|
||||
var DISTANCE_CHECK_INTERVAL_MS = 1000;
|
||||
|
@ -215,6 +261,10 @@ function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) {
|
|||
});
|
||||
maybeClearAlwaysOnAvatarDistanceCheck();
|
||||
alwaysOnAvatarDistanceCheck = Script.setInterval(maybeAddOrRemoveIntervalCheck, DISTANCE_CHECK_INTERVAL_MS);
|
||||
|
||||
if (Camera.mode === "selfie") {
|
||||
add(MyAvatar.sessionUUID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -159,6 +159,7 @@ var SETTINGS_APP_WINDOW_FLAGS = 0x00000001 | // Qt::Window
|
|||
0x08000000 | // Qt::WindowCloseButtonHint
|
||||
0x00008000 | // Qt::WindowMaximizeButtonHint
|
||||
0x00004000; // Qt::WindowMinimizeButtonHint
|
||||
var SETTINGS_APP_RIGHT_MARGIN = 48;
|
||||
var settingsAppWindow = false;
|
||||
function toggleSettingsApp() {
|
||||
if (settingsAppWindow) {
|
||||
|
@ -178,7 +179,7 @@ function toggleSettingsApp() {
|
|||
y: SETTINGS_APP_HEIGHT_PX
|
||||
},
|
||||
position: {
|
||||
x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - SETTINGS_APP_WIDTH_PX / 2),
|
||||
x: Window.x + Window.innerWidth - SETTINGS_APP_WIDTH_PX - SETTINGS_APP_RIGHT_MARGIN,
|
||||
y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - SETTINGS_APP_HEIGHT_PX / 2)
|
||||
},
|
||||
overrideFlags: SETTINGS_APP_WINDOW_FLAGS
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
"tooltip": "The angle in deg at which light emits. Starts in the entity's -z direction, and rotates around its x axis."
|
||||
},
|
||||
"keyLight.castShadows": {
|
||||
"tooltip": "If enabled, shadows are cast. The entity or avatar casting the shadow must also have Cast Shadows enabled."
|
||||
"tooltip": "If enabled, shadows are cast. The entity or avatar casting the shadow must also have Cast Shadows enabled. Note: Shadows are rendered only on high-profiled computers. This setting will have no effect on computers profiled to medium or low graphics."
|
||||
},
|
||||
"keyLight.shadowBias": {
|
||||
"tooltip": "The bias of the shadows cast by the light. Use this to fine-tune your shadows to your scene to prevent shadow acne and peter panning."
|
||||
|
@ -500,7 +500,7 @@
|
|||
"tooltip": "If enabled, grabbed entities will follow the movements of your hand controller instead of your avatar's hand."
|
||||
},
|
||||
"canCastShadow": {
|
||||
"tooltip": "If enabled, this geometry of this entity casts shadows when a shadow-casting light source shines on it."
|
||||
"tooltip": "If enabled, the geometry of this entity casts shadows when a shadow-casting light source shines on it. Note: Shadows are rendered only on high-profiled computers. This setting will have no effect on computers profiled to medium or low graphics.."
|
||||
},
|
||||
"ignorePickIntersection": {
|
||||
"tooltip": "If enabled, this entity will not be considered for ray picks, and will also not occlude other entities when picking."
|
||||
|
|
|
@ -17,14 +17,12 @@ WIPE_PATHS = []
|
|||
|
||||
if sys.platform == "win32":
|
||||
WIPE_PATHS = [
|
||||
'jsdoc',
|
||||
'resources/serverless'
|
||||
'jsdoc'
|
||||
]
|
||||
elif sys.platform == "darwin":
|
||||
INTERFACE_BUILD_PATH = os.path.join(INTERFACE_BUILD_PATH, "Interface.app", "Contents", "Resources")
|
||||
WIPE_PATHS = [
|
||||
'jsdoc',
|
||||
'serverless'
|
||||
'jsdoc'
|
||||
]
|
||||
|
||||
|
||||
|
@ -81,9 +79,6 @@ def fixupMacZip(filename):
|
|||
# ignore the nitpick app
|
||||
if newFilename.startswith('nitpick.app'):
|
||||
continue
|
||||
# ignore the serverless content
|
||||
if newFilename.startswith('interface.app/Contents/Resources/serverless'):
|
||||
continue
|
||||
# if we made it here, include the file in the output
|
||||
buffer = inzip.read(entry.filename)
|
||||
entry.filename = newFilename
|
||||
|
|
Loading…
Reference in a new issue