Merge pull request #16345 from highfidelity/master

Merge master into instancing
This commit is contained in:
Sabrina Shanman 2019-10-14 14:54:22 -07:00 committed by GitHub
commit c38462bf6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 83 additions and 206 deletions

View file

@ -134,7 +134,7 @@ endif()
downloadVcpkg = True downloadVcpkg = True
if not downloadVcpkg and not os.path.isfile(self.exe): if not downloadVcpkg and not os.path.isfile(self.exe):
print("Missing executable, boostrapping") print("Missing executable, boot-strapping")
downloadVcpkg = True downloadVcpkg = True
# Make sure we have a vcpkg executable # Make sure we have a vcpkg executable

View file

@ -2478,8 +2478,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk", "id": "talk",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -2489,8 +2489,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk02", "id": "talk02",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -2500,8 +2500,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk03", "id": "talk03",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -2511,8 +2511,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk04", "id": "talk04",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -2522,8 +2522,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk_armsdown", "id": "talk_armsdown",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -2533,8 +2533,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk_lefthand", "id": "talk_lefthand",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -2544,8 +2544,8 @@
{ {
"easingType": "easeInOutQuad", "easingType": "easeInOutQuad",
"id": "talk_righthand", "id": "talk_righthand",
"interpDuration": 1, "interpDuration": 20,
"interpTarget": 1, "interpTarget": 20,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"priority": 0.33, "priority": 0.33,
"resume": true, "resume": true,
@ -5242,62 +5242,6 @@
"interpTarget": 6, "interpTarget": 6,
"interpType": "evaluateBoth", "interpType": "evaluateBoth",
"transitions": [ "transitions": [
{
"state": "idle",
"var": "isNotInput"
},
{
"state": "WALKFWD",
"var": "isInputForward"
},
{
"state": "WALKBWD",
"var": "isInputBackward"
},
{
"state": "STRAFERIGHT",
"var": "isInputRight"
},
{
"state": "STRAFELEFT",
"var": "isInputLeft"
},
{
"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", "state": "idle",
"var": "isNotSeated" "var": "isNotSeated"

View file

@ -33,6 +33,12 @@ Item {
property var item: null property var item: null
function load(url, scriptUrl) { function load(url, scriptUrl) {
// Ensure we reset any existing item to "about:blank" to ensure web audio stops: DEV-2375
if (root.item != null) {
root.item.url = "about:blank"
root.item.destroy()
root.item = null
}
QmlSurface.load("./controls/WebView.qml", root, function(newItem) { QmlSurface.load("./controls/WebView.qml", root, function(newItem) {
root.item = newItem root.item = newItem
root.item.url = url root.item.url = url

View file

@ -580,8 +580,9 @@ Rectangle {
sendToScript(msg); sendToScript(msg);
} else if (msg.method === "showInvalidatedLightbox") { } else if (msg.method === "showInvalidatedLightbox") {
lightboxPopup.titleText = "Item Invalidated"; lightboxPopup.titleText = "Item Invalidated";
lightboxPopup.bodyText = 'Your item is marked "invalidated" because this item has been suspended ' + lightboxPopup.bodyText = 'This item has been invalidated and is no longer available.<br>' +
"from the Marketplace due to a claim against its author."; 'If you have questions, please contact marketplace@highfidelity.com.<br>' +
'Thank you!';
lightboxPopup.button1text = "CLOSE"; lightboxPopup.button1text = "CLOSE";
lightboxPopup.button1method = function() { lightboxPopup.button1method = function() {
lightboxPopup.visible = false; lightboxPopup.visible = false;

View file

@ -384,6 +384,7 @@ Rectangle {
placeholderTextColor: "#8E8E8E" placeholderTextColor: "#8E8E8E"
font.pixelSize: 14 font.pixelSize: 14
placeholderText: width - leftPadding - rightPadding < goToTextFieldMetrics.width ? shortPlaceholderText : longPlaceholderText placeholderText: width - leftPadding - rightPadding < goToTextFieldMetrics.width ? shortPlaceholderText : longPlaceholderText
blankPlaceholderTextOnFocus: false
clip: true clip: true
selectByMouse: true selectByMouse: true
autoScroll: true autoScroll: true

View file

@ -974,6 +974,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
QObject::connect(PlatformHelper::instance(), &PlatformHelper::systemWillWake, [] { QObject::connect(PlatformHelper::instance(), &PlatformHelper::systemWillWake, [] {
QMetaObject::invokeMethod(DependencyManager::get<NodeList>().data(), "noteAwakening", Qt::QueuedConnection); QMetaObject::invokeMethod(DependencyManager::get<NodeList>().data(), "noteAwakening", Qt::QueuedConnection);
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "noteAwakening", Qt::QueuedConnection);
}); });

View file

@ -640,11 +640,6 @@ Menu::Menu() {
} }
#endif #endif
// Developer >> Tests >>>
MenuWrapper* testMenu = developerMenu->addMenu("Tests");
addActionToQMenuAndActionHash(testMenu, MenuOption::RunClientScriptTests, 0, dialogsManager.data(), SLOT(showTestingResults()));
// Developer > Timing >>> // Developer > Timing >>>
MenuWrapper* timingMenu = developerMenu->addMenu("Timing"); MenuWrapper* timingMenu = developerMenu->addMenu("Timing");
MenuWrapper* perfTimerMenu = timingMenu->addMenu("Performance Timer"); MenuWrapper* perfTimerMenu = timingMenu->addMenu("Performance Timer");

View file

@ -178,7 +178,6 @@ namespace MenuOption {
const QString ResetAvatarSize = "Reset Avatar Size"; const QString ResetAvatarSize = "Reset Avatar Size";
const QString ResetSensors = "Reset Sensors"; const QString ResetSensors = "Reset Sensors";
const QString RunningScripts = "Running Scripts..."; const QString RunningScripts = "Running Scripts...";
const QString RunClientScriptTests = "Run Client Script Tests";
const QString RunTimingTests = "Run Timing Tests"; const QString RunTimingTests = "Run Timing Tests";
const QString ScriptedMotorControl = "Enable Scripted Motor Control"; const QString ScriptedMotorControl = "Enable Scripted Motor Control";
const QString ShowTrackedObjects = "Show Tracked Objects"; const QString ShowTrackedObjects = "Show Tracked Objects";

View file

@ -186,15 +186,6 @@ void DialogsManager::setAddressBarVisible(bool addressBarVisible) {
emit addressBarShown(_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() { void DialogsManager::showDomainConnectionDialog() {
// if the dialog already exists we delete it so the connection data is refreshed // if the dialog already exists we delete it so the connection data is refreshed
if (_domainConnectionDialog) { if (_domainConnectionDialog) {

View file

@ -53,7 +53,6 @@ public slots:
void lodTools(); void lodTools();
void hmdTools(bool showTools); void hmdTools(bool showTools);
void showDomainConnectionDialog(); void showDomainConnectionDialog();
void showTestingResults();
void toggleAddressBar(); void toggleAddressBar();
// Application Update // Application Update

View file

@ -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) { bool AudioClient::switchOutputToAudioDevice(const HifiAudioDeviceInfo outputDeviceInfo, bool isShutdownRequest) {
Q_ASSERT_X(QThread::currentThread() == thread(), Q_FUNC_INFO, "Function invoked on wrong thread"); Q_ASSERT_X(QThread::currentThread() == thread(), Q_FUNC_INFO, "Function invoked on wrong thread");

View file

@ -255,6 +255,7 @@ public slots:
void setOutputGain(float gain) { _outputGain = gain; }; void setOutputGain(float gain) { _outputGain = gain; };
void outputNotify(); void outputNotify();
void noteAwakening();
void loadSettings(); void loadSettings();
void saveSettings(); void saveSettings();

View file

@ -808,6 +808,8 @@ void AccountManager::requestAccountSettings() {
return; return;
} }
qCDebug(networking) << "Requesting the Account Settings from the Metaverse API";
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
QUrl lockerURL = _authURL; QUrl lockerURL = _authURL;
@ -834,6 +836,9 @@ void AccountManager::requestAccountSettingsFinished() {
if (rootObject.contains("status") && rootObject["status"].toString() == "success") { if (rootObject.contains("status") && rootObject["status"].toString() == "success") {
if (rootObject.contains("data") && rootObject["data"].isObject()) { if (rootObject.contains("data") && rootObject["data"].isObject()) {
_settings.unpack(rootObject["data"].toObject()); _settings.unpack(rootObject["data"].toObject());
_lastSuccessfulSyncTimestamp = _settings.lastChangeTimestamp();
qCDebug(networking) << "Received the Account Settings from the Metaverse API";
emit accountSettingsLoaded(); emit accountSettingsLoaded();
} else { } else {
@ -874,6 +879,8 @@ void AccountManager::postAccountSettings() {
return; return;
} }
qCDebug(networking) << "Account Settings have changed, pushing them to the Metaverse API";
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance(); QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
QUrl lockerURL = _authURL; QUrl lockerURL = _authURL;

View file

@ -92,15 +92,19 @@ public:
ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr); ToolbarProxy(QObject* qmlObject, QObject* parent = nullptr);
/**jsdoc /**jsdoc
* <em>Currently doesn't work.</em>
* @function ToolbarProxy#addButton * @function ToolbarProxy#addButton
* @param {object} properties * @param {object} properties - Button properties
* @returns {ToolbarButtonProxy} * @returns {object} The button added.
* @deprecated This method is deprecated and will be removed.
*/ */
Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties); Q_INVOKABLE ToolbarButtonProxy* addButton(const QVariant& properties);
/**jsdoc /**jsdoc
* <em>Currently doesn't work.</em>
* @function ToolbarProxy#removeButton * @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); Q_INVOKABLE void removeButton(const QVariant& name);

View file

@ -1,117 +1,38 @@
var isActive = false; (function () {
var toolBar = (function() { // Get the system toolbar.
var that = {}, var toolbar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
toolBar, if (!toolbar) {
activeButton, print("ERROR: Couldn't get system toolbar.");
newModelButton, return;
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();
} }
that.setActive = function(active) { Script.setTimeout(function () {
if (active != isActive) { // Report the system toolbar visibility.
isActive = active; var isToolbarVisible = toolbar.readProperty("visible");
that.showTools(isActive); print("Toolbar visible: " + isToolbarVisible);
}
};
// Sets visibility of tool buttons, excluding the power button // Briefly toggle the system toolbar visibility.
that.showTools = function(doShow) { print("Toggle toolbar");
newModelButton.writeProperty('visible', doShow); toolbar.writeProperty("visible", !isToolbarVisible);
newShapeButton.writeProperty('visible', doShow); Script.setTimeout(function () {
newLightButton.writeProperty('visible', doShow); print("Toggle toolbar");
newTextButton.writeProperty('visible', doShow); toolbar.writeProperty("visible", isToolbarVisible);
newWebButton.writeProperty('visible', doShow); }, 2000);
newZoneButton.writeProperty('visible', doShow); }, 2000);
newParticleButton.writeProperty('visible', doShow);
newMaterialButton.writeProperty('visible', doShow); 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;
}()); }());

View file

@ -160,6 +160,7 @@ var SETTINGS_APP_WINDOW_FLAGS = 0x00000001 | // Qt::Window
0x08000000 | // Qt::WindowCloseButtonHint 0x08000000 | // Qt::WindowCloseButtonHint
0x00008000 | // Qt::WindowMaximizeButtonHint 0x00008000 | // Qt::WindowMaximizeButtonHint
0x00004000; // Qt::WindowMinimizeButtonHint 0x00004000; // Qt::WindowMinimizeButtonHint
var SETTINGS_APP_RIGHT_MARGIN = 48;
var settingsAppWindow = false; var settingsAppWindow = false;
function toggleSettingsApp() { function toggleSettingsApp() {
if (settingsAppWindow) { if (settingsAppWindow) {
@ -179,7 +180,7 @@ function toggleSettingsApp() {
y: SETTINGS_APP_HEIGHT_PX y: SETTINGS_APP_HEIGHT_PX
}, },
position: { 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) y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - SETTINGS_APP_HEIGHT_PX / 2)
}, },
overrideFlags: SETTINGS_APP_WINDOW_FLAGS overrideFlags: SETTINGS_APP_WINDOW_FLAGS

View file

@ -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." "tooltip": "The angle in deg at which light emits. Starts in the entity's -z direction, and rotates around its x axis."
}, },
"keyLight.castShadows": { "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": { "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." "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." "tooltip": "If enabled, grabbed entities will follow the movements of your hand controller instead of your avatar's hand."
}, },
"canCastShadow": { "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": { "ignorePickIntersection": {
"tooltip": "If enabled, this entity will not be considered for ray picks, and will also not occlude other entities when picking." "tooltip": "If enabled, this entity will not be considered for ray picks, and will also not occlude other entities when picking."