mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 08:22:30 +02:00
Merge pull request #14359 from howard-stearns/no-url-logging
remove urls from logs in Interface
This commit is contained in:
commit
bb2239c0bd
105 changed files with 153 additions and 352 deletions
|
@ -114,7 +114,6 @@ ScrollingWindow {
|
|||
sourceSize: Qt.size(width, height);
|
||||
verticalAlignment: Image.AlignVCenter;
|
||||
horizontalAlignment: Image.AlignHCenter
|
||||
onSourceChanged: console.log("Icon url: " + source)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,10 +248,6 @@ ScrollingWindow {
|
|||
root.loadingChanged(loadRequest.status);
|
||||
}
|
||||
|
||||
onIconChanged: {
|
||||
console.log("New icon: " + icon)
|
||||
}
|
||||
|
||||
onWindowCloseRequested: {
|
||||
root.destroy();
|
||||
}
|
||||
|
|
|
@ -80,8 +80,6 @@ ModalWindow {
|
|||
property int clickedButton: OriginalDialogs.StandardButton.NoButton;
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("Helper " + helper + " drives " + drives);
|
||||
|
||||
fileDialogItem.keyboardEnabled = HMD.active;
|
||||
|
||||
// HACK: The following lines force the model to initialize properly such that the go-up button
|
||||
|
@ -809,7 +807,6 @@ ModalWindow {
|
|||
}
|
||||
}
|
||||
|
||||
console.log("Selecting " + selection)
|
||||
selectedFile(selection);
|
||||
root.destroy();
|
||||
}
|
||||
|
|
|
@ -765,8 +765,7 @@ TabletModalWindow {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Selecting " + selection)
|
||||
|
||||
selectedFile(selection);
|
||||
root.destroy();
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ Preference {
|
|||
|
||||
Component.onCompleted: {
|
||||
dataTextField.text = preference.value;
|
||||
console.log("MyAvatar modelName " + MyAvatar.getFullAvatarModelName())
|
||||
console.log("Application : " + ApplicationInterface)
|
||||
ApplicationInterface.fullAvatarURLChanged.connect(processNewAvatar);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ Preference {
|
|||
dir: fileDialogHelper.pathToUrl(preference.value)
|
||||
});
|
||||
browser.selectedFile.connect(function(fileUrl){
|
||||
console.log(fileUrl);
|
||||
dataTextField.text = fileDialogHelper.urlToPath(fileUrl);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
catch(err) {
|
||||
console.error(err);
|
||||
//console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ Item {
|
|||
}
|
||||
onStatusChanged: {
|
||||
if (status == Image.Error) {
|
||||
console.log("source: " + source + ": failed to load " + hifiUrl);
|
||||
console.log("source: " + source + ": failed to load");
|
||||
source = defaultThumbnail;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,19 +103,14 @@ OriginalDesktop.Desktop {
|
|||
property bool autoAdd: false
|
||||
|
||||
function initWebviewProfileHandlers(profile) {
|
||||
console.log("The webview url in desktop is: " + currentUrl);
|
||||
downloadUrl = currentUrl;
|
||||
if (webViewProfileSetup) return;
|
||||
webViewProfileSetup = true;
|
||||
|
||||
profile.downloadRequested.connect(function(download){
|
||||
console.log("Download start: " + download.state);
|
||||
adaptedPath = File.convertUrlToPath(downloadUrl);
|
||||
tempDir = File.getTempDir();
|
||||
console.log("Temp dir created: " + tempDir);
|
||||
download.path = tempDir + "/" + adaptedPath;
|
||||
console.log("Path where object should download: " + download.path);
|
||||
console.log("Auto add: " + autoAdd);
|
||||
download.accept();
|
||||
if (download.state === WebEngineDownloadItem.DownloadInterrupted) {
|
||||
console.log("download failed to complete");
|
||||
|
|
|
@ -1287,7 +1287,7 @@ Rectangle {
|
|||
connectionsOnlineDot.visible = message.shouldShowDot;
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message:', JSON.stringify(message));
|
||||
console.log('Pal.qml: Unrecognized message');
|
||||
}
|
||||
}
|
||||
function sortModel() {
|
||||
|
|
|
@ -20,7 +20,6 @@ Item {
|
|||
// Public function for initiating an http request.
|
||||
// REQUIRES parent to be root to have sendToScript!
|
||||
function request(options, callback) {
|
||||
console.debug('HttpRequest', JSON.stringify(options));
|
||||
httpCalls[httpCounter] = callback;
|
||||
var message = {method: 'http.request', params: options, id: httpCounter++, jsonrpc: "2.0"};
|
||||
parent.sendToScript(message);
|
||||
|
@ -33,7 +32,6 @@ Item {
|
|||
return;
|
||||
}
|
||||
delete httpCalls[message.id];
|
||||
console.debug('HttpRequest response', JSON.stringify(message));
|
||||
callback(message.error, message.response);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ Rectangle {
|
|||
spectatorCameraPreview.visible = message.setting;
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from spectatorCamera.js:', JSON.stringify(message));
|
||||
console.log('Unrecognized message from spectatorCamera.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -261,7 +261,6 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
onLinkActivated: {
|
||||
popup.showSpecifyWearableUrl(function(url) {
|
||||
console.debug('popup.showSpecifyWearableUrl: ', url);
|
||||
addWearable(root.avatarName, url);
|
||||
modified = true;
|
||||
});
|
||||
|
|
|
@ -29,9 +29,6 @@ Item {
|
|||
when: avatarUrl !== ''
|
||||
value: avatarUrl
|
||||
}
|
||||
onSourceChanged: {
|
||||
console.debug('avatarImage: source = ', source);
|
||||
}
|
||||
|
||||
visible: avatarImage.status !== Image.Loading && avatarImage.status !== Image.Error
|
||||
}
|
||||
|
|
|
@ -96,9 +96,6 @@ Rectangle {
|
|||
AvatarThumbnail {
|
||||
id: avatarThumbnail
|
||||
avatarUrl: avatarImageUrl
|
||||
onAvatarUrlChanged: {
|
||||
console.debug('CreateFavoritesDialog: onAvatarUrlChanged: ', avatarUrl);
|
||||
}
|
||||
|
||||
wearablesCount: avatarWearablesCount
|
||||
}
|
||||
|
|
|
@ -17,9 +17,6 @@ Rectangle {
|
|||
property alias dialogButtons: buttons
|
||||
|
||||
property string imageSource: null
|
||||
onImageSourceChanged: {
|
||||
console.debug('imageSource = ', imageSource)
|
||||
}
|
||||
|
||||
property string button1color: hifi.buttons.noneBorderlessGray;
|
||||
property string button1text: ''
|
||||
|
|
|
@ -1094,7 +1094,7 @@ Rectangle {
|
|||
refreshBuyUI();
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
console.log('Checkout.qml: Unrecognized message from marketplaces.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -1867,7 +1867,7 @@ Item {
|
|||
sendAssetStep.selectedRecipientUserName = message.userName;
|
||||
break;
|
||||
default:
|
||||
console.log('SendAsset: Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('SendAsset: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendSignalToParent(var msg);
|
||||
|
|
|
@ -597,7 +597,7 @@ Rectangle {
|
|||
resetCert(true);
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
console.log('InspectionCertificate.qml: Unrecognized message from marketplaces.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -1070,7 +1070,7 @@ Rectangle {
|
|||
http.handleHttpResponse(message);
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
console.log('Purchases.qml: Unrecognized message from marketplaces.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -250,7 +250,7 @@ At the moment, there is currently no way to convert HFC to other currencies. Sta
|
|||
function fromScript(message) {
|
||||
switch (message.method) {
|
||||
default:
|
||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('Help.qml: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendSignalToWallet(var msg);
|
||||
|
|
|
@ -183,7 +183,7 @@ Item {
|
|||
function fromScript(message) {
|
||||
switch (message.method) {
|
||||
default:
|
||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('NeedsLogIn.qml: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendSignalToWallet(var msg);
|
||||
|
|
|
@ -803,7 +803,7 @@ Rectangle {
|
|||
}
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
|
||||
console.log('Wallet.qml: Unrecognized message from wallet.js');
|
||||
}
|
||||
}
|
||||
signal sendToScript(var message);
|
||||
|
|
|
@ -130,17 +130,14 @@ ScrollingWindow {
|
|||
}
|
||||
|
||||
function loadScript(script) {
|
||||
console.log("Load script " + script);
|
||||
scripts.loadOneScript(script);
|
||||
}
|
||||
|
||||
function reloadScript(script) {
|
||||
console.log("Reload script " + script);
|
||||
scripts.stopScript(script, true);
|
||||
}
|
||||
|
||||
function stopScript(script) {
|
||||
console.log("Stop script " + script);
|
||||
scripts.stopScript(script);
|
||||
}
|
||||
|
||||
|
|
|
@ -120,17 +120,14 @@ Rectangle {
|
|||
}
|
||||
|
||||
function loadScript(script) {
|
||||
console.log("Load script " + script);
|
||||
scripts.loadOneScript(script);
|
||||
}
|
||||
|
||||
function reloadScript(script) {
|
||||
console.log("Reload script " + script);
|
||||
scripts.stopScript(script, true);
|
||||
}
|
||||
|
||||
function stopScript(script) {
|
||||
console.log("Stop script " + script);
|
||||
scripts.stopScript(script);
|
||||
}
|
||||
|
||||
|
@ -158,7 +155,6 @@ Rectangle {
|
|||
console.log("Stop all scripts");
|
||||
for (var index = 0; index < runningScriptsModel.count; index++) {
|
||||
var url = runningScriptsModel.get(index).url;
|
||||
console.log(url);
|
||||
var fileName = url.substring(url.lastIndexOf('/')+1);
|
||||
if (canEditScript(fileName)) {
|
||||
scripts.stopScript(url);
|
||||
|
|
|
@ -130,9 +130,9 @@ ListModel {
|
|||
// Check consistency and call processPage.
|
||||
function handlePage(error, response, cb) {
|
||||
var processed;
|
||||
console.debug('handlePage', listModelName, additionalFirstPageRequested, error, JSON.stringify(response));
|
||||
console.debug('handlePage', listModelName, additionalFirstPageRequested, error);
|
||||
function fail(message) {
|
||||
console.warn("Warning page fail", listModelName, JSON.stringify(message));
|
||||
console.warn("Warning page fail", listModelName);
|
||||
currentPageToRetrieve = -1;
|
||||
requestPending = false;
|
||||
delayedClear = false;
|
||||
|
|
|
@ -285,7 +285,7 @@ TabBar {
|
|||
selectTab(message.params.id);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unrecognized message:', JSON.stringify(message));
|
||||
console.warn('EditTabView.qml: Unrecognized message');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ TabBar {
|
|||
selectTab(message.params.id);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unrecognized message:', JSON.stringify(message));
|
||||
console.warn('EditToolsTabView.qml: Unrecognized message');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,8 +68,6 @@ Rectangle {
|
|||
signal canceled();
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("Helper " + helper + " drives " + drives);
|
||||
|
||||
fileDialogItem.keyboardEnabled = HMD.active;
|
||||
|
||||
// HACK: The following lines force the model to initialize properly such that the go-up button
|
||||
|
@ -762,7 +760,6 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
console.log("Selecting " + selection)
|
||||
selectedFile(selection);
|
||||
//root.destroy();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ Preference {
|
|||
});
|
||||
|
||||
browser.selectedFile.connect(function(fileUrl){
|
||||
console.log(fileUrl);
|
||||
dataTextField.text = fileDialogHelper.urlToPath(fileUrl);
|
||||
});
|
||||
|
||||
|
|
|
@ -7047,7 +7047,7 @@ bool Application::askToSetAvatarUrl(const QString& url) {
|
|||
getMyAvatar()->useFullAvatarURL(url, modelName);
|
||||
emit fullAvatarURLChanged(url, modelName);
|
||||
} else {
|
||||
qCDebug(interfaceapp) << "Declined to use the avatar: " << url;
|
||||
qCDebug(interfaceapp) << "Declined to use the avatar";
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -7075,7 +7075,7 @@ bool Application::askToSetAvatarUrl(const QString& url) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
qCDebug(interfaceapp) << "Declined to agree to avatar license: " << url;
|
||||
qCDebug(interfaceapp) << "Declined to agree to avatar license";
|
||||
}
|
||||
|
||||
//auto offscreenUi = DependencyManager::get<OffscreenUi>();
|
||||
|
@ -7112,7 +7112,7 @@ bool Application::askToLoadScript(const QString& scriptFilenameOrURL) {
|
|||
qCDebug(interfaceapp) << "Chose to run the script: " << fileName;
|
||||
DependencyManager::get<ScriptEngines>()->loadScript(fileName);
|
||||
} else {
|
||||
qCDebug(interfaceapp) << "Declined to run the script: " << scriptFilenameOrURL;
|
||||
qCDebug(interfaceapp) << "Declined to run the script";
|
||||
}
|
||||
QObject::disconnect(dlg, &ModalDialogListener::response, this, nullptr);
|
||||
});
|
||||
|
@ -7170,7 +7170,7 @@ bool Application::askToWearAvatarAttachmentUrl(const QString& url) {
|
|||
attachmentDataVec.push_back(attachmentData);
|
||||
myAvatar->setAttachmentData(attachmentDataVec);
|
||||
} else {
|
||||
qCDebug(interfaceapp) << "User declined to wear the avatar attachment: " << url;
|
||||
qCDebug(interfaceapp) << "User declined to wear the avatar attachment";
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -7189,7 +7189,7 @@ bool Application::askToWearAvatarAttachmentUrl(const QString& url) {
|
|||
}
|
||||
|
||||
void Application::replaceDomainContent(const QString& url) {
|
||||
qCDebug(interfaceapp) << "Attempting to replace domain content: " << url;
|
||||
qCDebug(interfaceapp) << "Attempting to replace domain content";
|
||||
QByteArray urlData(url.toUtf8());
|
||||
auto limitedNodeList = DependencyManager::get<NodeList>();
|
||||
const auto& domainHandler = limitedNodeList->getDomainHandler();
|
||||
|
@ -7317,7 +7317,6 @@ void Application::showAssetServerWidget(QString filePath) {
|
|||
}
|
||||
|
||||
void Application::addAssetToWorldFromURL(QString url) {
|
||||
qInfo(interfaceapp) << "Download model and add to world from" << url;
|
||||
|
||||
QString filename;
|
||||
if (url.contains("filename")) {
|
||||
|
@ -7370,13 +7369,11 @@ void Application::addAssetToWorldFromURLRequestFinished() {
|
|||
}
|
||||
|
||||
if (result == ResourceRequest::Success) {
|
||||
qInfo(interfaceapp) << "Downloaded model from" << url;
|
||||
QTemporaryDir temporaryDir;
|
||||
temporaryDir.setAutoRemove(false);
|
||||
if (temporaryDir.isValid()) {
|
||||
QString temporaryDirPath = temporaryDir.path();
|
||||
QString downloadPath = temporaryDirPath + "/" + filename;
|
||||
qInfo(interfaceapp) << "Download path:" << downloadPath;
|
||||
|
||||
QFile tempFile(downloadPath);
|
||||
if (tempFile.open(QIODevice::WriteOnly)) {
|
||||
|
|
|
@ -180,7 +180,7 @@ void AvatarBookmarks::loadBookmark(const QString& bookmarkName) {
|
|||
myAvatar->removeWearableAvatarEntities();
|
||||
const QString& avatarUrl = bookmark.value(ENTRY_AVATAR_URL, "").toString();
|
||||
myAvatar->useFullAvatarURL(avatarUrl);
|
||||
qCDebug(interfaceapp) << "Avatar On " << avatarUrl;
|
||||
qCDebug(interfaceapp) << "Avatar On";
|
||||
const QList<QVariant>& attachments = bookmark.value(ENTRY_AVATAR_ATTACHMENTS, QList<QVariant>()).toList();
|
||||
|
||||
qCDebug(interfaceapp) << "Attach " << attachments;
|
||||
|
|
|
@ -86,7 +86,7 @@ bool ModelPackager::loadModel() {
|
|||
qWarning() << QString("ModelPackager::loadModel(): Could not open FST file %1").arg(_modelFile.filePath());
|
||||
return false;
|
||||
}
|
||||
qCDebug(interfaceapp) << "Reading FST file : " << _modelFile.filePath();
|
||||
qCDebug(interfaceapp) << "Reading FST file";
|
||||
_mapping = FSTReader::readMapping(fst.readAll());
|
||||
fst.close();
|
||||
|
||||
|
@ -102,7 +102,7 @@ bool ModelPackager::loadModel() {
|
|||
QString("ModelPackager::loadModel()"),
|
||||
QString("Could not open FBX file %1").arg(_fbxInfo.filePath()),
|
||||
QMessageBox::Ok);
|
||||
qWarning() << QString("ModelPackager::loadModel(): Could not open FBX file %1").arg(_fbxInfo.filePath());
|
||||
qWarning() << "ModelPackager::loadModel(): Could not open FBX file";
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
|
@ -114,7 +114,7 @@ bool ModelPackager::loadModel() {
|
|||
// make sure we have some basic mappings
|
||||
populateBasicMapping(_mapping, _fbxInfo.filePath(), *_hfmModel);
|
||||
} catch (const QString& error) {
|
||||
qCDebug(interfaceapp) << "Error reading " << _fbxInfo.filePath() << ": " << error;
|
||||
qCDebug(interfaceapp) << "Error reading: " << error;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -132,7 +132,7 @@ bool ModelPackager::editProperties() {
|
|||
// Make sure that a mapping for the root joint has been specified
|
||||
QVariantHash joints = _mapping.value(JOINT_FIELD).toHash();
|
||||
if (!joints.contains("jointRoot")) {
|
||||
qWarning() << QString("%1 root joint not configured for skeleton.").arg(_modelFile.fileName());
|
||||
qWarning() << "root joint not configured for skeleton.";
|
||||
|
||||
QString message = "Your did not configure a root joint for your skeleton model.\n\nPackaging will be canceled.";
|
||||
QMessageBox msgBox;
|
||||
|
|
|
@ -69,7 +69,7 @@ void ATPAssetMigrator::loadEntityServerFile() {
|
|||
} else {
|
||||
++_errorCount;
|
||||
_pendingReplacements.remove(migrationURL);
|
||||
qWarning() << "Could not retrieve asset at" << migrationURL.toString();
|
||||
qWarning() << "Could not retrieve asset";
|
||||
|
||||
checkIfFinished();
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void ATPAssetMigrator::loadEntityServerFile() {
|
|||
request->send();
|
||||
} else {
|
||||
++_errorCount;
|
||||
qWarning() << "Could not create request for asset at" << migrationURL.toString();
|
||||
qWarning() << "Could not create request for asset";
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -239,7 +239,7 @@ void ATPAssetMigrator::assetUploadFinished(AssetUpload *upload, const QString& h
|
|||
_pendingReplacements.remove(migrationURL);
|
||||
|
||||
++_errorCount;
|
||||
qWarning() << "Failed to upload" << migrationURL << "- error was" << upload->getErrorString();
|
||||
qWarning() << "Failed to upload" << "- error was" << upload->getErrorString();
|
||||
}
|
||||
|
||||
checkIfFinished();
|
||||
|
@ -281,7 +281,7 @@ void ATPAssetMigrator::setMappingFinished(SetMappingRequest* request) {
|
|||
_pendingReplacements.remove(migrationURL);
|
||||
|
||||
++_errorCount;
|
||||
qWarning() << "Error setting mapping for" << migrationURL << "- error was " << request->getErrorString();
|
||||
qWarning() << "Error setting mapping for" << "- error was " << request->getErrorString();
|
||||
}
|
||||
|
||||
checkIfFinished();
|
||||
|
|
|
@ -72,7 +72,7 @@ void Ledger::send(const QString& endpoint, const QString& success, const QString
|
|||
const QString URL = "/api/v1/commerce/";
|
||||
JSONCallbackParameters callbackParams(this, success, fail);
|
||||
#if defined(DEV_BUILD) // Don't expose user's personal data in the wild. But during development this can be handy.
|
||||
qCInfo(commerce) << "Sending" << endpoint << QJsonDocument(request).toJson(QJsonDocument::Compact);
|
||||
qCInfo(commerce) << "Sending" << QJsonDocument(request).toJson(QJsonDocument::Compact);
|
||||
#endif
|
||||
accountManager->sendRequest(URL + endpoint,
|
||||
authType,
|
||||
|
|
|
@ -396,8 +396,7 @@ bool QmlCommerce::uninstallApp(const QString& itemHref) {
|
|||
QString scriptUrl = appFileJsonObject["scriptURL"].toString();
|
||||
|
||||
if (!DependencyManager::get<ScriptEngines>()->stopScript(scriptUrl.trimmed(), false)) {
|
||||
qCWarning(commerce) << "Couldn't stop script during app uninstall. Continuing anyway. ScriptURL is:"
|
||||
<< scriptUrl.trimmed();
|
||||
qCWarning(commerce) << "Couldn't stop script during app uninstall. Continuing anyway.";
|
||||
}
|
||||
|
||||
// Delete the .app.json from the filesystem
|
||||
|
|
|
@ -225,7 +225,7 @@ void CollisionPick::computeShapeInfo(const CollisionRegion& pick, ShapeInfo& sha
|
|||
}
|
||||
const int32_t MAX_VERTICES_PER_STATIC_MESH = 1e6;
|
||||
if (totalNumVertices > MAX_VERTICES_PER_STATIC_MESH) {
|
||||
qWarning() << "model" << resource->getURL() << "has too many vertices" << totalNumVertices << "and will collide as a box.";
|
||||
qWarning() << "model" << "has too many vertices" << totalNumVertices << "and will collide as a box.";
|
||||
shapeInfo.setParams(SHAPE_TYPE_BOX, 0.5f * dimensions);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ QString GooglePolyScriptingInterface::getModelInfo(const QString& input) {
|
|||
}
|
||||
QString urlString(GET_POLY_URL);
|
||||
urlString = urlString.replace("model", name) + "key=" + _authCode;
|
||||
qCDebug(scriptengine) << "Google URL request: " << urlString;
|
||||
qCDebug(scriptengine) << "Google URL request";
|
||||
QUrl url(urlString);
|
||||
QString json = parseJSON(url, 2).toString();
|
||||
return json;
|
||||
|
@ -129,7 +129,7 @@ QUrl GooglePolyScriptingInterface::formatURLQuery(const QString& keyword, const
|
|||
}
|
||||
|
||||
QString GooglePolyScriptingInterface::getModelURL(const QUrl& url) {
|
||||
qCDebug(scriptengine) << "Google URL request: " << url;
|
||||
qCDebug(scriptengine) << "Google URL request";
|
||||
if (!url.isEmpty()) {
|
||||
return parseJSON(url, 1).toString();
|
||||
} else {
|
||||
|
|
|
@ -355,7 +355,7 @@ void ContextOverlayInterface::requestOwnershipVerification(const QUuid& entityID
|
|||
}
|
||||
}
|
||||
} else {
|
||||
qCDebug(entities) << "Call to" << networkReply->url() << "failed with error" << networkReply->error() <<
|
||||
qCDebug(entities) << "Call failed with error" << networkReply->error() <<
|
||||
"More info:" << networkReply->readAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ void AnimClip::copyFromNetworkAnim() {
|
|||
for (int i = 0; i < animJointCount; i++) {
|
||||
int skeletonJoint = _skeleton->nameToJointIndex(animSkeleton.getJointName(i));
|
||||
if (skeletonJoint == -1) {
|
||||
qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton, url =" << _url;
|
||||
qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton";
|
||||
}
|
||||
jointMap.push_back(skeletonJoint);
|
||||
}
|
||||
|
|
|
@ -221,26 +221,26 @@ static NodeProcessFunc animNodeTypeToProcessFunc(AnimNode::Type type) {
|
|||
static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUrl) {
|
||||
auto idVal = jsonObj.value("id");
|
||||
if (!idVal.isString()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad string \"id\", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad string \"id\"";
|
||||
return nullptr;
|
||||
}
|
||||
QString id = idVal.toString();
|
||||
|
||||
auto typeVal = jsonObj.value("type");
|
||||
if (!typeVal.isString()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad object \"type\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad object \"type\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
QString typeStr = typeVal.toString();
|
||||
AnimNode::Type type = stringToAnimNodeType(typeStr);
|
||||
if (type == AnimNode::Type::NumTypes) {
|
||||
qCCritical(animation) << "AnimNodeLoader, unknown node type" << typeStr << ", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, unknown node type" << typeStr << ", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto dataValue = jsonObj.value("data");
|
||||
if (!dataValue.isObject()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad string \"data\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad string \"data\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
auto dataObj = dataValue.toObject();
|
||||
|
@ -263,13 +263,13 @@ static AnimNode::Pointer loadNode(const QJsonObject& jsonObj, const QUrl& jsonUr
|
|||
|
||||
auto childrenValue = jsonObj.value("children");
|
||||
if (!childrenValue.isArray()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"children\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"children\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
auto childrenArray = childrenValue.toArray();
|
||||
for (const auto& childValue : childrenArray) {
|
||||
if (!childValue.isObject()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad object in \"children\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad object in \"children\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
AnimNode::Pointer child = loadNode(childValue.toObject(), jsonUrl);
|
||||
|
@ -353,14 +353,14 @@ static AnimNode::Pointer loadBlendLinearMoveNode(const QJsonObject& jsonObj, con
|
|||
std::vector<float> characteristicSpeeds;
|
||||
auto speedsValue = jsonObj.value("characteristicSpeeds");
|
||||
if (!speedsValue.isArray()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"characteristicSpeeds\" in blendLinearMove node, id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"characteristicSpeeds\" in blendLinearMove node, id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto speedsArray = speedsValue.toArray();
|
||||
for (const auto& speedValue : speedsArray) {
|
||||
if (!speedValue.isDouble()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad number in \"characteristicSpeeds\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad number in \"characteristicSpeeds\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
float speedVal = (float)speedValue.toDouble();
|
||||
|
@ -434,7 +434,7 @@ static AnimNode::Pointer loadOverlayNode(const QJsonObject& jsonObj, const QStri
|
|||
|
||||
auto boneSetEnum = stringToBoneSetEnum(boneSet);
|
||||
if (boneSetEnum == AnimOverlay::NumBoneSets) {
|
||||
qCCritical(animation) << "AnimNodeLoader, unknown bone set =" << boneSet << ", defaulting to \"fullBody\", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, unknown bone set =" << boneSet << ", defaulting to \"fullBody\"";
|
||||
boneSetEnum = AnimOverlay::FullBodyBoneSet;
|
||||
}
|
||||
|
||||
|
@ -470,14 +470,14 @@ static AnimNode::Pointer loadManipulatorNode(const QJsonObject& jsonObj, const Q
|
|||
|
||||
auto jointsValue = jsonObj.value("joints");
|
||||
if (!jointsValue.isArray()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"joints\" in controller node, id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"joints\" in controller node, id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto jointsArray = jointsValue.toArray();
|
||||
for (const auto& jointValue : jointsArray) {
|
||||
if (!jointValue.isObject()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state object in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state object in \"joints\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
auto jointObj = jointValue.toObject();
|
||||
|
@ -490,13 +490,13 @@ static AnimNode::Pointer loadManipulatorNode(const QJsonObject& jsonObj, const Q
|
|||
|
||||
AnimManipulator::JointVar::Type jointVarRotationType = stringToAnimManipulatorJointVarType(rotationType);
|
||||
if (jointVarRotationType == AnimManipulator::JointVar::Type::NumTypes) {
|
||||
qCWarning(animation) << "AnimNodeLoader, bad rotationType in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCWarning(animation) << "AnimNodeLoader, bad rotationType in \"joints\", id =" << id;
|
||||
jointVarRotationType = AnimManipulator::JointVar::Type::Default;
|
||||
}
|
||||
|
||||
AnimManipulator::JointVar::Type jointVarTranslationType = stringToAnimManipulatorJointVarType(translationType);
|
||||
if (jointVarTranslationType == AnimManipulator::JointVar::Type::NumTypes) {
|
||||
qCWarning(animation) << "AnimNodeLoader, bad translationType in \"joints\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCWarning(animation) << "AnimNodeLoader, bad translationType in \"joints\", id =" << id;
|
||||
jointVarTranslationType = AnimManipulator::JointVar::Type::Default;
|
||||
}
|
||||
|
||||
|
@ -512,14 +512,14 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS
|
|||
|
||||
auto targetsValue = jsonObj.value("targets");
|
||||
if (!targetsValue.isArray()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"targets\" in inverseKinematics node, id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"targets\" in inverseKinematics node, id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto targetsArray = targetsValue.toArray();
|
||||
for (const auto& targetValue : targetsArray) {
|
||||
if (!targetValue.isObject()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state object in \"targets\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state object in \"targets\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
auto targetObj = targetValue.toObject();
|
||||
|
@ -536,7 +536,7 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS
|
|||
|
||||
auto flexCoefficientsValue = targetObj.value("flexCoefficients");
|
||||
if (!flexCoefficientsValue.isArray()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad or missing flexCoefficients array in \"targets\", id =" << id << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad or missing flexCoefficients array in \"targets\", id =" << id;
|
||||
return nullptr;
|
||||
}
|
||||
auto flexCoefficientsArray = flexCoefficientsValue.toArray();
|
||||
|
@ -554,10 +554,11 @@ AnimNode::Pointer loadInverseKinematicsNode(const QJsonObject& jsonObj, const QS
|
|||
AnimInverseKinematics::SolutionSource solutionSourceType = stringToSolutionSourceEnum(solutionSource);
|
||||
if (solutionSourceType != AnimInverseKinematics::SolutionSource::NumSolutionSources) {
|
||||
node->setSolutionSource(solutionSourceType);
|
||||
} else {
|
||||
qCWarning(animation) << "AnimNodeLoader, bad solutionSourceType in \"solutionSource\", id = " << id << ", url = " << jsonUrl.toDisplayString();
|
||||
}
|
||||
}
|
||||
else {
|
||||
qCWarning(animation) << "AnimNodeLoader, bad solutionSourceType in \"solutionSource\", id = " << id;
|
||||
}
|
||||
|
||||
READ_OPTIONAL_STRING(solutionSourceVar, jsonObj);
|
||||
|
||||
|
@ -622,7 +623,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj,
|
|||
|
||||
auto statesValue = jsonObj.value("states");
|
||||
if (!statesValue.isArray()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"states\" in stateMachine node, id =" << nodeId << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad array \"states\" in stateMachine node, id =" << nodeId;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -641,7 +642,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj,
|
|||
auto statesArray = statesValue.toArray();
|
||||
for (const auto& stateValue : statesArray) {
|
||||
if (!stateValue.isObject()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state object in \"states\", id =" << nodeId << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state object in \"states\", id =" << nodeId;
|
||||
return false;
|
||||
}
|
||||
auto stateObj = stateValue.toObject();
|
||||
|
@ -657,7 +658,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj,
|
|||
|
||||
auto iter = childMap.find(id);
|
||||
if (iter == childMap.end()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, could not find stateMachine child (state) with nodeId =" << nodeId << "stateId =" << id << "url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, could not find stateMachine child (state) with nodeId =" << nodeId << "stateId =" << id;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -665,7 +666,7 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj,
|
|||
if (!interpType.isEmpty()) {
|
||||
interpTypeEnum = stringToInterpType(interpType);
|
||||
if (interpTypeEnum == AnimStateMachine::InterpType::NumTypes) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad interpType on stateMachine state, nodeId = " << nodeId << "stateId =" << id << "url = " << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad interpType on stateMachine state, nodeId = " << nodeId << "stateId =" << id;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -688,14 +689,14 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj,
|
|||
|
||||
auto transitionsValue = stateObj.value("transitions");
|
||||
if (!transitionsValue.isArray()) {
|
||||
qCritical(animation) << "AnimNodeLoader, bad array \"transitions\" in stateMachine node, stateId =" << id << "nodeId =" << nodeId << "url =" << jsonUrl.toDisplayString();
|
||||
qCritical(animation) << "AnimNodeLoader, bad array \"transitions\" in stateMachine node, stateId =" << id << "nodeId =" << nodeId;
|
||||
return false;
|
||||
}
|
||||
|
||||
auto transitionsArray = transitionsValue.toArray();
|
||||
for (const auto& transitionValue : transitionsArray) {
|
||||
if (!transitionValue.isObject()) {
|
||||
qCritical(animation) << "AnimNodeLoader, bad transition object in \"transtions\", stateId =" << id << "nodeId =" << nodeId << "url =" << jsonUrl.toDisplayString();
|
||||
qCritical(animation) << "AnimNodeLoader, bad transition object in \"transtions\", stateId =" << id << "nodeId =" << nodeId;
|
||||
return false;
|
||||
}
|
||||
auto transitionObj = transitionValue.toObject();
|
||||
|
@ -714,14 +715,14 @@ bool processStateMachineNode(AnimNode::Pointer node, const QJsonObject& jsonObj,
|
|||
if (iter != stateMap.end()) {
|
||||
srcState->addTransition(AnimStateMachine::State::Transition(transition.second.first, iter->second));
|
||||
} else {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state machine transtion from srcState =" << srcState->_id << "dstState =" << transition.second.second << "nodeId =" << nodeId << "url = " << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad state machine transtion from srcState =" << srcState->_id << "dstState =" << transition.second.second << "nodeId =" << nodeId;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
auto iter = stateMap.find(currentState);
|
||||
if (iter == stateMap.end()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad currentState =" << currentState << "could not find child node" << "id =" << nodeId << "url = " << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad currentState =" << currentState << "could not find child node" << "id =" << nodeId;
|
||||
}
|
||||
smNode->setCurrentState(iter->second);
|
||||
|
||||
|
@ -745,7 +746,7 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j
|
|||
QJsonParseError error;
|
||||
auto doc = QJsonDocument::fromJson(contents, &error);
|
||||
if (error.error != QJsonParseError::NoError) {
|
||||
qCCritical(animation) << "AnimNodeLoader, failed to parse json, error =" << error.errorString() << ", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, failed to parse json, error =" << error.errorString();
|
||||
return nullptr;
|
||||
}
|
||||
QJsonObject obj = doc.object();
|
||||
|
@ -753,7 +754,7 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j
|
|||
// version
|
||||
QJsonValue versionVal = obj.value("version");
|
||||
if (!versionVal.isString()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad string \"version\", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad string \"version\"";
|
||||
return nullptr;
|
||||
}
|
||||
QString version = versionVal.toString();
|
||||
|
@ -761,14 +762,14 @@ AnimNode::Pointer AnimNodeLoader::load(const QByteArray& contents, const QUrl& j
|
|||
// check version
|
||||
// AJT: TODO version check
|
||||
if (version != "1.0" && version != "1.1") {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad version number" << version << "expected \"1.0\", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad version number" << version << "expected \"1.0\"";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// root
|
||||
QJsonValue rootVal = obj.value("root");
|
||||
if (!rootVal.isObject()) {
|
||||
qCCritical(animation) << "AnimNodeLoader, bad object \"root\", url =" << jsonUrl.toDisplayString();
|
||||
qCCritical(animation) << "AnimNodeLoader, bad object \"root\"";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,15 +134,13 @@ void Animation::downloadFinished(const QByteArray& data) {
|
|||
}
|
||||
|
||||
void Animation::animationParseSuccess(HFMModel::Pointer hfmModel) {
|
||||
|
||||
qCDebug(animation) << "Animation parse success" << _url.toDisplayString();
|
||||
|
||||
qCDebug(animation) << "Animation parse success";
|
||||
_hfmModel = hfmModel;
|
||||
finishedLoading(true);
|
||||
}
|
||||
|
||||
void Animation::animationParseError(int error, QString str) {
|
||||
qCCritical(animation) << "Animation failure parsing " << _url.toDisplayString() << "code =" << error << str;
|
||||
qCCritical(animation) << "Animation parse error, code =" << error << str;
|
||||
emit failed(QNetworkReply::UnknownContentError);
|
||||
finishedLoading(false);
|
||||
}
|
||||
|
|
|
@ -1874,7 +1874,7 @@ void Rig::initAnimGraph(const QUrl& url) {
|
|||
emit onLoadComplete();
|
||||
});
|
||||
connect(_animLoader.get(), &AnimNodeLoader::error, [url](int error, QString str) {
|
||||
qCritical(animation) << "Error loading" << url.toDisplayString() << "code = " << error << "str =" << str;
|
||||
qCritical(animation) << "Error loading: code = " << error << "str =" << str;
|
||||
});
|
||||
|
||||
connect(_networkLoader.get(), &AnimNodeLoader::success, [this, weakSkeletonPtr, networkUrl](AnimNode::Pointer nodeIn) {
|
||||
|
@ -1900,7 +1900,7 @@ void Rig::initAnimGraph(const QUrl& url) {
|
|||
|
||||
});
|
||||
connect(_networkLoader.get(), &AnimNodeLoader::error, [networkUrl](int error, QString str) {
|
||||
qCritical(animation) << "Error loading" << networkUrl.toDisplayString() << "code = " << error << "str =" << str;
|
||||
qCritical(animation) << "Error loading: code = " << error << "str =" << str;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ void Sound::downloadFinished(const QByteArray& data) {
|
|||
|
||||
void Sound::soundProcessSuccess(QByteArray data, bool stereo, bool ambisonic, float duration) {
|
||||
|
||||
qCDebug(audio) << "Setting ready state for sound file" << _url.toDisplayString();
|
||||
qCDebug(audio) << "Setting ready state for sound file";
|
||||
|
||||
_byteArray = data;
|
||||
_isStereo = stereo;
|
||||
|
@ -81,14 +81,14 @@ void Sound::soundProcessSuccess(QByteArray data, bool stereo, bool ambisonic, fl
|
|||
}
|
||||
|
||||
void Sound::soundProcessError(int error, QString str) {
|
||||
qCCritical(audio) << "Failed to process sound file" << _url.toDisplayString() << "code =" << error << str;
|
||||
qCCritical(audio) << "Failed to process sound file: code =" << error << str;
|
||||
emit failed(QNetworkReply::UnknownContentError);
|
||||
finishedLoading(false);
|
||||
}
|
||||
|
||||
void SoundProcessor::run() {
|
||||
|
||||
qCDebug(audio) << "Processing sound file" << _url.toDisplayString();
|
||||
qCDebug(audio) << "Processing sound file";
|
||||
|
||||
// replace our byte array with the downloaded data
|
||||
QByteArray rawAudioByteArray = QByteArray(_data);
|
||||
|
@ -129,7 +129,7 @@ void SoundProcessor::run() {
|
|||
// since it's raw the only way for us to know that is if the file was called .stereo.raw
|
||||
if (fileName.toLower().endsWith("stereo.raw")) {
|
||||
_isStereo = true;
|
||||
qCDebug(audio) << "Processing sound of" << rawAudioByteArray.size() << "bytes from" << _url << "as stereo audio file.";
|
||||
qCDebug(audio) << "Processing sound of" << rawAudioByteArray.size() << "bytes as stereo audio file.";
|
||||
}
|
||||
|
||||
// Process as 48khz RAW file
|
||||
|
|
|
@ -35,7 +35,6 @@ SharedSoundPointer SoundCache::getSound(const QUrl& url) {
|
|||
|
||||
QSharedPointer<Resource> SoundCache::createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
||||
const void* extra) {
|
||||
qCDebug(audio) << "Requesting sound at" << url.toString();
|
||||
auto resource = QSharedPointer<Resource>(new Sound(url), &Resource::deleter);
|
||||
resource->setLoadPriority(this, SOUNDS_LOADING_PRIORITY);
|
||||
return resource;
|
||||
|
|
|
@ -1517,16 +1517,16 @@ void Avatar::setModelURLFinished(bool success) {
|
|||
const int MAX_SKELETON_DOWNLOAD_ATTEMPTS = 4; // NOTE: we don't want to be as generous as ResourceCache is, we only want 4 attempts
|
||||
if (_skeletonModel->getResourceDownloadAttemptsRemaining() <= 0 ||
|
||||
_skeletonModel->getResourceDownloadAttempts() > MAX_SKELETON_DOWNLOAD_ATTEMPTS) {
|
||||
qCWarning(avatars_renderer) << "Using default after failing to load Avatar model: " << _skeletonModelURL
|
||||
<< "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts.";
|
||||
qCWarning(avatars_renderer) << "Using default after failing to load Avatar model, "
|
||||
<< "after" << _skeletonModel->getResourceDownloadAttempts() << "attempts.";
|
||||
|
||||
// call _skeletonModel.setURL, but leave our copy of _skeletonModelURL alone. This is so that
|
||||
// we don't redo this every time we receive an identity packet from the avatar with the bad url.
|
||||
QMetaObject::invokeMethod(_skeletonModel.get(), "setURL",
|
||||
Qt::QueuedConnection, Q_ARG(QUrl, AvatarData::defaultFullAvatarModelUrl()));
|
||||
} else {
|
||||
qCWarning(avatars_renderer) << "Avatar model: " << _skeletonModelURL
|
||||
<< "failed to load... attempts:" << _skeletonModel->getResourceDownloadAttempts()
|
||||
<< "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS;
|
||||
qCWarning(avatars_renderer) << "Avatar model failed to load... attempts:"
|
||||
<< _skeletonModel->getResourceDownloadAttempts() << "out of:" << MAX_SKELETON_DOWNLOAD_ATTEMPTS;
|
||||
}
|
||||
}
|
||||
if (success) {
|
||||
|
|
|
@ -1999,7 +1999,6 @@ void AvatarData::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
|||
}
|
||||
|
||||
_skeletonModelURL = expanded;
|
||||
qCDebug(avatars) << "Changing skeleton model for avatar" << getSessionUUID() << "to" << _skeletonModelURL.toString();
|
||||
|
||||
updateJointMappings();
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ void AmbientLightPropertyGroup::merge(const AmbientLightPropertyGroup& other) {
|
|||
void AmbientLightPropertyGroup::debugDump() const {
|
||||
qCDebug(entities) << " AmbientLightPropertyGroup: ---------------------------------------------";
|
||||
qCDebug(entities) << " ambientIntensity:" << getAmbientIntensity();
|
||||
qCDebug(entities) << " ambientURL:" << getAmbientURL();
|
||||
}
|
||||
|
||||
void AmbientLightPropertyGroup::listChangedProperties(QList<QString>& out) {
|
||||
|
|
|
@ -173,7 +173,6 @@ void AnimationPropertyGroup::setFromOldAnimationSettings(const QString& value) {
|
|||
|
||||
void AnimationPropertyGroup::debugDump() const {
|
||||
qCDebug(entities) << " AnimationPropertyGroup: ---------------------------------------------";
|
||||
qCDebug(entities) << " url:" << getURL() << " has changed:" << urlChanged();
|
||||
qCDebug(entities) << " fps:" << getFPS() << " has changed:" << fpsChanged();
|
||||
qCDebug(entities) << "currentFrame:" << getCurrentFrame() << " has changed:" << currentFrameChanged();
|
||||
qCDebug(entities) << "allowTranslation:" << getAllowTranslation() << " has changed:" << allowTranslationChanged();
|
||||
|
|
|
@ -203,14 +203,13 @@ void EntityEditFilters::addFilter(EntityItemID entityID, QString filterURL) {
|
|||
auto scriptRequest = DependencyManager::get<ResourceManager>()->createResourceRequest(
|
||||
this, scriptURL, true, -1, "EntityEditFilters::addFilter");
|
||||
if (!scriptRequest) {
|
||||
qWarning() << "Could not create ResourceRequest for Entity Edit filter script at" << scriptURL.toString();
|
||||
qWarning() << "Could not create ResourceRequest for Entity Edit filter.";
|
||||
scriptRequestFinished(entityID);
|
||||
return;
|
||||
}
|
||||
// Agent.cpp sets up a timeout here, but that is unnecessary, as ResourceRequest has its own.
|
||||
connect(scriptRequest, &ResourceRequest::finished, this, [this, entityID]{ EntityEditFilters::scriptRequestFinished(entityID);} );
|
||||
// FIXME: handle atp rquests setup here. See Agent::requestScript()
|
||||
qInfo() << "Requesting script at URL" << qPrintable(scriptRequest->getUrl().toString());
|
||||
scriptRequest->send();
|
||||
qDebug() << "script request sent for entity " << entityID;
|
||||
}
|
||||
|
@ -376,7 +375,7 @@ void EntityEditFilters::scriptRequestFinished(EntityItemID entityID) {
|
|||
}
|
||||
} else if (scriptRequest) {
|
||||
const QString urlString = scriptRequest->getUrl().toString();
|
||||
qCritical() << "Failed to download script at" << urlString;
|
||||
qCritical() << "Failed to download script";
|
||||
// See HTTPResourceRequest::onRequestFinished for interpretation of codes. For example, a 404 is code 6 and 403 is 3. A timeout is 2. Go figure.
|
||||
qCritical() << "ResourceRequest error was" << scriptRequest->getResult();
|
||||
} else {
|
||||
|
|
|
@ -1808,7 +1808,5 @@ HFMModel* readFBX(QIODevice* device, const QVariantHash& mapping, const QString&
|
|||
reader._loadLightmaps = loadLightmaps;
|
||||
reader._lightmapLevel = lightmapLevel;
|
||||
|
||||
qCDebug(modelformat) << "Reading FBX: " << url;
|
||||
|
||||
return reader.extractHFMModel(mapping, url);
|
||||
}
|
||||
|
|
|
@ -937,7 +937,6 @@ HFMModel* GLTFReader::readGLTF(QByteArray& data, const QVariantHash& mapping,
|
|||
bool GLTFReader::readBinary(const QString& url, QByteArray& outdata) {
|
||||
QUrl binaryUrl = _url.resolved(url);
|
||||
|
||||
qCDebug(modelformat) << "binaryUrl: " << binaryUrl << " OriginalUrl: " << _url;
|
||||
bool success;
|
||||
std::tie<bool, QByteArray>(success, outdata) = requestData(binaryUrl);
|
||||
|
||||
|
@ -1006,8 +1005,6 @@ HFMTexture GLTFReader::getHFMTexture(const GLTFTexture& texture) {
|
|||
QString fname = QUrl(url).fileName();
|
||||
QUrl textureUrl = _url.resolved(url);
|
||||
qCDebug(modelformat) << "fname: " << fname;
|
||||
qCDebug(modelformat) << "textureUrl: " << textureUrl;
|
||||
qCDebug(modelformat) << "Url: " << _url;
|
||||
fbxtex.name = fname;
|
||||
fbxtex.filename = textureUrl.toEncoded();
|
||||
}
|
||||
|
@ -1289,14 +1286,6 @@ void GLTFReader::hfmDebugDump(const HFMModel& hfmModel) {
|
|||
qCDebug(modelformat) << " normalTexture =" << mat.normalTexture.filename;
|
||||
qCDebug(modelformat) << " albedoTexture =" << mat.albedoTexture.filename;
|
||||
qCDebug(modelformat) << " opacityTexture =" << mat.opacityTexture.filename;
|
||||
qCDebug(modelformat) << " glossTexture =" << mat.glossTexture.filename;
|
||||
qCDebug(modelformat) << " roughnessTexture =" << mat.roughnessTexture.filename;
|
||||
qCDebug(modelformat) << " specularTexture =" << mat.specularTexture.filename;
|
||||
qCDebug(modelformat) << " metallicTexture =" << mat.metallicTexture.filename;
|
||||
qCDebug(modelformat) << " emissiveTexture =" << mat.emissiveTexture.filename;
|
||||
qCDebug(modelformat) << " occlusionTexture =" << mat.occlusionTexture.filename;
|
||||
qCDebug(modelformat) << " scatteringTexture =" << mat.scatteringTexture.filename;
|
||||
qCDebug(modelformat) << " lightmapTexture =" << mat.lightmapTexture.filename;
|
||||
|
||||
qCDebug(modelformat) << " lightmapParams =" << mat.lightmapParams;
|
||||
|
||||
|
|
|
@ -361,9 +361,6 @@ struct GLTFImage {
|
|||
int bufferView; //required (or)
|
||||
QMap<QString, bool> defined;
|
||||
void dump() {
|
||||
if (defined["uri"]) {
|
||||
qCDebug(modelformat) << "uri: " << uri;
|
||||
}
|
||||
if (defined["mimeType"]) {
|
||||
qCDebug(modelformat) << "mimeType: " << mimeType;
|
||||
}
|
||||
|
|
|
@ -845,7 +845,7 @@ HFMModel::Pointer OBJReader::readOBJ(QByteArray& data, const QVariantHash& mappi
|
|||
preDefinedMaterial.diffuseColor = glm::vec3(1.0f);
|
||||
QVector<QByteArray> extensions = { "jpg", "jpeg", "png", "tga" };
|
||||
QByteArray base = basename.toUtf8(), textName = "";
|
||||
qCDebug(modelformat) << "OBJ Reader looking for default texture of" << url;
|
||||
qCDebug(modelformat) << "OBJ Reader looking for default texture";
|
||||
for (int i = 0; i < extensions.count(); i++) {
|
||||
QByteArray candidateString = base + extensions[i];
|
||||
if (isValidTexture(candidateString)) {
|
||||
|
@ -866,7 +866,7 @@ HFMModel::Pointer OBJReader::readOBJ(QByteArray& data, const QVariantHash& mappi
|
|||
foreach (QString libraryName, librariesSeen.keys()) {
|
||||
// Throw away any path part of libraryName, and merge against original url.
|
||||
QUrl libraryUrl = _url.resolved(QUrl(libraryName).fileName());
|
||||
qCDebug(modelformat) << "OBJ Reader material library" << libraryName << "used in" << _url;
|
||||
qCDebug(modelformat) << "OBJ Reader material library" << libraryName;
|
||||
bool success;
|
||||
QByteArray data;
|
||||
std::tie<bool, QByteArray>(success, data) = requestData(libraryUrl);
|
||||
|
|
|
@ -69,12 +69,12 @@ GLTexture* GL41Backend::syncGPUObject(const TexturePointer& texturePointer) {
|
|||
break;
|
||||
|
||||
case TextureUsageType::STRICT_RESOURCE:
|
||||
qCDebug(gpugllogging) << "Strict texture " << texture.source().c_str();
|
||||
qCDebug(gpugllogging) << "Strict texture";
|
||||
object = new GL41StrictResourceTexture(shared_from_this(), texture);
|
||||
break;
|
||||
|
||||
case TextureUsageType::RESOURCE:
|
||||
qCDebug(gpugllogging) << "variable / Strict texture " << texture.source().c_str();
|
||||
qCDebug(gpugllogging) << "variable / Strict texture";
|
||||
object = new GL41ResourceTexture(shared_from_this(), texture);
|
||||
_textureManagement._transferEngine->addMemoryManagedTexture(texturePointer);
|
||||
break;
|
||||
|
|
|
@ -260,7 +260,7 @@ uint16 KtxStorage::minAvailableMipLevel() const {
|
|||
|
||||
void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& storage) {
|
||||
if (level != _minMipLevelAvailable - 1) {
|
||||
qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level << " " << _filename.c_str();
|
||||
qWarning() << "Invalid level to be stored, expected: " << (_minMipLevelAvailable - 1) << ", got: " << level;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -278,13 +278,13 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor
|
|||
std::lock_guard<std::mutex> lock(*_cacheFileMutex);
|
||||
auto file = maybeOpenFile();
|
||||
if (!file) {
|
||||
qWarning() << "Failed to open file to assign mip data " << QString::fromStdString(_filename);
|
||||
qWarning() << "Failed to open file to assign mip data ";
|
||||
return;
|
||||
}
|
||||
|
||||
auto fileData = file->mutableData();
|
||||
if (!fileData) {
|
||||
qWarning() << "Failed to get mutable data for " << QString::fromStdString(_filename);
|
||||
qWarning() << "Failed to get mutable data for ";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,8 +214,6 @@ QImage processRawImageData(QIODevice& content, const std::string& filename) {
|
|||
newImageReader.setDevice(&content);
|
||||
|
||||
if (newImageReader.canRead()) {
|
||||
qCWarning(imagelogging) << "Image file" << filename.c_str() << "has extension" << filenameExtension.c_str()
|
||||
<< "but is actually a" << qPrintable(newImageReader.format()) << "(recovering)";
|
||||
return newImageReader.read();
|
||||
}
|
||||
}
|
||||
|
@ -238,7 +236,7 @@ gpu::TexturePointer processImage(std::shared_ptr<QIODevice> content, const std::
|
|||
// Validate that the image loaded
|
||||
if (imageWidth == 0 || imageHeight == 0 || image.format() == QImage::Format_Invalid) {
|
||||
QString reason(image.format() == QImage::Format_Invalid ? "(Invalid Format)" : "(Size is invalid)");
|
||||
qCWarning(imagelogging) << "Failed to load" << filename.c_str() << qPrintable(reason);
|
||||
qCWarning(imagelogging) << "Failed to load:" << qPrintable(reason);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -250,7 +248,7 @@ gpu::TexturePointer processImage(std::shared_ptr<QIODevice> content, const std::
|
|||
imageWidth = (int)(scaleFactor * (float)imageWidth + 0.5f);
|
||||
imageHeight = (int)(scaleFactor * (float)imageHeight + 0.5f);
|
||||
image = image.scaled(QSize(imageWidth, imageHeight), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
qCDebug(imagelogging).nospace() << "Downscaled " << filename.c_str() << " (" <<
|
||||
qCDebug(imagelogging).nospace() << "Downscaled " << " (" <<
|
||||
QSize(originalWidth, originalHeight) << " to " <<
|
||||
QSize(imageWidth, imageHeight) << ")";
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ void GeometryMappingResource::downloadFinished(const QByteArray& data) {
|
|||
QString filename = _mapping.value("filename").toString();
|
||||
|
||||
if (filename.isNull()) {
|
||||
qCDebug(modelnetworking) << "Mapping file" << _url << "has no \"filename\" field";
|
||||
finishedLoading(false);
|
||||
} else {
|
||||
QUrl url = _url.resolved(filename);
|
||||
|
@ -176,7 +175,6 @@ void GeometryReader::run() {
|
|||
});
|
||||
|
||||
if (!_resource.data()) {
|
||||
qCWarning(modelnetworking) << "Abandoning load of" << _url << "; resource was deleted";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -239,10 +237,7 @@ void GeometryReader::run() {
|
|||
} else {
|
||||
throw QString("url is invalid");
|
||||
}
|
||||
} catch (const QString& error) {
|
||||
|
||||
qCDebug(modelnetworking) << "Error parsing model for" << _url << ":" << error;
|
||||
|
||||
} catch (const std::exception&) {
|
||||
auto resource = _resource.toStrongRef();
|
||||
if (resource) {
|
||||
QMetaObject::invokeMethod(resource.data(), "finishedLoading",
|
||||
|
|
|
@ -576,7 +576,6 @@ bool NetworkTexture::handleFailedRequest(ResourceRequest::Result result) {
|
|||
|
||||
auto newPath = _request->getRelativePathUrl();
|
||||
if (newPath.fileName().endsWith(".ktx")) {
|
||||
qDebug() << "Redirecting to" << newPath << "from" << _url;
|
||||
_currentlyLoadingResourceType = ResourceType::KTX;
|
||||
_activeUrl = newPath;
|
||||
_shouldFailOnRedirect = false;
|
||||
|
@ -622,7 +621,6 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) {
|
|||
this, _activeUrl, true, -1, "NetworkTexture::startMipRangeRequest");
|
||||
|
||||
if (!_ktxMipRequest) {
|
||||
qCWarning(networking).noquote() << "Failed to get request for" << _url.toDisplayString();
|
||||
|
||||
PROFILE_ASYNC_END(resource, "Resource:" + getType(), QString::number(_requestID));
|
||||
return;
|
||||
|
@ -681,12 +679,6 @@ void NetworkTexture::ktxInitialDataRequestFinished() {
|
|||
|
||||
if (result == ResourceRequest::Success) {
|
||||
|
||||
// This is an expensive operation that we do not want in release.
|
||||
#ifdef DEBUG
|
||||
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
||||
#endif
|
||||
|
||||
_ktxHeaderData = _ktxHeaderRequest->getData();
|
||||
_ktxHighMipData = _ktxMipRequest->getData();
|
||||
handleFinishedInitialLoad();
|
||||
|
@ -731,8 +723,6 @@ void NetworkTexture::ktxMipRequestFinished() {
|
|||
|
||||
auto result = _ktxMipRequest->getResult();
|
||||
if (result == ResourceRequest::Success) {
|
||||
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_url.toDisplayString(), extraInfo);
|
||||
|
||||
if (_ktxResourceState == REQUESTING_MIP) {
|
||||
Q_ASSERT(_ktxMipLevelRangeInFlight.first != NULL_MIP_LEVEL);
|
||||
|
@ -835,7 +825,6 @@ void NetworkTexture::handleFinishedInitialLoad() {
|
|||
auto header = reinterpret_cast<const ktx::Header*>(ktxHeaderData.data());
|
||||
|
||||
if (!ktx::checkIdentifier(header->identifier)) {
|
||||
qWarning() << "Cannot load " << url << ", invalid header identifier";
|
||||
QMetaObject::invokeMethod(resource.data(), "setImage",
|
||||
Q_ARG(gpu::TexturePointer, nullptr),
|
||||
Q_ARG(int, 0),
|
||||
|
@ -845,7 +834,6 @@ void NetworkTexture::handleFinishedInitialLoad() {
|
|||
|
||||
auto kvSize = header->bytesOfKeyValueData;
|
||||
if (kvSize > (ktxHeaderData.size() - ktx::KTX_HEADER_SIZE)) {
|
||||
qWarning() << "Cannot load " << url << ", did not receive all kv data with initial request";
|
||||
QMetaObject::invokeMethod(resource.data(), "setImage",
|
||||
Q_ARG(gpu::TexturePointer, nullptr),
|
||||
Q_ARG(int, 0),
|
||||
|
@ -857,7 +845,6 @@ void NetworkTexture::handleFinishedInitialLoad() {
|
|||
|
||||
auto imageDescriptors = header->generateImageDescriptors();
|
||||
if (imageDescriptors.size() == 0) {
|
||||
qWarning(networking) << "Failed to process ktx file " << url;
|
||||
QMetaObject::invokeMethod(resource.data(), "setImage",
|
||||
Q_ARG(gpu::TexturePointer, nullptr),
|
||||
Q_ARG(int, 0),
|
||||
|
@ -987,7 +974,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) {
|
|||
|
||||
TextureMeta meta;
|
||||
if (!TextureMeta::deserialize(content, &meta)) {
|
||||
qWarning() << "Failed to read texture meta from " << _url;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -999,7 +985,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) {
|
|||
if (backend->supportedTextureFormat(elFormat)) {
|
||||
auto url = pair.second;
|
||||
if (url.fileName().endsWith(TEXTURE_META_EXTENSION)) {
|
||||
qWarning() << "Found a texture meta URL inside of the texture meta file at" << _activeUrl;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1029,6 @@ void NetworkTexture::loadMetaContent(const QByteArray& content) {
|
|||
return;
|
||||
}
|
||||
|
||||
qWarning() << "Failed to find supported texture type in " << _activeUrl;
|
||||
Resource::handleFailedRequest(ResourceRequest::NotFound);
|
||||
}
|
||||
|
||||
|
@ -1135,7 +1119,6 @@ void ImageReader::run() {
|
|||
void ImageReader::read() {
|
||||
auto resource = _resource.lock(); // to ensure the resource is still needed
|
||||
if (!resource) {
|
||||
qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref";
|
||||
return;
|
||||
}
|
||||
auto networkTexture = resource.staticCast<NetworkTexture>();
|
||||
|
@ -1195,7 +1178,6 @@ void ImageReader::read() {
|
|||
texture = image::processImage(std::move(buffer), _url.toString().toStdString(), _maxNumPixels, networkTexture->getTextureType(), shouldCompress, target);
|
||||
|
||||
if (!texture) {
|
||||
qCWarning(modelnetworking) << "Could not process:" << _url;
|
||||
QMetaObject::invokeMethod(resource.data(), "setImage",
|
||||
Q_ARG(gpu::TexturePointer, texture),
|
||||
Q_ARG(int, 0),
|
||||
|
@ -1217,13 +1199,9 @@ void ImageReader::read() {
|
|||
size_t length = memKtx->_storage->size();
|
||||
auto& ktxCache = textureCache->_ktxCache;
|
||||
auto file = ktxCache->writeFile(data, KTXCache::Metadata(hash, length));
|
||||
if (!file) {
|
||||
qCWarning(modelnetworking) << _url << "file cache failed";
|
||||
} else {
|
||||
if (file) {
|
||||
texture->setKtxBacking(file);
|
||||
}
|
||||
} else {
|
||||
qCWarning(modelnetworking) << "Unable to serialize texture to KTX " << _url;
|
||||
}
|
||||
|
||||
// We replace the texture with the one stored in the cache. This deals with the possible race condition of two different
|
||||
|
|
|
@ -225,7 +225,6 @@ MiniPromise::Promise AssetClient::saveToCacheAsync(const QUrl& url, const QByteA
|
|||
if (ioDevice) {
|
||||
ioDevice->write(data);
|
||||
cache->insert(ioDevice);
|
||||
qCDebug(asset_client) << url.toDisplayString() << "saved to disk cache ("<< data.size()<<" bytes)";
|
||||
deferred->resolve({
|
||||
{ "url", url },
|
||||
{ "success", true },
|
||||
|
@ -235,7 +234,7 @@ MiniPromise::Promise AssetClient::saveToCacheAsync(const QUrl& url, const QByteA
|
|||
{ "lastModified", metaData.lastModified().toString().isEmpty() ? QDateTime() : metaData.lastModified() },
|
||||
});
|
||||
} else {
|
||||
auto error = QString("Could not save %1 to disk cache").arg(url.toDisplayString());
|
||||
auto error = QString("Could not save to disk cache");
|
||||
qCWarning(asset_client) << error;
|
||||
deferred->reject(CACHE_ERROR_MESSAGE.arg(__FUNCTION__).arg(error));
|
||||
}
|
||||
|
|
|
@ -216,11 +216,6 @@ void AssetResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytes
|
|||
if (bytesReceived != bytesTotal
|
||||
&& now - _lastProgressDebug > std::chrono::seconds(DOWNLOAD_PROGRESS_LOG_INTERVAL_SECONDS)) {
|
||||
|
||||
int percentage = roundf((float) bytesReceived / (float) bytesTotal * 100.0f);
|
||||
|
||||
qCDebug(networking).nospace() << "Progress for " << _url.path() << " - "
|
||||
<< bytesReceived << " of " << bytesTotal << " bytes - " << percentage << "%";
|
||||
|
||||
_lastProgressDebug = now;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,10 +67,7 @@ QByteArray loadFromCache(const QUrl& url) {
|
|||
|
||||
// caller is responsible for the deletion of the ioDevice, hence the unique_ptr
|
||||
if (auto ioDevice = std::unique_ptr<QIODevice>(cache->data(url))) {
|
||||
qCDebug(asset_client) << url.toDisplayString() << "loaded from disk cache.";
|
||||
return ioDevice->readAll();
|
||||
} else {
|
||||
qCDebug(asset_client) << url.toDisplayString() << "not in disk cache";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -91,10 +88,8 @@ bool saveToCache(const QUrl& url, const QByteArray& file) {
|
|||
if (auto ioDevice = cache->prepare(metaData)) {
|
||||
ioDevice->write(file);
|
||||
cache->insert(ioDevice);
|
||||
qCDebug(asset_client) << url.toDisplayString() << "saved to disk cache";
|
||||
return true;
|
||||
}
|
||||
qCWarning(asset_client) << "Could not save" << url.toDisplayString() << "to disk cache.";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,9 +46,6 @@ void FileResourceRequest::doSend() {
|
|||
QFileSelector fileSelector;
|
||||
fileSelector.setExtraSelectors(FileUtils::getFileSelectors());
|
||||
filename = fileSelector.select(filename);
|
||||
if (filename != originalFilename) {
|
||||
qCDebug(resourceLog) << "Using" << filename << "instead of" << originalFilename;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_byteRange.isValid()) {
|
||||
|
|
|
@ -208,7 +208,7 @@ void HTTPResourceRequest::onDownloadProgress(qint64 bytesReceived, qint64 bytesT
|
|||
}
|
||||
|
||||
void HTTPResourceRequest::onTimeout() {
|
||||
qDebug() << "Timeout: " << _url << ":" << _reply->isFinished();
|
||||
qDebug() << "Timeout: " << _reply->isFinished();
|
||||
Q_ASSERT(_state == InProgress);
|
||||
_reply->disconnect(this);
|
||||
_reply->abort();
|
||||
|
|
|
@ -96,9 +96,6 @@ void GetMappingRequest::doStart() {
|
|||
// if it did grab that re-directed path
|
||||
if (_wasRedirected) {
|
||||
_redirectedPath = message->readString();
|
||||
qDebug() << "Got redirected from " << _path << " to " << _redirectedPath;
|
||||
} else {
|
||||
qDebug() << "Not redirected: " << _path;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -646,7 +646,7 @@ void Resource::attemptRequest() {
|
|||
_startedLoading = true;
|
||||
|
||||
if (_attempts > 0) {
|
||||
qCDebug(networking).noquote() << "Server unavailable for" << _url
|
||||
qCDebug(networking).noquote() << "Server unavailable "
|
||||
<< "- retrying asset load - attempt" << _attempts << " of " << MAX_ATTEMPTS;
|
||||
}
|
||||
|
||||
|
@ -658,11 +658,9 @@ void Resource::attemptRequest() {
|
|||
|
||||
void Resource::finishedLoading(bool success) {
|
||||
if (success) {
|
||||
qCDebug(networking).noquote() << "Finished loading:" << _url.toDisplayString();
|
||||
_loadPriorities.clear();
|
||||
_loaded = true;
|
||||
} else {
|
||||
qCDebug(networking).noquote() << "Failed to load:" << _url.toDisplayString();
|
||||
_failedToLoad = true;
|
||||
}
|
||||
emit finished(success);
|
||||
|
@ -692,7 +690,6 @@ void Resource::makeRequest() {
|
|||
this, _activeUrl, true, -1, "Resource::makeRequest");
|
||||
|
||||
if (!_request) {
|
||||
qCDebug(networking).noquote() << "Failed to get request for" << _url.toDisplayString();
|
||||
ResourceCache::requestCompleted(_self);
|
||||
finishedLoading(false);
|
||||
PROFILE_ASYNC_END(resource, "Resource:" + getType(), QString::number(_requestID));
|
||||
|
@ -702,7 +699,6 @@ void Resource::makeRequest() {
|
|||
_request->setByteRange(_requestByteRange);
|
||||
_request->setFailOnRedirect(_shouldFailOnRedirect);
|
||||
|
||||
qCDebug(resourceLog).noquote() << "Starting request for:" << _url.toDisplayString();
|
||||
emit loading();
|
||||
|
||||
connect(_request, &ResourceRequest::progress, this, &Resource::onProgress);
|
||||
|
@ -746,8 +742,6 @@ void Resource::handleReplyFinished() {
|
|||
|
||||
auto result = _request->getResult();
|
||||
if (result == ResourceRequest::Success) {
|
||||
auto extraInfo = _url == _activeUrl ? "" : QString(", %1").arg(_activeUrl.toDisplayString());
|
||||
qCDebug(networking).noquote() << QString("Request finished for %1%2").arg(_activeUrl.toDisplayString(), extraInfo);
|
||||
|
||||
auto relativePathURL = _request->getRelativePathUrl();
|
||||
if (!relativePathURL.isEmpty()) {
|
||||
|
@ -770,7 +764,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) {
|
|||
bool willRetry = false;
|
||||
switch (result) {
|
||||
case ResourceRequest::Result::Timeout: {
|
||||
qCDebug(networking) << "Timed out loading" << _url << "received" << _bytesReceived << "total" << _bytesTotal;
|
||||
qCDebug(networking) << "Timed out loading: received " << _bytesReceived << " total " << _bytesTotal;
|
||||
// Fall through to other cases
|
||||
}
|
||||
// FALLTHRU
|
||||
|
@ -778,13 +772,13 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) {
|
|||
_attempts++;
|
||||
_attemptsRemaining--;
|
||||
|
||||
qCDebug(networking) << "Retryable error while loading" << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining;
|
||||
qCDebug(networking) << "Retryable error while loading: attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining;
|
||||
|
||||
// retry with increasing delays
|
||||
const int BASE_DELAY_MS = 1000;
|
||||
if (_attempts < MAX_ATTEMPTS) {
|
||||
auto waitTime = BASE_DELAY_MS * (int)pow(2.0, _attempts);
|
||||
qCDebug(networking).noquote() << "Server unavailable for" << _url << "- may retry in" << waitTime << "ms"
|
||||
qCDebug(networking).noquote() << "Server unavailable for - may retry in" << waitTime << "ms"
|
||||
<< "if resource is still needed";
|
||||
QTimer::singleShot(waitTime, this, &Resource::attemptRequest);
|
||||
willRetry = true;
|
||||
|
@ -795,7 +789,7 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) {
|
|||
// FALLTHRU
|
||||
default: {
|
||||
_attemptsRemaining = 0;
|
||||
qCDebug(networking) << "Error loading " << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining;
|
||||
qCDebug(networking) << "Error loading, attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining;
|
||||
auto error = (result == ResourceRequest::Timeout) ? QNetworkReply::TimeoutError
|
||||
: QNetworkReply::UnknownNetworkError;
|
||||
emit failed(error);
|
||||
|
|
|
@ -679,7 +679,6 @@ bool Octree::readFromFile(const char* fileName) {
|
|||
QFile file(qFileName);
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qCritical() << "unable to open for reading: " << fileName;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -687,8 +686,6 @@ bool Octree::readFromFile(const char* fileName) {
|
|||
QFileInfo fileInfo(qFileName);
|
||||
uint64_t fileLength = fileInfo.size();
|
||||
|
||||
qCDebug(octree) << "Loading file" << qFileName << "...";
|
||||
|
||||
bool success = readFromStream(fileLength, fileInputStream);
|
||||
|
||||
file.close();
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
bool readOctreeFile(QString path, QJsonDocument* doc) {
|
||||
QFile file(path);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
qCritical() << "Cannot open json file for reading: " << path;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,6 @@ void OctreePersistThread::handleOctreeDataFileReply(QSharedPointer<ReceivedMessa
|
|||
}
|
||||
|
||||
quint64 loadStarted = usecTimestampNow();
|
||||
qCDebug(octree) << "loading Octrees from file: " << _filename << "...";
|
||||
|
||||
if (hasValidOctreeData) {
|
||||
qDebug() << "Setting entity version info to: " << data.id << data.version;
|
||||
|
@ -147,7 +146,6 @@ void OctreePersistThread::handleOctreeDataFileReply(QSharedPointer<ReceivedMessa
|
|||
_loadTimeUSecs = loadDone - loadStarted;
|
||||
|
||||
_tree->clearDirtyBit(); // the tree is clean since we just loaded it
|
||||
qCDebug(octree, "DONE loading Octrees from file... fileRead=%s", debug::valueOf(persistentFileRead));
|
||||
|
||||
unsigned long nodeCount = OctreeElement::getNodeCount();
|
||||
unsigned long internalNodeCount = OctreeElement::getInternalNodeCount();
|
||||
|
|
|
@ -157,13 +157,11 @@ void Procedural::setProceduralData(const ProceduralData& proceduralData) {
|
|||
}
|
||||
|
||||
if (!shaderUrl.isValid()) {
|
||||
qCWarning(proceduralLog) << "Invalid shader URL: " << shaderUrl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (shaderUrl.isLocalFile()) {
|
||||
if (!QFileInfo(shaderUrl.toLocalFile()).exists()) {
|
||||
qCWarning(proceduralLog) << "Invalid shader URL, missing local file: " << shaderUrl;
|
||||
return;
|
||||
}
|
||||
_shaderPath = shaderUrl.toLocalFile();
|
||||
|
|
|
@ -398,7 +398,6 @@ void AssetScriptingInterface::loadFromCache(QScriptValue options, QScriptValue s
|
|||
bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) {
|
||||
auto scriptEngine = qobject_cast<ScriptEngine*>(engine());
|
||||
if (!scriptEngine) {
|
||||
qCDebug(scriptengine) << __FUNCTION__ << "invalid script engine" << url;
|
||||
return false;
|
||||
}
|
||||
// allow cache writes only from Client, EntityServer and Agent scripts
|
||||
|
@ -407,7 +406,6 @@ bool AssetScriptingInterface::canWriteCacheValue(const QUrl& url) {
|
|||
scriptEngine->isAgentScript()
|
||||
);
|
||||
if (!isAllowedContext) {
|
||||
qCDebug(scriptengine) << __FUNCTION__ << "invalid context" << scriptEngine->getContext() << url;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -430,7 +428,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray&
|
|||
auto atpURL = AssetUtils::getATPUrl(hashDataHex(data));
|
||||
atpURL.setQuery(url.query());
|
||||
atpURL.setFragment(url.fragment());
|
||||
qCDebug(scriptengine) << "autogenerated ATP URL" << url << "=>" << atpURL;
|
||||
url = atpURL;
|
||||
}
|
||||
auto hash = AssetUtils::extractAssetHash(url.toDisplayString());
|
||||
|
@ -440,7 +437,6 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray&
|
|||
JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported");
|
||||
JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data)));
|
||||
|
||||
// qCDebug(scriptengine) << "saveToCache" << url.toDisplayString() << data << hash << metadata;
|
||||
|
||||
jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback);
|
||||
}
|
||||
|
|
|
@ -51,8 +51,6 @@ void BatchLoader::start(int maxRetries) {
|
|||
for (const auto& rawURL : _urls) {
|
||||
QUrl url = expandScriptUrl(normalizeScriptURL(rawURL));
|
||||
|
||||
qCDebug(scriptengine) << "Loading script at " << url;
|
||||
|
||||
auto scriptCache = DependencyManager::get<ScriptCache>();
|
||||
|
||||
// Use a proxy callback to handle the call and emit the signal in a thread-safe way.
|
||||
|
@ -65,10 +63,8 @@ void BatchLoader::start(int maxRetries) {
|
|||
_status.insert(url, status);
|
||||
if (isURL && success) {
|
||||
_data.insert(url, contents);
|
||||
qCDebug(scriptengine) << "Loaded: " << url;
|
||||
} else {
|
||||
_data.insert(url, QString());
|
||||
qCDebug(scriptengine) << "Could not load: " << url << status;
|
||||
}
|
||||
|
||||
if (!_finished && _urls.size() == _data.size()) {
|
||||
|
|
|
@ -38,10 +38,7 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent
|
|||
}
|
||||
|
||||
void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip, bool isBlocks) {
|
||||
qCDebug(scriptengine) << "Url that was downloaded: " + url.toString();
|
||||
qCDebug(scriptengine) << "Path where download is saved: " + path;
|
||||
QString fileName = "/" + path.section("/", -1);
|
||||
qCDebug(scriptengine) << "Filename: " << fileName;
|
||||
QString tempDir = path;
|
||||
if (!isZip) {
|
||||
tempDir.remove(fileName);
|
||||
|
@ -59,9 +56,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool
|
|||
|
||||
QStringList fileList = unzipFile(path, tempDir);
|
||||
|
||||
if (!fileList.isEmpty()) {
|
||||
qCDebug(scriptengine) << "First file to upload: " + fileList.first();
|
||||
} else {
|
||||
if(fileList.isEmpty()) {
|
||||
qCDebug(scriptengine) << "Unzip failed";
|
||||
}
|
||||
|
||||
|
@ -131,7 +126,6 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) {
|
|||
QString newUrl;
|
||||
QString oldUrl = url.toString();
|
||||
newUrl = oldUrl.section("filename=", 1, 1);
|
||||
qCDebug(scriptengine) << "Filename should be: " + newUrl;
|
||||
return newUrl;
|
||||
}
|
||||
|
||||
|
@ -149,14 +143,12 @@ void FileScriptingInterface::downloadZip(QString path, const QString link) {
|
|||
// this function is not in use
|
||||
void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) {
|
||||
/*if (!file.isDir()) {
|
||||
qCDebug(scriptengine) << "Regular file logged: " + file.fileName();
|
||||
return;
|
||||
}*/
|
||||
QFileInfoList files;
|
||||
// FIXME quazip hasn't been built on the android toolchain
|
||||
#if !defined(Q_OS_ANDROID)
|
||||
if (file.fileName().contains(".zip")) {
|
||||
qCDebug(scriptengine) << "Extracting archive: " + file.fileName();
|
||||
JlCompress::extractDir(file.fileName());
|
||||
}
|
||||
#endif
|
||||
|
@ -167,7 +159,6 @@ void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName)
|
|||
}*/
|
||||
|
||||
foreach (QFileInfo file, files) {
|
||||
qCDebug(scriptengine) << "Looking into file: " + file.fileName();
|
||||
recursiveFileScan(file, dirName);
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -37,9 +37,6 @@ ScriptCache::ScriptCache(QObject* parent) {
|
|||
|
||||
void ScriptCache::clearCache() {
|
||||
Lock lock(_containerLock);
|
||||
foreach(auto& url, _scriptCache.keys()) {
|
||||
qCDebug(scriptengine) << "clearing cache: " << url;
|
||||
}
|
||||
_scriptCache.clear();
|
||||
}
|
||||
|
||||
|
@ -48,7 +45,6 @@ void ScriptCache::clearATPScriptsFromCache() {
|
|||
qCDebug(scriptengine) << "Clearing ATP scripts from ScriptCache";
|
||||
for (auto it = _scriptCache.begin(); it != _scriptCache.end();) {
|
||||
if (it.key().scheme() == "atp") {
|
||||
qCDebug(scriptengine) << "Removing: " << it.key();
|
||||
it = _scriptCache.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
|
@ -60,7 +56,6 @@ void ScriptCache::deleteScript(const QUrl& unnormalizedURL) {
|
|||
QUrl url = DependencyManager::get<ResourceManager>()->normalizeURL(unnormalizedURL);
|
||||
Lock lock(_containerLock);
|
||||
if (_scriptCache.contains(url)) {
|
||||
qCDebug(scriptengine) << "Delete script from cache:" << url.toString();
|
||||
_scriptCache.remove(url);
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +141,6 @@ void ScriptCache::scriptContentAvailable(int maxRetries) {
|
|||
_activeScriptRequests.remove(url);
|
||||
|
||||
_scriptCache[url] = scriptContent = req->getData();
|
||||
qCDebug(scriptengine) << "Done downloading script at:" << url.toString();
|
||||
} else {
|
||||
auto result = req->getResult();
|
||||
bool irrecoverable =
|
||||
|
@ -160,12 +154,12 @@ void ScriptCache::scriptContentAvailable(int maxRetries) {
|
|||
|
||||
int timeout = exp(scriptRequest.numRetries) * ScriptRequest::START_DELAY_BETWEEN_RETRIES;
|
||||
int attempt = scriptRequest.numRetries;
|
||||
qCDebug(scriptengine) << QString("Script request failed [%1]: %2 (will retry %3 more times; attempt #%4 in %5ms...)")
|
||||
.arg(status).arg(url.toString()).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout);
|
||||
qCDebug(scriptengine) << QString("Script request failed [%1]: (will retry %2 more times; attempt #%3 in %4ms...)")
|
||||
.arg(status).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout);
|
||||
|
||||
QTimer::singleShot(timeout, this, [this, url, attempt, maxRetries]() {
|
||||
qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]: %3")
|
||||
.arg(attempt).arg(maxRetries).arg(url.toString());
|
||||
qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]")
|
||||
.arg(attempt).arg(maxRetries);
|
||||
|
||||
auto request = DependencyManager::get<ResourceManager>()->createResourceRequest(
|
||||
nullptr, url, true, -1, "ScriptCache::scriptContentAvailable");
|
||||
|
@ -186,12 +180,10 @@ void ScriptCache::scriptContentAvailable(int maxRetries) {
|
|||
scriptContent = _scriptCache[url];
|
||||
}
|
||||
_activeScriptRequests.remove(url);
|
||||
qCWarning(scriptengine) << "Error loading script from URL " << url << "(" << status <<")";
|
||||
qCWarning(scriptengine) << "Error loading script from URL (" << status <<")";
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
qCWarning(scriptengine) << "Warning: scriptContentAvailable for inactive url: " << url;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,6 @@ void ScriptEngine::runInThread() {
|
|||
Q_ASSERT_X(!_isThreaded, "ScriptEngine::runInThread()", "runInThread should not be called more than once");
|
||||
|
||||
if (_isThreaded) {
|
||||
qCWarning(scriptengine) << "ScriptEngine already running in thread: " << getFilename();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -498,7 +497,6 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) {
|
|||
{
|
||||
static const QString DEBUG_FLAG("#debug");
|
||||
if (QRegularExpression(DEBUG_FLAG).match(scriptContents).hasMatch()) {
|
||||
qCWarning(scriptengine) << "NOTE: ScriptEngine for " << QUrl(url).fileName() << " will be launched in debug mode";
|
||||
_debuggable = true;
|
||||
}
|
||||
}
|
||||
|
@ -1632,7 +1630,6 @@ QVariantMap ScriptEngine::fetchModuleSource(const QString& modulePath, const boo
|
|||
auto url = modulePath;
|
||||
auto status = _status[url];
|
||||
auto contents = data[url];
|
||||
qCDebug(scriptengine_module) << "require.fetchModuleSource.onload: " << QUrl(url).fileName() << status << QThread::currentThread();
|
||||
if (isStopping()) {
|
||||
req["status"] = "Stopped";
|
||||
req["success"] = false;
|
||||
|
@ -1752,8 +1749,8 @@ QScriptValue ScriptEngine::require(const QString& moduleId) {
|
|||
auto exports = module.property("exports");
|
||||
if (!invalidateCache && exports.isObject()) {
|
||||
// we have found a cached module -- just need to possibly register it with current parent
|
||||
qCDebug(scriptengine_module) << QString("require - using cached module '%1' for '%2' (loaded: %3)")
|
||||
.arg(modulePath).arg(moduleId).arg(module.property("loaded").toString());
|
||||
qCDebug(scriptengine_module) << QString("require - using cached module for '%1' (loaded: %2)")
|
||||
.arg(moduleId).arg(module.property("loaded").toString());
|
||||
registerModuleWithParent(module, parent);
|
||||
maybeEmitUncaughtException("cached module");
|
||||
return exports;
|
||||
|
@ -2138,7 +2135,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
|
|||
PROFILE_RANGE(script, __FUNCTION__);
|
||||
|
||||
if (isStopping() || DependencyManager::get<ScriptEngines>()->isStopped()) {
|
||||
qCDebug(scriptengine) << "loadEntityScript.start " << entityScript << entityID.toString()
|
||||
qCDebug(scriptengine) << "loadEntityScript.start " << entityID.toString()
|
||||
<< " but isStopping==" << isStopping()
|
||||
<< " || engines->isStopped==" << DependencyManager::get<ScriptEngines>()->isStopped();
|
||||
return;
|
||||
|
@ -2163,8 +2160,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
|
|||
// since not reloading, assume that the exact same input would produce the exact same output again
|
||||
// note: this state gets reset with "reload all scripts," leaving/returning to a Domain, clear cache, etc.
|
||||
#ifdef DEBUG_ENTITY_STATES
|
||||
qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 script: %2 (previous script failure)")
|
||||
.arg(entityID.toString()).arg(entityScript);
|
||||
qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 (previous script failure)")
|
||||
.arg(entityID.toString());
|
||||
#endif
|
||||
updateEntityScriptStatus(entityID, EntityScriptStatus::ERROR_LOADING_SCRIPT,
|
||||
"A previous Entity failed to load using this script URL; reload to try again.");
|
||||
|
@ -2173,8 +2170,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
|
|||
} else {
|
||||
// another entity is busy loading from this script URL so wait for them to finish
|
||||
#ifdef DEBUG_ENTITY_STATES
|
||||
qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 script: %2 (waiting on %3)")
|
||||
.arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(entityScript).arg(currentEntityID.toString());
|
||||
qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 (waiting on %2 )")
|
||||
.arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(currentEntityID.toString());
|
||||
#endif
|
||||
_deferredEntityLoads.push_back({ entityID, entityScript });
|
||||
return;
|
||||
|
@ -2188,7 +2185,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
|
|||
{
|
||||
EntityScriptDetails details;
|
||||
bool hasEntityScript = getEntityScriptDetails(entityID, details);
|
||||
qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityScript << entityID.toString()
|
||||
qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityID.toString()
|
||||
<< "(previous: " << (hasEntityScript ? details.status : EntityScriptStatus::PENDING) << ")";
|
||||
}
|
||||
#endif
|
||||
|
@ -2217,7 +2214,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
|
|||
}
|
||||
executeOnScriptThread([=]{
|
||||
#ifdef DEBUG_ENTITY_STATES
|
||||
qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << QUrl(url).fileName() << entityID.toString();
|
||||
qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << entityID.toString();
|
||||
#endif
|
||||
if (!isStopping() && hasEntityScriptDetails(entityID)) {
|
||||
_contentAvailableQueue[entityID] = { entityID, url, contents, isURL, success, status };
|
||||
|
@ -2306,7 +2303,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
|
|||
setEntityScriptDetails(entityID, newDetails);
|
||||
|
||||
#ifdef DEBUG_ENTITY_STATES
|
||||
qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging " << entityScript << " as BAD_SCRIPT_UUID_PLACEHOLDER";
|
||||
qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging as BAD_SCRIPT_UUID_PLACEHOLDER";
|
||||
#endif
|
||||
// flag the original entityScript as unusuable
|
||||
_occupiedScriptURLs[entityScript] = BAD_SCRIPT_UUID_PLACEHOLDER;
|
||||
|
@ -2352,7 +2349,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
|
|||
timeout.setSingleShot(true);
|
||||
timeout.start(SANDBOX_TIMEOUT);
|
||||
connect(&timeout, &QTimer::timeout, [=, &sandbox]{
|
||||
qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")";
|
||||
qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout";
|
||||
|
||||
// Guard against infinite loops and non-performant code
|
||||
sandbox.raiseException(
|
||||
|
|
|
@ -112,7 +112,7 @@ QUrl expandScriptUrl(const QUrl& rawScriptURL) {
|
|||
|
||||
QUrl defaultScriptsLoc = PathUtils::defaultScriptsLocation();
|
||||
if (!defaultScriptsLoc.isParentOf(url)) {
|
||||
qCWarning(scriptengine) << "Script.include() ignoring file path" << rawScriptURL
|
||||
qCWarning(scriptengine) << "Script.include() ignoring file path"
|
||||
<< "-- outside of standard libraries: "
|
||||
<< url.path()
|
||||
<< defaultScriptsLoc.path();
|
||||
|
@ -393,7 +393,6 @@ void ScriptEngines::stopAllScripts(bool restart) {
|
|||
}
|
||||
|
||||
// stop all scripts
|
||||
qCDebug(scriptengine) << "stopping script..." << it.key();
|
||||
scriptEngine->stop();
|
||||
removeScriptEngine(scriptEngine);
|
||||
}
|
||||
|
@ -403,11 +402,8 @@ void ScriptEngines::stopAllScripts(bool restart) {
|
|||
for(const auto &scriptName : toReload) {
|
||||
auto scriptEngine = getScriptEngine(scriptName);
|
||||
if (scriptEngine && !scriptEngine->isFinished()) {
|
||||
qCDebug(scriptengine) << "waiting on script:" << scriptName;
|
||||
scriptEngine->waitTillDoneRunning();
|
||||
qCDebug(scriptengine) << "done waiting on script:" << scriptName;
|
||||
}
|
||||
qCDebug(scriptengine) << "reloading script..." << scriptName;
|
||||
reloadScript(scriptName);
|
||||
}
|
||||
if (restart) {
|
||||
|
@ -445,7 +441,6 @@ bool ScriptEngines::stopScript(const QString& rawScriptURL, bool restart) {
|
|||
scriptEngine->stop();
|
||||
removeScriptEngine(scriptEngine);
|
||||
stoppedScript = true;
|
||||
qCDebug(scriptengine) << "stopping script..." << scriptURL;
|
||||
}
|
||||
}
|
||||
return stoppedScript;
|
||||
|
|
|
@ -68,7 +68,6 @@ getEntityUserData = function(id) {
|
|||
results = JSON.parse(properties.userData);
|
||||
} catch(err) {
|
||||
logDebug(err);
|
||||
logDebug(properties.userData);
|
||||
}
|
||||
}
|
||||
return results ? results : {};
|
||||
|
|
|
@ -693,7 +693,6 @@
|
|||
}
|
||||
|
||||
function onWebEventReceived(eventString) {
|
||||
print("received web event: " + JSON.stringify(eventString));
|
||||
if (typeof eventString === "string") {
|
||||
var event;
|
||||
try {
|
||||
|
|
|
@ -33,7 +33,6 @@ ENTITY_SPAWNER = function (properties) {
|
|||
|
||||
function makeEntity(properties) {
|
||||
var entity = Entities.addEntity(properties);
|
||||
// print("spawning entity: " + JSON.stringify(properties));
|
||||
|
||||
return {
|
||||
update: function (properties) {
|
||||
|
|
|
@ -37,7 +37,7 @@ var scripts = scriptData.filter(function (datum) { return datum.name !== 'defaul
|
|||
// If defaultScripts.js is running, we leave it running, because restarting it safely is a mess.
|
||||
var otherScripts = scripts.filter(function (path) { return path !== thisPath; });
|
||||
var numberLeftRunning = scriptData.length - otherScripts.length;
|
||||
print('initially running', otherScripts.length, 'scripts. Leaving', numberLeftRunning, 'and stopping', otherScripts);
|
||||
print('initially running', otherScripts.length, 'scripts. Leaving', numberLeftRunning, 'and stopping otherScripts');
|
||||
var typedEntities = {Light: [], ParticleEffect: []};
|
||||
var interestingTypes = Object.keys(typedEntities);
|
||||
var propertiedEntities = {dynamic: []};
|
||||
|
|
|
@ -132,7 +132,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
try {
|
||||
message = JSON.parse(messageString);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
}
|
||||
switch (message.key) {
|
||||
case "HELO":
|
||||
|
|
|
@ -107,7 +107,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
try {
|
||||
message = JSON.parse(messageString);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
}
|
||||
switch (message.key) {
|
||||
case "hello":
|
||||
|
@ -149,7 +149,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
Window.alert("Someone else is summoning avatars.");
|
||||
break;
|
||||
default:
|
||||
print("crowd-agent received unrecognized message:", messageString);
|
||||
print("crowd-agent received unrecognized message");
|
||||
}
|
||||
}
|
||||
Messages.subscribe(MESSAGE_CHANNEL);
|
||||
|
|
|
@ -73,7 +73,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
try {
|
||||
message = JSON.parse(messageString);
|
||||
} catch (e) {
|
||||
print(e);
|
||||
|
||||
}
|
||||
switch (message.key) {
|
||||
case "hello":
|
||||
|
@ -121,7 +121,7 @@ function messageHandler(channel, messageString, senderID) {
|
|||
Window.alert("Someone else is summoning avatars.");
|
||||
break;
|
||||
default:
|
||||
print("crowd summon.js received unrecognized message:", messageString);
|
||||
print("crowd summon.js received unrecognized message");
|
||||
}
|
||||
}
|
||||
Messages.subscribe(MESSAGE_CHANNEL);
|
||||
|
|
|
@ -327,8 +327,8 @@ describe("Assets", function () {
|
|||
expect(hash).toMatch(IS_ASSET_HASH_REGEX);
|
||||
context.definedHash = hash; // used in later tests
|
||||
context.definedContent = SAMPLE_CONTENTS;
|
||||
print('context.definedHash = ' + context.definedHash);
|
||||
print('context.definedContent = ' + context.definedContent);
|
||||
//print('context.definedHash = ' + context.definedHash);
|
||||
//print('context.definedContent = ' + context.definedContent);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -339,7 +339,7 @@ describe("Assets", function () {
|
|||
if (error) error += ' ('+JSON.stringify([SAMPLE_FILE_PATH, context.definedHash])+')';
|
||||
expect(error).toBe(null);
|
||||
context.definedPath = SAMPLE_FILE_PATH;
|
||||
print('context.definedPath = ' + context.definedPath);
|
||||
//print('context.definedPath = ' + context.definedPath);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
var mod = Script.require('../exceptions/exception.js');
|
||||
return {
|
||||
preload: function(uuid) {
|
||||
print("entityConstructorRequireException::preload (never happens)", uuid, Script.resolvePath(''), mod);
|
||||
print("entityConstructorRequireException::preload (never happens)", uuid, mod);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
@ -328,7 +328,6 @@ function instrumentTestrunner() {
|
|||
return base;
|
||||
}
|
||||
var rel = base.replace(/[^\/]+$/, id);
|
||||
console.info('rel', rel);
|
||||
return require.resolve(rel);
|
||||
},
|
||||
require: function(mod) {
|
||||
|
@ -338,13 +337,13 @@ function instrumentTestrunner() {
|
|||
Script.require.cache = require.cache;
|
||||
Script.require.resolve = function(mod) {
|
||||
if (mod === '.' || /^\.\.($|\/)/.test(mod)) {
|
||||
throw new Error("Cannot find module '"+mod+"' (is dir)");
|
||||
throw new Error("Cannot find module (is dir)");
|
||||
}
|
||||
var path = require.resolve(mod);
|
||||
// console.info('node-require-reoslved', mod, path);
|
||||
try {
|
||||
if (require('fs').lstatSync(path).isDirectory()) {
|
||||
throw new Error("Cannot find module '"+path+"' (is directory)");
|
||||
throw new Error("Cannot find module (is directory)");
|
||||
}
|
||||
// console.info('!path', path);
|
||||
} catch (e) {
|
||||
|
|
|
@ -128,12 +128,12 @@ describe('Script', function () {
|
|||
function run() {}
|
||||
function instrument_testrunner() {
|
||||
if (typeof describe === 'undefined') {
|
||||
print('instrumenting jasmine', Script.resolvePath(''));
|
||||
print('instrumenting jasmine');
|
||||
Script.include('../../libraries/jasmine/jasmine.js');
|
||||
Script.include('../../libraries/jasmine/hifi-boot.js');
|
||||
jasmine.getEnv().addReporter({ jasmineDone: Script.stop });
|
||||
run = function() {
|
||||
print('executing jasmine', Script.resolvePath(''));
|
||||
print('executing jasmine');
|
||||
jasmine.getEnv().execute();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
function fromQml(message) {
|
||||
tokens = message.split(' ')
|
||||
print("Received '"+message+"' from hightlight.qml")
|
||||
print("Received message from QML")
|
||||
if (tokens[0]=="highlight") {
|
||||
currentSelectionName = tokens[1];
|
||||
print("Switching to highlight name "+currentSelectionName)
|
||||
|
|
|
@ -190,7 +190,6 @@
|
|||
|
||||
function fromQml(message) {
|
||||
tokens = message.split('*')
|
||||
//print("Received '"+message+"' from transition.qml")
|
||||
command = tokens[0].toLowerCase()
|
||||
if (command=="category") {
|
||||
editedCategory = parseInt(tokens[1])
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
|
||||
function onWebEventReceived(event) {
|
||||
print("photobooth.js received a web event:" + event);
|
||||
print("photobooth.js received a web event");
|
||||
// Converts the event to a JavasScript Object
|
||||
if (typeof event === "string") {
|
||||
event = JSON.parse(event);
|
||||
|
|
|
@ -30,7 +30,6 @@ var TEST_ENTITY_NAME = "EntitySpawnTest";
|
|||
(function () {
|
||||
this.makeEntity = function (properties) {
|
||||
var entity = Entities.addEntity(properties);
|
||||
// print("spawning entity: " + JSON.stringify(properties));
|
||||
|
||||
return {
|
||||
update: function (properties) {
|
||||
|
|
|
@ -125,7 +125,6 @@
|
|||
Script.include("./test_physics_scene.js")
|
||||
|
||||
function fromQml(message) {
|
||||
print("fromQml: " + JSON.stringify(message))
|
||||
switch (message.method) {
|
||||
case "createScene":
|
||||
createScene();
|
||||
|
|
|
@ -165,7 +165,7 @@ function AppUi(properties) {
|
|||
var urlOfRequest = optionalParams.urlOfRequest;
|
||||
|
||||
if (error || (response.status !== 'success')) {
|
||||
print("Error: unable to get", urlOfRequest, error || response.status);
|
||||
print("Error: unable to complete request from URL. Error:", error || response.status);
|
||||
startNotificationTimer(indexOfRequest);
|
||||
return;
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ function AppUi(properties) {
|
|||
} else {
|
||||
notificationData = that.notificationDataProcessPage[indexOfRequest](response);
|
||||
}
|
||||
console.debug(that.buttonName, that.notificationPollEndpoint[indexOfRequest],
|
||||
console.debug(that.buttonName,
|
||||
'truncated notification data for processing:',
|
||||
JSON.stringify(notificationData).substring(0, MAX_LOG_LENGTH_CHARACTERS));
|
||||
that.notificationPollCallback[indexOfRequest](notificationData);
|
||||
|
@ -226,8 +226,6 @@ function AppUi(properties) {
|
|||
}
|
||||
Settings.setValue(settingsKey, currentTimestamp);
|
||||
|
||||
console.debug(that.buttonName, 'polling for notifications at endpoint', url);
|
||||
|
||||
request({
|
||||
json: true,
|
||||
uri: url
|
||||
|
|
|
@ -319,7 +319,7 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See
|
|||
settings = getMyAvatarSettings();
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from AvatarApp.qml:', JSON.stringify(message));
|
||||
print('Unrecognized message from AvatarApp.qml');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -540,7 +540,7 @@ function fromQml(message) {
|
|||
// Handled elsewhere, don't log.
|
||||
break;
|
||||
default:
|
||||
print('Unrecognized message from QML:', JSON.stringify(message));
|
||||
print('wallet.js: Unrecognized message from QML');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2327,11 +2327,7 @@ var PropertiesTool = function (opts) {
|
|||
return;
|
||||
}
|
||||
var i, properties, dY, diff, newPosition;
|
||||
if (data.type === "print") {
|
||||
if (data.message) {
|
||||
print(data.message);
|
||||
}
|
||||
} else if (data.type === "update") {
|
||||
if (data.type === "update") {
|
||||
selectionManager.saveProperties();
|
||||
if (selectionManager.selections.length > 1) {
|
||||
for (i = 0; i < selectionManager.selections.length; i++) {
|
||||
|
@ -2728,7 +2724,7 @@ entityListTool.webView.webEventReceived.connect(function(data) {
|
|||
try {
|
||||
data = JSON.parse(data);
|
||||
} catch(e) {
|
||||
print("edit.js: Error parsing JSON: " + e.name + " data " + data);
|
||||
print("edit.js: Error parsing JSON");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1361,15 +1361,6 @@ var lastEntityID = null;
|
|||
var createAppTooltip = new CreateAppTooltip();
|
||||
let currentSpaceMode = PROPERTY_SPACE_MODE.LOCAL;
|
||||
|
||||
function debugPrint(message) {
|
||||
EventBridge.emitWebEvent(
|
||||
JSON.stringify({
|
||||
type: "print",
|
||||
message: message
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GENERAL PROPERTY/GROUP FUNCTIONS
|
||||
|
|
|
@ -546,18 +546,9 @@
|
|||
data = {};
|
||||
}
|
||||
|
||||
// Extract status message.
|
||||
if (data.hasOwnProperty("message") && data.message !== null) {
|
||||
statusMessage = data.message;
|
||||
console.log("Clara.io FBX: " + statusMessage);
|
||||
}
|
||||
|
||||
// Extract zip file URL.
|
||||
if (data.hasOwnProperty("files") && data.files.length > 0) {
|
||||
zipFileURL = data.files[0].url;
|
||||
if (zipFileURL.slice(-4) !== ".zip") {
|
||||
console.log(JSON.stringify(data)); // Data for debugging.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -587,15 +578,11 @@
|
|||
|
||||
var HTTP_OK = 200;
|
||||
if (this.status !== HTTP_OK) {
|
||||
statusMessage = "Zip file request terminated with " + this.status + " " + this.statusText;
|
||||
console.log("ERROR: Clara.io FBX: " + statusMessage);
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_STATUS,
|
||||
status: statusMessage
|
||||
}));
|
||||
} else if (zipFileURL.slice(-4) !== ".zip") {
|
||||
statusMessage = "Error creating zip file for download.";
|
||||
console.log("ERROR: Clara.io FBX: " + statusMessage + ": " + zipFileURL);
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_STATUS,
|
||||
status: (statusMessage + ": " + zipFileURL)
|
||||
|
@ -604,15 +591,12 @@
|
|||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_DOWNLOAD
|
||||
}));
|
||||
console.log("Clara.io FBX: File download initiated for " + zipFileURL);
|
||||
}
|
||||
|
||||
xmlHttpRequest = null;
|
||||
}
|
||||
|
||||
isPreparing = true;
|
||||
|
||||
console.log("Clara.io FBX: Request zip file for " + uuid);
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: CLARA_IO_STATUS,
|
||||
status: "Initiating download"
|
||||
|
|
|
@ -20,7 +20,7 @@ function requestJSON(url, callback) { // callback(data) if successfull. Logs oth
|
|||
uri: url
|
||||
}, function (error, response) {
|
||||
if (error || (response.status !== 'success')) {
|
||||
print("Error: unable to get", url, error || response.status);
|
||||
print("Error: unable to get URL", error || response.status);
|
||||
return;
|
||||
}
|
||||
callback(response.data);
|
||||
|
|
|
@ -226,7 +226,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
try {
|
||||
data = JSON.parse(data);
|
||||
} catch(e) {
|
||||
print("entityList.js: Error parsing JSON: " + e.name + " data " + data);
|
||||
print("entityList.js: Error parsing JSON");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ SelectionManager = (function() {
|
|||
try {
|
||||
messageParsed = JSON.parse(message);
|
||||
} catch (err) {
|
||||
print("ERROR: entitySelectionTool.handleEntitySelectionToolUpdates - got malformed message: " + message);
|
||||
print("ERROR: entitySelectionTool.handleEntitySelectionToolUpdates - got malformed message");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue