mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:28:09 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into verbose-logging-2
This commit is contained in:
commit
3111d2fa2e
18 changed files with 1360 additions and 1323 deletions
|
@ -101,7 +101,7 @@ Flickable {
|
|||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
id: performanceTitle
|
||||
text: "Graphics Preset"
|
||||
text: "Graphics Settings"
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 22
|
||||
|
@ -115,7 +115,7 @@ Flickable {
|
|||
|
||||
SimplifiedControls.RadioButton {
|
||||
id: performanceLow
|
||||
text: "Low"
|
||||
text: "Low Quality" + (PlatformInfo.getTierProfiled() === PerformanceEnums.LOW ? " (Recommended)" : "")
|
||||
checked: Performance.getPerformancePreset() === PerformanceEnums.LOW
|
||||
onClicked: {
|
||||
Performance.setPerformancePreset(PerformanceEnums.LOW);
|
||||
|
@ -124,7 +124,7 @@ Flickable {
|
|||
|
||||
SimplifiedControls.RadioButton {
|
||||
id: performanceMedium
|
||||
text: "Medium"
|
||||
text: "Medium Quality" + (PlatformInfo.getTierProfiled() === PerformanceEnums.MID ? " (Recommended)" : "")
|
||||
checked: Performance.getPerformancePreset() === PerformanceEnums.MID
|
||||
onClicked: {
|
||||
Performance.setPerformancePreset(PerformanceEnums.MID);
|
||||
|
@ -133,7 +133,7 @@ Flickable {
|
|||
|
||||
SimplifiedControls.RadioButton {
|
||||
id: performanceHigh
|
||||
text: "High"
|
||||
text: "High Quality" + (PlatformInfo.getTierProfiled() === PerformanceEnums.HIGH ? " (Recommended)" : "")
|
||||
checked: Performance.getPerformancePreset() === PerformanceEnums.HIGH
|
||||
onClicked: {
|
||||
Performance.setPerformancePreset(PerformanceEnums.HIGH);
|
||||
|
|
|
@ -18,6 +18,16 @@ import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same c
|
|||
|
||||
Rectangle {
|
||||
id: root
|
||||
focus: true
|
||||
|
||||
signal keyPressEvent(int key, int modifiers)
|
||||
Keys.onPressed: {
|
||||
keyPressEvent(event.key, event.modifiers);
|
||||
}
|
||||
signal keyReleaseEvent(int key, int modifiers)
|
||||
Keys.onReleased: {
|
||||
keyReleaseEvent(event.key, event.modifiers);
|
||||
}
|
||||
|
||||
SimplifiedConstants.SimplifiedConstants {
|
||||
id: simplifiedUI
|
||||
|
@ -83,6 +93,12 @@ Rectangle {
|
|||
topBarInventoryModel.getNextPage();
|
||||
} else {
|
||||
inventoryFullyReceived = true;
|
||||
|
||||
// If we have an avatar in our inventory AND we haven't already auto-selected an avatar...
|
||||
if (!Settings.getValue("simplifiedUI/alreadyAutoSelectedAvatar", false) && topBarInventoryModel.count > 0) {
|
||||
Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true);
|
||||
MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,5 +471,5 @@ Rectangle {
|
|||
break;
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
signal sendToScript(var message)
|
||||
}
|
||||
|
|
|
@ -5611,7 +5611,7 @@ void Application::resumeAfterLoginDialogActionTaken() {
|
|||
scriptEngines->reloadLocalFiles();
|
||||
|
||||
// if the --scripts command-line argument was used.
|
||||
if (!_defaultScriptsLocation.exists() && (arguments().indexOf(QString("--").append(SCRIPTS_SWITCH))) != -1) {
|
||||
if (_defaultScriptsLocation.exists() && (arguments().indexOf(QString("--").append(SCRIPTS_SWITCH))) != -1) {
|
||||
scriptEngines->loadDefaultScripts();
|
||||
scriptEngines->defaultScriptsLocationOverridden(true);
|
||||
} else {
|
||||
|
|
|
@ -68,6 +68,16 @@ void interactiveWindowPointerFromScriptValue(const QScriptValue& object, Interac
|
|||
}
|
||||
}
|
||||
|
||||
void InteractiveWindow::forwardKeyPressEvent(int key, int modifiers) {
|
||||
QKeyEvent* event = new QKeyEvent(QEvent::KeyPress, key, static_cast<Qt::KeyboardModifiers>(modifiers));
|
||||
QCoreApplication::postEvent(QCoreApplication::instance(), event);
|
||||
}
|
||||
|
||||
void InteractiveWindow::forwardKeyReleaseEvent(int key, int modifiers) {
|
||||
QKeyEvent* event = new QKeyEvent(QEvent::KeyRelease, key, static_cast<Qt::KeyboardModifiers>(modifiers));
|
||||
QCoreApplication::postEvent(QCoreApplication::instance(), event);
|
||||
}
|
||||
|
||||
/**jsdoc
|
||||
* A set of properties used when creating an <code>InteractiveWindow</code>.
|
||||
* @typedef {object} InteractiveWindow.Properties
|
||||
|
@ -152,11 +162,15 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap
|
|||
_dockWidget->getQuickView()->rootContext()->setContextProperty(EVENT_BRIDGE_PROPERTY, this);
|
||||
QObject::connect(rootItem, SIGNAL(sendToScript(QVariant)), this, SLOT(qmlToScript(const QVariant&)),
|
||||
Qt::QueuedConnection);
|
||||
QObject::connect(rootItem, SIGNAL(keyPressEvent(int, int)), this, SLOT(forwardKeyPressEvent(int, int)),
|
||||
Qt::QueuedConnection);
|
||||
QObject::connect(rootItem, SIGNAL(keyReleaseEvent(int, int)), this, SLOT(forwardKeyReleaseEvent(int, int)),
|
||||
Qt::QueuedConnection);
|
||||
emit mainWindow->windowGeometryChanged(qApp->getWindow()->geometry());
|
||||
}
|
||||
});
|
||||
_dockWidget->setSource(QUrl(sourceUrl));
|
||||
|
||||
_dockWidget->setSource(QUrl(sourceUrl));
|
||||
|
||||
mainWindow->addDockWidget(dockArea, _dockWidget.get());
|
||||
} else {
|
||||
|
|
|
@ -287,6 +287,9 @@ protected slots:
|
|||
*/
|
||||
void qmlToScript(const QVariant& message);
|
||||
|
||||
void forwardKeyPressEvent(int key, int modifiers);
|
||||
void forwardKeyReleaseEvent(int key, int modifiers);
|
||||
|
||||
private:
|
||||
QPointer<QObject> _qmlWindow;
|
||||
std::shared_ptr<DockWidget> _dockWidget { nullptr };
|
||||
|
|
|
@ -343,14 +343,14 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
|||
@"--tokens", userToken,
|
||||
@"--cache", contentPath,
|
||||
@"--displayName", displayName,
|
||||
@"--script", scriptsPath,
|
||||
@"--scripts", scriptsPath,
|
||||
@"--no-updater",
|
||||
@"--no-launcher", nil];
|
||||
} else {
|
||||
arguments = [NSArray arrayWithObjects:
|
||||
@"--url" , domainUrl,
|
||||
@"--cache", contentPath,
|
||||
@"--script", scriptsPath,
|
||||
@"--scripts", scriptsPath,
|
||||
@"--no-updater",
|
||||
@"--no-launcher", nil];
|
||||
}
|
||||
|
|
|
@ -223,6 +223,8 @@ BOOL LauncherManager::launchApplication(const CString& tokensJSON) {
|
|||
LauncherManager::getAndCreatePaths(PathType::Interface_Directory, installDir);
|
||||
CString interfaceExe = installDir + _T("\\interface.exe");
|
||||
CString params1 = _T("--url \"") + _domainURL + ("\" ");
|
||||
CString scriptsURL = installDir + _T("\\scripts\\simplifiedUI");
|
||||
CString params2 = _T("--scripts \"") + scriptsURL + ("\" ");
|
||||
CString cacheDir;
|
||||
LauncherManager::getAndCreatePaths(PathType::Content_Directory, cacheDir);
|
||||
CString params3 = _T("--cache \"") + cacheDir + ("\" ");
|
||||
|
@ -230,7 +232,8 @@ BOOL LauncherManager::launchApplication(const CString& tokensJSON) {
|
|||
CString parsedTokens = tokensJSON;
|
||||
parsedTokens.Replace(_T("\""), _T("\\\""));
|
||||
CString params5 = !tokensJSON.IsEmpty() ? _T("--tokens \"") + parsedTokens + ("\"") : _T("");
|
||||
CString params = params1 + params3 + params4 + params5 + EXTRA_PARAMETERS;
|
||||
CString params = params1 + params2 + params3 + params4 + params5 + EXTRA_PARAMETERS;
|
||||
|
||||
auto rs = ShellExecute(NULL, L"open", interfaceExe, params, NULL, SW_SHOW);
|
||||
return (rs != NULL);
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
|
@ -398,7 +398,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
|||
const size_t byteArraySize = AvatarDataPacket::MAX_CONSTANT_HEADER_SIZE + NUM_BYTES_RFC4122_UUID +
|
||||
AvatarDataPacket::maxFaceTrackerInfoSize(_headData->getBlendshapeCoefficients().size()) +
|
||||
AvatarDataPacket::maxJointDataSize(_jointData.size()) +
|
||||
AvatarDataPacket::maxJointDefaultPoseFlagsSize(_jointData.size());
|
||||
AvatarDataPacket::maxJointDefaultPoseFlagsSize(_jointData.size()) +
|
||||
AvatarDataPacket::FAR_GRAB_JOINTS_SIZE;
|
||||
|
||||
if (maxDataSize == 0) {
|
||||
maxDataSize = (int)byteArraySize;
|
||||
|
|
|
@ -302,6 +302,15 @@ namespace AvatarDataPacket {
|
|||
const size_t AVATAR_LOCAL_POSITION_SIZE = 12;
|
||||
static_assert(sizeof(AvatarLocalPosition) == AVATAR_LOCAL_POSITION_SIZE, "AvatarDataPacket::AvatarLocalPosition size doesn't match.");
|
||||
|
||||
PACKED_BEGIN struct HandControllers {
|
||||
SixByteQuat leftHandRotation;
|
||||
SixByteTrans leftHandTranslation;
|
||||
SixByteQuat rightHandRotation;
|
||||
SixByteTrans rightHandTranslation;
|
||||
} PACKED_END;
|
||||
static const size_t HAND_CONTROLLERS_SIZE = 24;
|
||||
static_assert(sizeof(HandControllers) == HAND_CONTROLLERS_SIZE, "AvatarDataPacket::HandControllers size doesn't match.");
|
||||
|
||||
const size_t MAX_CONSTANT_HEADER_SIZE = HEADER_SIZE +
|
||||
AVATAR_GLOBAL_POSITION_SIZE +
|
||||
AVATAR_BOUNDING_BOX_SIZE +
|
||||
|
@ -312,17 +321,8 @@ namespace AvatarDataPacket {
|
|||
SENSOR_TO_WORLD_SIZE +
|
||||
ADDITIONAL_FLAGS_SIZE +
|
||||
PARENT_INFO_SIZE +
|
||||
AVATAR_LOCAL_POSITION_SIZE;
|
||||
|
||||
PACKED_BEGIN struct HandControllers {
|
||||
SixByteQuat leftHandRotation;
|
||||
SixByteTrans leftHandTranslation;
|
||||
SixByteQuat rightHandRotation;
|
||||
SixByteTrans rightHandTranslation;
|
||||
} PACKED_END;
|
||||
static const size_t HAND_CONTROLLERS_SIZE = 24;
|
||||
static_assert(sizeof(HandControllers) == HAND_CONTROLLERS_SIZE, "AvatarDataPacket::HandControllers size doesn't match.");
|
||||
|
||||
AVATAR_LOCAL_POSITION_SIZE +
|
||||
HAND_CONTROLLERS_SIZE;
|
||||
|
||||
// variable length structure follows
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ static bool flipNormalsMyAvatarVsBackfacingTriangles(btManifoldPoint& cp,
|
|||
const btVector3* v = triShape->m_vertices1;
|
||||
btVector3 faceNormal = colObj1Wrap->getWorldTransform().getBasis() * btCross(v[1] - v[0], v[2] - v[0]);
|
||||
float nDotF = btDot(faceNormal, cp.m_normalWorldOnB);
|
||||
if (nDotF <= 0.0f) {
|
||||
if (nDotF <= 0.0f && faceNormal.length2() > EPSILON) {
|
||||
faceNormal.normalize();
|
||||
// flip the contact normal to be aligned with the face normal
|
||||
cp.m_normalWorldOnB += -2.0f * nDotF * faceNormal;
|
||||
|
|
Loading…
Reference in a new issue