From f128dce185905cf930813f1611c119ba7df423b1 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Mon, 24 Jul 2017 17:10:45 -0700 Subject: [PATCH 01/24] Changed marketplaces message to be more discoverable --- scripts/system/html/js/marketplacesInject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 3b3d4b4937..45b2e99018 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -57,7 +57,7 @@ $("body").append( '
' + (!isInitialHiFiPage ? '' : '') + - (isInitialHiFiPage ? '🛈 See also other marketplaces.' : '') + + (isInitialHiFiPage ? '🛈 Get items from Blocks and Clara.io!' : '') + (!isDirectoryPage ? '' : '') + (isDirectoryPage ? '🛈 Select a marketplace to explore.' : '') + '
' From adda4f0598e6b7a916ab5ee14a6fbdb703c1a52d Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Tue, 25 Jul 2017 18:36:39 -0700 Subject: [PATCH 02/24] Added Blocks to marketplace window --- scripts/system/html/img/blocks-tile.png | Bin 0 -> 35130 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 scripts/system/html/img/blocks-tile.png diff --git a/scripts/system/html/img/blocks-tile.png b/scripts/system/html/img/blocks-tile.png new file mode 100644 index 0000000000000000000000000000000000000000..49de535c1c2e908165b7902e562daef419cbc4a2 GIT binary patch literal 35130 zcmYhBV^k#!)TmF^WKVWYw(I03W3p}6WV=qbZB3qRHyJ0}w(G9<`|i5y{@DA+{=c8~ zY(y$4NFgJBM+5)>$UmjURR91800008fQJMC05;2{dH?_b!bL?&6i_=wcmeMIHY$Y7ytl(;3%!-0sx>4{1*@-4&|l*K*aP5gis9B17OaJ z!C78pLy!TKy$aYmdWDrqJXt(Wt>1s50ir3FZMm|#S4`dK_b~Wl8(S8=9a42N8!LW$ zT}5Kzer{#(K5g$}6jSoQ_~zx#dLH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j&tEMe6ytc@XdCBccoYMf!#4t@H~F^g9gl<5aCR o{q1#qt#$oA`fmDwZ(iX411`bCRp2?nk^lez07*qoM6N<$g8bu}z5oCK literal 0 HcmV?d00001 From 9cfc4dc91b7ff2651e300b7dbbcaf711dc11872a Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 26 Jul 2017 15:21:39 -0700 Subject: [PATCH 03/24] Can drag blocks zip folder into hifi and upload the .obj --- interface/src/Application.cpp | 18 ++++++- interface/src/Application.h | 3 ++ .../src/FileScriptingInterface.cpp | 50 +++++++++++-------- .../src/FileScriptingInterface.h | 2 +- scripts/system/html/js/marketplacesInject.js | 24 +++++++-- scripts/system/html/marketplaces.html | 36 ++++++++----- 6 files changed, 95 insertions(+), 38 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index dbb94cfdae..70ef794bfb 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -229,6 +229,9 @@ static const QString OBJ_EXTENSION = ".obj"; static const QString AVA_JSON_EXTENSION = ".ava.json"; static const QString WEB_VIEW_TAG = "noDownload=true"; +// temporary zip handling for Emily +static const QString ZIP_EXTENSION = ".zip"; + static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f; static const quint64 TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS = 1 * USECS_PER_SECOND; @@ -259,7 +262,10 @@ const QHash Application::_acceptedExtensi { AVA_JSON_EXTENSION, &Application::askToWearAvatarAttachmentUrl }, { JSON_EXTENSION, &Application::importJSONFromURL }, { JS_EXTENSION, &Application::askToLoadScript }, - { FST_EXTENSION, &Application::askToSetAvatarUrl } + { FST_EXTENSION, &Application::askToSetAvatarUrl }, + + // temporary zip handling for Emily + { ZIP_EXTENSION, &Application::importFromZIP } }; class DeadlockWatchdogThread : public QThread { @@ -2738,6 +2744,14 @@ bool Application::importSVOFromURL(const QString& urlString) { return true; } +// temporary zip handling for Emily, not set to auto-add +bool Application::importFromZIP(const QString& filePath) { + qDebug() << "A zip file has been dropped in: " << filePath; + QUrl empty = ""; + qApp->getFileDownloadInterface()->runUnzip(filePath, empty, false, true); + return true; +} + bool _renderRequested { false }; bool Application::event(QEvent* event) { @@ -6156,7 +6170,7 @@ void Application::addAssetToWorldFromURLRequestFinished() { if (tempFile.open(QIODevice::WriteOnly)) { tempFile.write(request->getData()); addAssetToWorldInfoClear(filename); // Remove message from list; next one added will have a different key. - qApp->getFileDownloadInterface()->runUnzip(downloadPath, url, true); + qApp->getFileDownloadInterface()->runUnzip(downloadPath, url, true, false); } else { QString errorInfo = "Couldn't open temporary file for download"; qWarning(interfaceapp) << errorInfo; diff --git a/interface/src/Application.h b/interface/src/Application.h index ce27c4a70a..e6ae970b61 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -478,6 +478,9 @@ private: bool importJSONFromURL(const QString& urlString); bool importSVOFromURL(const QString& urlString); + // temporary zip handling for Emily + bool importFromZIP(const QString& filePath); + bool nearbyEntitiesAreReadyForPhysics(); int processOctreeStats(ReceivedMessage& message, SharedNodePointer sendingNode); void trackIncomingOctreePacket(ReceivedMessage& message, SharedNodePointer sendingNode, bool wasStatsPacket); diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 30d0a3a201..7d8458598d 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -32,12 +32,19 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent // nothing for now } -void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd) { +void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isBlocks) { qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); qCDebug(scriptengine) << "Path where download is saved: " + path; QString fileName = "/" + path.section("/", -1); QString tempDir = path; - tempDir.remove(fileName); + if (!isBlocks) { + tempDir.remove(fileName); + } else { + QTemporaryDir blocks; + tempDir = blocks.path(); + path.remove("file:///"); + } + qCDebug(scriptengine) << "Temporary directory at: " + tempDir; if (!isTempDir(tempDir)) { qCDebug(scriptengine) << "Temporary directory mismatch; risk of losing files"; @@ -45,6 +52,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd) { } QString file = unzipFile(path, tempDir); + qCDebug(scriptengine) << "Unzipped file: " << file; QString filename = QUrl::fromLocalFile(file).toString(); if (file != "") { qCDebug(scriptengine) << "File to upload: " + filename; @@ -54,6 +62,26 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd) { emit unzipResult(path, filename, autoAdd); } +QString FileScriptingInterface::unzipFile(QString path, QString tempDir) { + + QDir dir(path); + QString dirName = dir.path(); + qCDebug(scriptengine) << "Directory to unzip: " << dirName; + QString target = tempDir + "/model_repo"; + QStringList list = JlCompress::extractDir(dirName, target); + + qCDebug(scriptengine) << list; + + if (!list.isEmpty()) { + return list.front(); + } + else { + qCDebug(scriptengine) << "Extraction failed"; + return ""; + } + +} + // fix to check that we are only referring to a temporary directory bool FileScriptingInterface::isTempDir(QString tempDir) { QString folderName = "/" + tempDir.section("/", -1); @@ -92,24 +120,6 @@ void FileScriptingInterface::downloadZip(QString path, const QString link) { request->send(); } -QString FileScriptingInterface::unzipFile(QString path, QString tempDir) { - - QDir dir(path); - QString dirName = dir.path(); - QString target = tempDir + "/model_repo"; - QStringList list = JlCompress::extractDir(dirName, target); - - qCDebug(scriptengine) << list; - - if (!list.isEmpty()) { - return list.front(); - } else { - qCDebug(scriptengine) << "Extraction failed"; - return ""; - } - -} - // this function is not in use void FileScriptingInterface::recursiveFileScan(QFileInfo file, QString* dirName) { /*if (!file.isDir()) { diff --git a/libraries/script-engine/src/FileScriptingInterface.h b/libraries/script-engine/src/FileScriptingInterface.h index 5e9a6029e8..dc5ffdace8 100644 --- a/libraries/script-engine/src/FileScriptingInterface.h +++ b/libraries/script-engine/src/FileScriptingInterface.h @@ -24,7 +24,7 @@ public: public slots: QString convertUrlToPath(QUrl url); - void runUnzip(QString path, QUrl url, bool autoAdd); + void runUnzip(QString path, QUrl url, bool autoAdd, bool isBlocks); QString getTempDir(); signals: diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 45b2e99018..0ee337a2ef 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -33,8 +33,8 @@ $("head").append( '' + ); + } + function updateClaraCode() { // Have to repeatedly update Clara page because its content can change dynamically without location.href changing. @@ -322,10 +335,12 @@ var DIRECTORY = 0; var HIFI = 1; - var CLARA = 2; + var BLOCKS = 2; + var CLARA = 3; var pageType = DIRECTORY; if (location.href.indexOf("highfidelity.com/") !== -1) { pageType = HIFI; } + if (location.href.indexOf("google.com/") !== -1) { pageType = BLOCKS; } if (location.href.indexOf("clara.io/") !== -1) { pageType = CLARA; } injectCommonCode(pageType === DIRECTORY); @@ -336,6 +351,9 @@ case HIFI: injectHiFiCode(); break; + case BLOCKS: + injectBlocksCode(); + break; case CLARA: injectClaraCode(); break; diff --git a/scripts/system/html/marketplaces.html b/scripts/system/html/marketplaces.html index 6051a9df96..8c5fe15429 100644 --- a/scripts/system/html/marketplaces.html +++ b/scripts/system/html/marketplaces.html @@ -30,19 +30,31 @@
-
-
- +
+
+
+ +
+
+

Blocks, released by Google, allows anyone to create 3D models using just a few simple tools. Browse through other users' creations for low-poly assets to add to your world.

+
+
-
-

Clara.io has thousands of models available for importing into High Fidelity. Follow these steps for the best experience:

-
    -
  1. Create an account here or log in as an existing user.
  2. -
  3. Choose a model from the list and click “Download to High Fidelity”.
  4. -
-
- -
+
+
+
+
+
+ +
+
+

Clara.io has thousands of models available for importing into High Fidelity. Follow these steps for the best experience:

+
    +
  1. Create an account here or log in as an existing user.
  2. +
  3. Choose a model from the list and click “Download to High Fidelity”.
  4. +
+
+
From acb088b263bf1027b6c11eaf02eea8bc4d8c6993 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 26 Jul 2017 16:58:23 -0700 Subject: [PATCH 04/24] Blocks drag does not work yet --- interface/src/Application.cpp | 23 +++++++++++++++---- interface/src/Application.h | 4 ++-- .../src/FileScriptingInterface.cpp | 21 +++++++++-------- .../src/FileScriptingInterface.h | 4 ++-- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 70ef794bfb..fe75242c2f 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6200,12 +6200,21 @@ void Application::addAssetToWorldUnzipFailure(QString filePath) { addAssetToWorldError(filename, "Couldn't unzip file " + filename + "."); } -void Application::addAssetToWorld(QString filePath) { +void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBlocks) { // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). + qCDebug(interfaceapp) << "File about to be uploaded: " << filePath; + qCDebug(interfaceapp) << "Original zip folder: " << zipFile; QString path = QUrl(filePath).toLocalFile(); QString filename = filenameFromPath(path); - QString mapping = "/" + filename; + QString mapping; + if (isBlocks) { + QString assetFolder = zipFile.section("/", -1); + assetFolder.remove(".zip"); + mapping = "/" + assetFolder + "/" + filename; + } else { + mapping = "/" + filename; + } // Test repeated because possibly different code paths. if (!DependencyManager::get()->getThisNodeCanWriteAssets()) { @@ -6576,15 +6585,19 @@ void Application::onAssetToWorldMessageBoxClosed() { } -void Application::handleUnzip(QString zipFile, QString unzipFile, bool autoAdd) { +void Application::handleUnzip(QString zipFile, QStringList unzipFile, bool autoAdd, bool isBlocks) { if (autoAdd) { if (!unzipFile.isEmpty()) { - addAssetToWorld(unzipFile); + qCDebug(interfaceapp) << "My folder contents: " << unzipFile; + for (int i = 0; i < unzipFile.length(); i++) { + qCDebug(interfaceapp) << "Preparing file for asset server: " << unzipFile.at(i); + addAssetToWorld(unzipFile.at(i), zipFile, isBlocks); + } } else { addAssetToWorldUnzipFailure(zipFile); } } else { - showAssetServerWidget(unzipFile); + showAssetServerWidget(unzipFile.first()); } } diff --git a/interface/src/Application.h b/interface/src/Application.h index e6ae970b61..54d4a9ef90 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -331,14 +331,14 @@ public slots: // FIXME: Move addAssetToWorld* methods to own class? void addAssetToWorldFromURL(QString url); void addAssetToWorldFromURLRequestFinished(); - void addAssetToWorld(QString filePath); + void addAssetToWorld(QString filePath, QString zipFile, bool isBlocks); void addAssetToWorldUnzipFailure(QString filePath); void addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy); void addAssetToWorldUpload(QString filePath, QString mapping); void addAssetToWorldSetMapping(QString filePath, QString mapping, QString hash); void addAssetToWorldAddEntity(QString filePath, QString mapping); - void handleUnzip(QString sourceFile, QString destinationFile, bool autoAdd); + void handleUnzip(QString sourceFile, QStringList destinationFile, bool autoAdd, bool isBlocks); FileScriptingInterface* getFileDownloadInterface() { return _fileDownload; } diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 7d8458598d..5ba2868365 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -51,18 +51,21 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool return; } - QString file = unzipFile(path, tempDir); - qCDebug(scriptengine) << "Unzipped file: " << file; - QString filename = QUrl::fromLocalFile(file).toString(); - if (file != "") { + QStringList fileList = unzipFile(path, tempDir); + qCDebug(scriptengine) << "Unzipped file list: " << fileList; + QString filename = QUrl::fromLocalFile(fileList.first()).toString(); + + if (filename != "") { qCDebug(scriptengine) << "File to upload: " + filename; - } else { + } + else { qCDebug(scriptengine) << "Unzip failed"; } - emit unzipResult(path, filename, autoAdd); + emit unzipResult(path, fileList, autoAdd, isBlocks); + } -QString FileScriptingInterface::unzipFile(QString path, QString tempDir) { +QStringList FileScriptingInterface::unzipFile(QString path, QString tempDir) { QDir dir(path); QString dirName = dir.path(); @@ -73,11 +76,11 @@ QString FileScriptingInterface::unzipFile(QString path, QString tempDir) { qCDebug(scriptengine) << list; if (!list.isEmpty()) { - return list.front(); + return list; } else { qCDebug(scriptengine) << "Extraction failed"; - return ""; + return list; } } diff --git a/libraries/script-engine/src/FileScriptingInterface.h b/libraries/script-engine/src/FileScriptingInterface.h index dc5ffdace8..806fa7fd9b 100644 --- a/libraries/script-engine/src/FileScriptingInterface.h +++ b/libraries/script-engine/src/FileScriptingInterface.h @@ -28,11 +28,11 @@ public slots: QString getTempDir(); signals: - void unzipResult(QString zipFile, QString unzipFile, bool autoAdd); + void unzipResult(QString zipFile, QStringList unzipFile, bool autoAdd, bool isBlocks); private: bool isTempDir(QString tempDir); - QString unzipFile(QString path, QString tempDir); + QStringList unzipFile(QString path, QString tempDir); void recursiveFileScan(QFileInfo file, QString* dirName); void downloadZip(QString path, const QString link); From bacd839d432fb525610319e856ebc07c9f604f62 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 26 Jul 2017 18:57:19 -0700 Subject: [PATCH 05/24] Drag zip folder works --- interface/src/Application.cpp | 36 +++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index fe75242c2f..d42453e191 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2748,7 +2748,7 @@ bool Application::importSVOFromURL(const QString& urlString) { bool Application::importFromZIP(const QString& filePath) { qDebug() << "A zip file has been dropped in: " << filePath; QUrl empty = ""; - qApp->getFileDownloadInterface()->runUnzip(filePath, empty, false, true); + qApp->getFileDownloadInterface()->runUnzip(filePath, empty, true, true); return true; } @@ -6203,6 +6203,38 @@ void Application::addAssetToWorldUnzipFailure(QString filePath) { void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBlocks) { // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). + qCDebug(interfaceapp) << "File about to be uploaded: " << filePath; + qCDebug(interfaceapp) << "Original zip folder: " << zipFile; + QString mapping; + QString path = filePath; + QString filename = filenameFromPath(filePath); + if (isBlocks) { + QString assetFolder = zipFile.section("/", -1); + assetFolder.remove(".zip"); + mapping = "/" + assetFolder + "/" + filenameFromPath(filename); + } + else { + path = QUrl(filePath).toLocalFile(); + filename = filenameFromPath(path); + mapping = "/" + filename; + } + + // Test repeated because possibly different code paths. + if (!DependencyManager::get()->getThisNodeCanWriteAssets()) { + QString errorInfo = "You do not have permissions to write to the Asset Server."; + qWarning(interfaceapp) << "Error downloading model: " + errorInfo; + addAssetToWorldError(filename, errorInfo); + return; + } + + addAssetToWorldInfo(filename, "Adding " + mapping.mid(1) + " to the Asset Server."); + + addAssetToWorldWithNewMapping(path, mapping, 0); +} + +/**void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBlocks) { + // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). + qCDebug(interfaceapp) << "File about to be uploaded: " << filePath; qCDebug(interfaceapp) << "Original zip folder: " << zipFile; QString path = QUrl(filePath).toLocalFile(); @@ -6227,7 +6259,7 @@ void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBloc addAssetToWorldInfo(filename, "Adding " + mapping.mid(1) + " to the Asset Server."); addAssetToWorldWithNewMapping(path, mapping, 0); -} +}*/ void Application::addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy) { auto request = DependencyManager::get()->createGetMappingRequest(mapping); From d4a7e9188a3dced093719f3ae05cab53c7bf63d8 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 27 Jul 2017 13:33:53 -0700 Subject: [PATCH 06/24] Removed extraneous print statements --- interface/src/Application.cpp | 38 +------------------ .../src/FileScriptingInterface.cpp | 1 - 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 941b6447ba..7b6b83fedd 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2744,7 +2744,7 @@ bool Application::importSVOFromURL(const QString& urlString) { return true; } -// temporary zip handling for Emily, not set to auto-add +// temporary zip handling for Emily bool Application::importFromZIP(const QString& filePath) { qDebug() << "A zip file has been dropped in: " << filePath; QUrl empty = ""; @@ -6208,9 +6208,6 @@ void Application::addAssetToWorldUnzipFailure(QString filePath) { void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBlocks) { // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). - - qCDebug(interfaceapp) << "File about to be uploaded: " << filePath; - qCDebug(interfaceapp) << "Original zip folder: " << zipFile; QString mapping; QString path = filePath; QString filename = filenameFromPath(filePath); @@ -6218,8 +6215,7 @@ void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBloc QString assetFolder = zipFile.section("/", -1); assetFolder.remove(".zip"); mapping = "/" + assetFolder + "/" + filenameFromPath(filename); - } - else { + } else { path = QUrl(filePath).toLocalFile(); filename = filenameFromPath(path); mapping = "/" + filename; @@ -6238,35 +6234,6 @@ void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBloc addAssetToWorldWithNewMapping(path, mapping, 0); } -/**void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBlocks) { - // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). - - qCDebug(interfaceapp) << "File about to be uploaded: " << filePath; - qCDebug(interfaceapp) << "Original zip folder: " << zipFile; - QString path = QUrl(filePath).toLocalFile(); - QString filename = filenameFromPath(path); - QString mapping; - if (isBlocks) { - QString assetFolder = zipFile.section("/", -1); - assetFolder.remove(".zip"); - mapping = "/" + assetFolder + "/" + filename; - } else { - mapping = "/" + filename; - } - - // Test repeated because possibly different code paths. - if (!DependencyManager::get()->getThisNodeCanWriteAssets()) { - QString errorInfo = "You do not have permissions to write to the Asset Server."; - qWarning(interfaceapp) << "Error downloading model: " + errorInfo; - addAssetToWorldError(filename, errorInfo); - return; - } - - addAssetToWorldInfo(filename, "Adding " + mapping.mid(1) + " to the Asset Server."); - - addAssetToWorldWithNewMapping(path, mapping, 0); -}*/ - void Application::addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy) { auto request = DependencyManager::get()->createGetMappingRequest(mapping); @@ -6626,7 +6593,6 @@ void Application::onAssetToWorldMessageBoxClosed() { void Application::handleUnzip(QString zipFile, QStringList unzipFile, bool autoAdd, bool isBlocks) { if (autoAdd) { if (!unzipFile.isEmpty()) { - qCDebug(interfaceapp) << "My folder contents: " << unzipFile; for (int i = 0; i < unzipFile.length(); i++) { qCDebug(interfaceapp) << "Preparing file for asset server: " << unzipFile.at(i); addAssetToWorld(unzipFile.at(i), zipFile, isBlocks); diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 5ba2868365..af1cf7994a 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -52,7 +52,6 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool } QStringList fileList = unzipFile(path, tempDir); - qCDebug(scriptengine) << "Unzipped file list: " << fileList; QString filename = QUrl::fromLocalFile(fileList.first()).toString(); if (filename != "") { From fcaebda04c3c1618e1ab587b099fb9e91350b1f9 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Fri, 28 Jul 2017 10:21:03 -0700 Subject: [PATCH 07/24] troubleshooting Blocks injection --- scripts/system/html/js/marketplacesInject.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 0ee337a2ef..0fbd9a778e 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -96,11 +96,13 @@ function injectBlocksCode() { // Make space for marketplaces footer in Blocks pages. - $("head").append( - '' + /*$("body").append( + '
' + + '' + + '
' + );*/ + $("body").append( + 'style= "bottom: 135px" ' ); } From 25d4d4dc93fb4c099833299edbec932d702ae7a5 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Fri, 28 Jul 2017 15:13:24 -0700 Subject: [PATCH 08/24] Clara download working again, still can drag in Blocks zip --- interface/src/Application.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 7c22e1bc55..3d784841d2 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6224,14 +6224,12 @@ void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBloc // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). QString mapping; QString path = filePath; - QString filename = filenameFromPath(filePath); + QString filename = filenameFromPath(path); if (isBlocks) { QString assetFolder = zipFile.section("/", -1); assetFolder.remove(".zip"); - mapping = "/" + assetFolder + "/" + filenameFromPath(filename); + mapping = "/" + assetFolder + "/" + filename; } else { - path = QUrl(filePath).toLocalFile(); - filename = filenameFromPath(path); mapping = "/" + filename; } From c03c1c80e12909e45238d22dd99f0200f50e53f7 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 2 Aug 2017 10:51:40 -0700 Subject: [PATCH 09/24] Drag zip cleaned up, marketplaces stylized, back button fixed --- interface/src/Application.cpp | 12 +++++----- interface/src/Application.h | 2 -- scripts/system/html/js/marketplacesInject.js | 16 +++++++++---- scripts/system/html/marketplaces.html | 24 +++++++++++--------- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 4a4b6423b9..467614c8a8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -229,8 +229,6 @@ static const QString FBX_EXTENSION = ".fbx"; static const QString OBJ_EXTENSION = ".obj"; static const QString AVA_JSON_EXTENSION = ".ava.json"; static const QString WEB_VIEW_TAG = "noDownload=true"; - -// temporary zip handling for Emily static const QString ZIP_EXTENSION = ".zip"; static const float MIRROR_FULLSCREEN_DISTANCE = 0.389f; @@ -264,8 +262,6 @@ const QHash Application::_acceptedExtensi { JSON_EXTENSION, &Application::importJSONFromURL }, { JS_EXTENSION, &Application::askToLoadScript }, { FST_EXTENSION, &Application::askToSetAvatarUrl }, - - // temporary zip handling for Emily { ZIP_EXTENSION, &Application::importFromZIP } }; @@ -2759,7 +2755,6 @@ bool Application::importSVOFromURL(const QString& urlString) { return true; } -// temporary zip handling for Emily bool Application::importFromZIP(const QString& filePath) { qDebug() << "A zip file has been dropped in: " << filePath; QUrl empty = ""; @@ -6315,7 +6310,12 @@ void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, Q qWarning(interfaceapp) << "Error downloading model: " + errorInfo; addAssetToWorldError(filenameFromPath(filePath), errorInfo); } else { - addAssetToWorldAddEntity(filePath, mapping); + // to prevent files that aren't models from being loaded into world automatically + if (filePath.endsWith(".obj") || filePath.endsWith(".fbx")) { + addAssetToWorldAddEntity(filePath, mapping); + } else { + addAssetToWorldInfoDone(filenameFromPath(filePath)); + } } request->deleteLater(); }); diff --git a/interface/src/Application.h b/interface/src/Application.h index 4f835d5525..9546c275dc 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -481,8 +481,6 @@ private: bool importJSONFromURL(const QString& urlString); bool importSVOFromURL(const QString& urlString); - - // temporary zip handling for Emily bool importFromZIP(const QString& filePath); bool nearbyEntitiesAreReadyForPhysics(); diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 0fbd9a778e..92fa869242 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -65,7 +65,10 @@ // Footer actions. $("#back-button").on("click", function () { - window.history.back(); + if (window.history.state != null) window.history.back(); + // to fix back button issue when in directory + //else window.location = "http://www.highfidelity.com/marketplace"; + else window.location = "https://metaverse.highfidelity.com/marketplace?"; }); $("#all-markets").on("click", function () { EventBridge.emitWebEvent(GOTO_DIRECTORY); @@ -79,9 +82,11 @@ letUsKnow.replaceWith(letUsKnow.html()); // Add button links. + + /* Blocks not yet implemented $('#exploreBlocksMarketplace').on('click', function () { window.location = "https://vr.google.com/objects"; - }); + });*/ $('#exploreClaraMarketplace').on('click', function () { window.location = "https://clara.io/library?gameCheck=true&public=true"; }); @@ -102,7 +107,7 @@ '
' );*/ $("body").append( - 'style= "bottom: 135px" ' + '

hello

' ); } @@ -345,6 +350,7 @@ if (location.href.indexOf("google.com/") !== -1) { pageType = BLOCKS; } if (location.href.indexOf("clara.io/") !== -1) { pageType = CLARA; } + //if (pageType != BLOCKS) injectCommonCode(pageType === DIRECTORY); switch (pageType) { case DIRECTORY: @@ -354,7 +360,9 @@ injectHiFiCode(); break; case BLOCKS: - injectBlocksCode(); + console.log("in Blocks"); + //injectBlocksCode(); + console.log("blocks injection"); break; case CLARA: injectClaraCode(); diff --git a/scripts/system/html/marketplaces.html b/scripts/system/html/marketplaces.html index 8c5fe15429..11c9e208ca 100644 --- a/scripts/system/html/marketplaces.html +++ b/scripts/system/html/marketplaces.html @@ -25,24 +25,26 @@

This is the default High Fidelity marketplace. Viewing and downloading content from here is fully supported in Interface.

-
- -
-
+
+ +
+
+
@@ -53,9 +55,9 @@
  • Create an account here or log in as an existing user.
  • Choose a model from the list and click “Download to High Fidelity”.
  • -
    - -
    +
    +
    +
    From 310a0eeecc54ab607e573506f618ba5008065eb8 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 2 Aug 2017 12:24:14 -0700 Subject: [PATCH 10/24] Renamed isBlocks to isZip, added debug print for non-entity files --- interface/src/Application.cpp | 9 +++++---- interface/src/Application.h | 4 ++-- libraries/script-engine/src/FileScriptingInterface.cpp | 6 +++--- libraries/script-engine/src/FileScriptingInterface.h | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 467614c8a8..c19635ef34 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6218,12 +6218,12 @@ void Application::addAssetToWorldUnzipFailure(QString filePath) { addAssetToWorldError(filename, "Couldn't unzip file " + filename + "."); } -void Application::addAssetToWorld(QString filePath, QString zipFile, bool isBlocks) { +void Application::addAssetToWorld(QString filePath, QString zipFile, bool isZip) { // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). QString mapping; QString path = filePath; QString filename = filenameFromPath(path); - if (isBlocks) { + if (isZip) { QString assetFolder = zipFile.section("/", -1); assetFolder.remove(".zip"); mapping = "/" + assetFolder + "/" + filename; @@ -6314,6 +6314,7 @@ void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, Q if (filePath.endsWith(".obj") || filePath.endsWith(".fbx")) { addAssetToWorldAddEntity(filePath, mapping); } else { + qCDebug(interfaceapp) << "Zipped contents are not valid entity files"; addAssetToWorldInfoDone(filenameFromPath(filePath)); } } @@ -6605,12 +6606,12 @@ void Application::onAssetToWorldMessageBoxClosed() { } -void Application::handleUnzip(QString zipFile, QStringList unzipFile, bool autoAdd, bool isBlocks) { +void Application::handleUnzip(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip) { if (autoAdd) { if (!unzipFile.isEmpty()) { for (int i = 0; i < unzipFile.length(); i++) { qCDebug(interfaceapp) << "Preparing file for asset server: " << unzipFile.at(i); - addAssetToWorld(unzipFile.at(i), zipFile, isBlocks); + addAssetToWorld(unzipFile.at(i), zipFile, isZip); } } else { addAssetToWorldUnzipFailure(zipFile); diff --git a/interface/src/Application.h b/interface/src/Application.h index 9546c275dc..975767d4fb 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -332,14 +332,14 @@ public slots: // FIXME: Move addAssetToWorld* methods to own class? void addAssetToWorldFromURL(QString url); void addAssetToWorldFromURLRequestFinished(); - void addAssetToWorld(QString filePath, QString zipFile, bool isBlocks); + void addAssetToWorld(QString filePath, QString zipFile, bool isZip); void addAssetToWorldUnzipFailure(QString filePath); void addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy); void addAssetToWorldUpload(QString filePath, QString mapping); void addAssetToWorldSetMapping(QString filePath, QString mapping, QString hash); void addAssetToWorldAddEntity(QString filePath, QString mapping); - void handleUnzip(QString sourceFile, QStringList destinationFile, bool autoAdd, bool isBlocks); + void handleUnzip(QString sourceFile, QStringList destinationFile, bool autoAdd, bool isZip); FileScriptingInterface* getFileDownloadInterface() { return _fileDownload; } diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index af1cf7994a..0baf3034e8 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -32,12 +32,12 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent // nothing for now } -void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isBlocks) { +void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip) { qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); qCDebug(scriptengine) << "Path where download is saved: " + path; QString fileName = "/" + path.section("/", -1); QString tempDir = path; - if (!isBlocks) { + if (!isZip) { tempDir.remove(fileName); } else { QTemporaryDir blocks; @@ -60,7 +60,7 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool else { qCDebug(scriptengine) << "Unzip failed"; } - emit unzipResult(path, fileList, autoAdd, isBlocks); + emit unzipResult(path, fileList, autoAdd, isZip); } diff --git a/libraries/script-engine/src/FileScriptingInterface.h b/libraries/script-engine/src/FileScriptingInterface.h index 806fa7fd9b..4069e7cc78 100644 --- a/libraries/script-engine/src/FileScriptingInterface.h +++ b/libraries/script-engine/src/FileScriptingInterface.h @@ -24,11 +24,11 @@ public: public slots: QString convertUrlToPath(QUrl url); - void runUnzip(QString path, QUrl url, bool autoAdd, bool isBlocks); + void runUnzip(QString path, QUrl url, bool autoAdd, bool isZip); QString getTempDir(); signals: - void unzipResult(QString zipFile, QStringList unzipFile, bool autoAdd, bool isBlocks); + void unzipResult(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip); private: bool isTempDir(QString tempDir); From d599753771c38df1d617e9e4c435c1bb979f837c Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Tue, 8 Aug 2017 18:43:35 -0700 Subject: [PATCH 11/24] Started blocks download catch, fixed a debug typo --- interface/src/Application.cpp | 19 ++++++++++------ .../src/FileScriptingInterface.cpp | 22 ++++++++++++++++--- .../src/FileScriptingInterface.h | 1 + scripts/system/html/js/marketplacesInject.js | 8 +++---- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index e5fb9949db..c887007fae 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2774,6 +2774,18 @@ bool Application::importSVOFromURL(const QString& urlString) { return true; } +bool Application::importFromZIP(const QString& filePath) { + qDebug() << "A zip file has been dropped in: " << filePath; + QUrl empty; + // handle Blocks download from Marketplace + if (filePath.contains("vr.google.com/downloads")) { + qApp->getFileDownloadInterface()->runUnzip("", filePath, true, true); + } else { + qApp->getFileDownloadInterface()->runUnzip(filePath, empty, true, true); + } + return true; +} + void Application::onPresent(quint32 frameCount) { if (shouldPaint()) { postEvent(this, new QEvent(static_cast(Idle)), Qt::HighEventPriority); @@ -2781,13 +2793,6 @@ void Application::onPresent(quint32 frameCount) { } } -bool Application::importFromZIP(const QString& filePath) { - qDebug() << "A zip file has been dropped in: " << filePath; - QUrl empty; - qApp->getFileDownloadInterface()->runUnzip(filePath, empty, true, true); - return true; -} - bool _renderRequested { false }; bool Application::event(QEvent* event) { diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 5eaaea86a9..ba1e9bcddf 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -34,6 +34,10 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip) { qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); + if ((url.toString()).contains("vr.google.com/downloads")) { + + path = downloadBlocksZip(url); + } qCDebug(scriptengine) << "Path where download is saved: " + path; QString fileName = "/" + path.section("/", -1); QString tempDir = path; @@ -52,10 +56,10 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool } QStringList fileList = unzipFile(path, tempDir); - QString filename = QUrl::fromLocalFile(fileList.first()).toString(); + //QString filename = QUrl::fromLocalFile(fileList.first()).toString(); - if (filename != "") { - qCDebug(scriptengine) << "File to upload: " + filename; + if (!fileList.isEmpty()) { + qCDebug(scriptengine) << "File to upload: " + fileList.first(); } else { qCDebug(scriptengine) << "Unzip failed"; @@ -111,6 +115,18 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) { return newUrl; } +// handles a download from Blocks in the marketplace +QString FileScriptingInterface::downloadBlocksZip(QUrl url) { + qCDebug(scriptengine) << "Made it to the download blocks! " << url.toString(); + + /*auto request = DependencyManager::get()->createResourceRequest(nullptr, url); + connect(request, &ResourceRequest::finished, this, [this, url] { + unzipFile(url, ""); // so intellisense isn't mad + }); + request->send();*/ + return url.toString(); +} + // this function is not in use void FileScriptingInterface::downloadZip(QString path, const QString link) { QUrl url = QUrl(link); diff --git a/libraries/script-engine/src/FileScriptingInterface.h b/libraries/script-engine/src/FileScriptingInterface.h index 4069e7cc78..c2b309ce43 100644 --- a/libraries/script-engine/src/FileScriptingInterface.h +++ b/libraries/script-engine/src/FileScriptingInterface.h @@ -34,6 +34,7 @@ private: bool isTempDir(QString tempDir); QStringList unzipFile(QString path, QString tempDir); void recursiveFileScan(QFileInfo file, QString* dirName); + QString downloadBlocksZip(QUrl url); void downloadZip(QString path, const QString link); }; diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 8902a5deee..ca9e4aa2b6 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -80,10 +80,9 @@ // Add button links. - /* Blocks not yet implemented $('#exploreBlocksMarketplace').on('click', function () { window.location = "https://vr.google.com/objects"; - });*/ + }); $('#exploreClaraMarketplace').on('click', function () { window.location = "https://clara.io/library?gameCheck=true&public=true"; }); @@ -157,7 +156,7 @@ // One file request at a time. if (isPreparing) { - console.log("WARNIKNG: Clara.io FBX: Prepare only one download at a time"); + console.log("WARNING: Clara.io FBX: Prepare only one download at a time"); return; } @@ -347,7 +346,6 @@ if (location.href.indexOf("google.com/") !== -1) { pageType = BLOCKS; } if (location.href.indexOf("clara.io/") !== -1) { pageType = CLARA; } - //if (pageType != BLOCKS) injectCommonCode(pageType === DIRECTORY); switch (pageType) { case DIRECTORY: @@ -358,7 +356,7 @@ break; case BLOCKS: console.log("in Blocks"); - //injectBlocksCode(); + injectBlocksCode(); console.log("blocks injection"); break; case CLARA: From 17acf0520d5e682f6d4d666deb5f050cf26511f2 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 9 Aug 2017 11:08:14 -0700 Subject: [PATCH 12/24] Download from blocks in marketplace working --- interface/src/Application.cpp | 25 ++++++++++++++++--- .../src/FileScriptingInterface.cpp | 4 +-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c887007fae..60b7477ac5 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2779,7 +2779,8 @@ bool Application::importFromZIP(const QString& filePath) { QUrl empty; // handle Blocks download from Marketplace if (filePath.contains("vr.google.com/downloads")) { - qApp->getFileDownloadInterface()->runUnzip("", filePath, true, true); + addAssetToWorldFromURL(filePath); + //qApp->getFileDownloadInterface()->runUnzip("", filePath, true, true); } else { qApp->getFileDownloadInterface()->runUnzip(filePath, empty, true, true); } @@ -6220,8 +6221,16 @@ void Application::showAssetServerWidget(QString filePath) { void Application::addAssetToWorldFromURL(QString url) { qInfo(interfaceapp) << "Download model and add to world from" << url; - - QString filename = url.section("filename=", 1, 1); // Filename is in "?filename=" parameter at end of URL. + + QString filename; + if (url.contains("filename")) { + filename = url.section("filename=", 1, 1); // Filename is in "?filename=" parameter at end of URL. + } + if (url.contains("vr.google.com/downloads")) { + QRegExp blocksName("\/.*\.zip"); + //filename = url.section(blocksName); + filename = "blocks"; + } if (!DependencyManager::get()->getThisNodeCanWriteAssets()) { QString errorInfo = "You do not have permissions to write to the Asset Server."; @@ -6242,7 +6251,15 @@ void Application::addAssetToWorldFromURLRequestFinished() { auto url = request->getUrl().toString(); auto result = request->getResult(); - QString filename = url.section("filename=", 1, 1); // Filename from trailing "?filename=" URL parameter. + QString filename; + if (url.contains("filename")) { + filename = url.section("filename=", 1, 1); // Filename is in "?filename=" parameter at end of URL. + } + if (url.contains("vr.google.com/downloads")) { + QRegExp blocksName("\/.*\.zip"); + //filename = url.section(blocksName); + filename = "blocks"; + } if (result == ResourceRequest::Success) { qInfo(interfaceapp) << "Downloaded model from" << url; diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index ba1e9bcddf..1a121f3059 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -34,10 +34,10 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip) { qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); - if ((url.toString()).contains("vr.google.com/downloads")) { + /*if ((url.toString()).contains("vr.google.com/downloads")) { path = downloadBlocksZip(url); - } + }*/ qCDebug(scriptengine) << "Path where download is saved: " + path; QString fileName = "/" + path.section("/", -1); QString tempDir = path; From 1ac9536f9572f93568ab7161df83a4c463d76348 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 9 Aug 2017 15:56:07 -0700 Subject: [PATCH 13/24] Downloading blocks from marketplace in own asset folder --- interface/src/Application.cpp | 29 +++++++++++-------- interface/src/Application.h | 4 +-- .../src/FileScriptingInterface.cpp | 28 +++++------------- .../src/FileScriptingInterface.h | 5 ++-- 4 files changed, 29 insertions(+), 37 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 60b7477ac5..efd6bd9f48 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2780,9 +2780,8 @@ bool Application::importFromZIP(const QString& filePath) { // handle Blocks download from Marketplace if (filePath.contains("vr.google.com/downloads")) { addAssetToWorldFromURL(filePath); - //qApp->getFileDownloadInterface()->runUnzip("", filePath, true, true); } else { - qApp->getFileDownloadInterface()->runUnzip(filePath, empty, true, true); + qApp->getFileDownloadInterface()->runUnzip(filePath, empty, true, true, false); } return true; } @@ -6227,9 +6226,8 @@ void Application::addAssetToWorldFromURL(QString url) { filename = url.section("filename=", 1, 1); // Filename is in "?filename=" parameter at end of URL. } if (url.contains("vr.google.com/downloads")) { - QRegExp blocksName("\/.*\.zip"); - //filename = url.section(blocksName); - filename = "blocks"; + filename = url.section('/', -1); + filename.remove(".zip?noDownload=false"); } if (!DependencyManager::get()->getThisNodeCanWriteAssets()) { @@ -6252,13 +6250,15 @@ void Application::addAssetToWorldFromURLRequestFinished() { auto result = request->getResult(); QString filename; + bool isBlocks = false; + if (url.contains("filename")) { filename = url.section("filename=", 1, 1); // Filename is in "?filename=" parameter at end of URL. } if (url.contains("vr.google.com/downloads")) { - QRegExp blocksName("\/.*\.zip"); - //filename = url.section(blocksName); - filename = "blocks"; + filename = url.section('/', -1); + filename.remove(".zip?noDownload=false"); + isBlocks = true; } if (result == ResourceRequest::Success) { @@ -6274,7 +6274,7 @@ void Application::addAssetToWorldFromURLRequestFinished() { if (tempFile.open(QIODevice::WriteOnly)) { tempFile.write(request->getData()); addAssetToWorldInfoClear(filename); // Remove message from list; next one added will have a different key. - qApp->getFileDownloadInterface()->runUnzip(downloadPath, url, true, false); + qApp->getFileDownloadInterface()->runUnzip(downloadPath, url, true, false, isBlocks); } else { QString errorInfo = "Couldn't open temporary file for download"; qWarning(interfaceapp) << errorInfo; @@ -6304,7 +6304,7 @@ void Application::addAssetToWorldUnzipFailure(QString filePath) { addAssetToWorldError(filename, "Couldn't unzip file " + filename + "."); } -void Application::addAssetToWorld(QString filePath, QString zipFile, bool isZip) { +void Application::addAssetToWorld(QString filePath, QString zipFile, bool isZip, bool isBlocks) { // Automatically upload and add asset to world as an alternative manual process initiated by showAssetServerWidget(). QString mapping; QString path = filePath; @@ -6313,6 +6313,11 @@ void Application::addAssetToWorld(QString filePath, QString zipFile, bool isZip) QString assetFolder = zipFile.section("/", -1); assetFolder.remove(".zip"); mapping = "/" + assetFolder + "/" + filename; + } else if (isBlocks) { + qCDebug(interfaceapp) << "Path to asset folder: " << zipFile; + QString assetFolder = zipFile.section('/', -1); + assetFolder.remove(".zip?noDownload=false"); + mapping = "/" + assetFolder + "/" + filename; } else { mapping = "/" + filename; } @@ -6692,12 +6697,12 @@ void Application::onAssetToWorldMessageBoxClosed() { } -void Application::handleUnzip(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip) { +void Application::handleUnzip(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip, bool isBlocks) { if (autoAdd) { if (!unzipFile.isEmpty()) { for (int i = 0; i < unzipFile.length(); i++) { qCDebug(interfaceapp) << "Preparing file for asset server: " << unzipFile.at(i); - addAssetToWorld(unzipFile.at(i), zipFile, isZip); + addAssetToWorld(unzipFile.at(i), zipFile, isZip, isBlocks); } } else { addAssetToWorldUnzipFailure(zipFile); diff --git a/interface/src/Application.h b/interface/src/Application.h index f8eb393f9e..516ea6ed3a 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -331,14 +331,14 @@ public slots: // FIXME: Move addAssetToWorld* methods to own class? void addAssetToWorldFromURL(QString url); void addAssetToWorldFromURLRequestFinished(); - void addAssetToWorld(QString filePath, QString zipFile, bool isZip); + void addAssetToWorld(QString filePath, QString zipFile, bool isZip, bool isBlocks); void addAssetToWorldUnzipFailure(QString filePath); void addAssetToWorldWithNewMapping(QString filePath, QString mapping, int copy); void addAssetToWorldUpload(QString filePath, QString mapping); void addAssetToWorldSetMapping(QString filePath, QString mapping, QString hash); void addAssetToWorldAddEntity(QString filePath, QString mapping); - void handleUnzip(QString sourceFile, QStringList destinationFile, bool autoAdd, bool isZip); + void handleUnzip(QString sourceFile, QStringList destinationFile, bool autoAdd, bool isZip, bool isBlocks); FileScriptingInterface* getFileDownloadInterface() { return _fileDownload; } diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 1a121f3059..681156973b 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -32,14 +32,11 @@ FileScriptingInterface::FileScriptingInterface(QObject* parent) : QObject(parent // nothing for now } -void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip) { +void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool isZip, bool isBlocks) { qCDebug(scriptengine) << "Url that was downloaded: " + url.toString(); - /*if ((url.toString()).contains("vr.google.com/downloads")) { - - path = downloadBlocksZip(url); - }*/ 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); @@ -60,11 +57,14 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool if (!fileList.isEmpty()) { qCDebug(scriptengine) << "File to upload: " + fileList.first(); - } - else { + } else { qCDebug(scriptengine) << "Unzip failed"; } - emit unzipResult(path, fileList, autoAdd, isZip); + + if (path.contains("vr.google.com/downloads")) { + isZip = true; + } + emit unzipResult(path, fileList, autoAdd, isZip, isBlocks); } @@ -115,18 +115,6 @@ QString FileScriptingInterface::convertUrlToPath(QUrl url) { return newUrl; } -// handles a download from Blocks in the marketplace -QString FileScriptingInterface::downloadBlocksZip(QUrl url) { - qCDebug(scriptengine) << "Made it to the download blocks! " << url.toString(); - - /*auto request = DependencyManager::get()->createResourceRequest(nullptr, url); - connect(request, &ResourceRequest::finished, this, [this, url] { - unzipFile(url, ""); // so intellisense isn't mad - }); - request->send();*/ - return url.toString(); -} - // this function is not in use void FileScriptingInterface::downloadZip(QString path, const QString link) { QUrl url = QUrl(link); diff --git a/libraries/script-engine/src/FileScriptingInterface.h b/libraries/script-engine/src/FileScriptingInterface.h index c2b309ce43..e4c27dbf7f 100644 --- a/libraries/script-engine/src/FileScriptingInterface.h +++ b/libraries/script-engine/src/FileScriptingInterface.h @@ -24,17 +24,16 @@ public: public slots: QString convertUrlToPath(QUrl url); - void runUnzip(QString path, QUrl url, bool autoAdd, bool isZip); + void runUnzip(QString path, QUrl url, bool autoAdd, bool isZip, bool isBlocks); QString getTempDir(); signals: - void unzipResult(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip); + void unzipResult(QString zipFile, QStringList unzipFile, bool autoAdd, bool isZip, bool isBlocks); private: bool isTempDir(QString tempDir); QStringList unzipFile(QString path, QString tempDir); void recursiveFileScan(QFileInfo file, QString* dirName); - QString downloadBlocksZip(QUrl url); void downloadZip(QString path, const QString link); }; From 74c90d632380c85fb24c4cd12b75a05ecf9b01b9 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 9 Aug 2017 16:08:47 -0700 Subject: [PATCH 14/24] minor typo --- scripts/system/html/js/marketplacesInject.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 179cefd205..9526bd051a 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -400,7 +400,8 @@ break; case CLARA: injectClaraCode(); - break; case BLOCKS: + break; + case BLOCKS: console.log("in Blocks"); injectBlocksCode(); console.log("blocks injection"); From 69a13052abaf305245bf8437b636eb90699aa598 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 9 Aug 2017 17:23:08 -0700 Subject: [PATCH 15/24] commented out blocks injection --- scripts/system/html/js/marketplacesInject.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 9526bd051a..644a1aa046 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -403,8 +403,9 @@ break; case BLOCKS: console.log("in Blocks"); - injectBlocksCode(); - console.log("blocks injection"); + //injectBlocksCode(); + //console.log("blocks injection"); + break; case HIFI_ITEM_PAGE: injectHiFiItemPageCode(); break; From d3c76c99c20ab8598dfea5ced9487b9920f95c2b Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Wed, 9 Aug 2017 17:28:05 -0700 Subject: [PATCH 16/24] See all markets button working again --- .../resources/qml/hifi/commerce/Checkout.qml | 17 +++++- scripts/system/html/js/marketplacesInject.js | 31 +++++++---- scripts/system/marketplaces/marketplaces.js | 52 +++++++++---------- 3 files changed, 61 insertions(+), 39 deletions(-) diff --git a/interface/resources/qml/hifi/commerce/Checkout.qml b/interface/resources/qml/hifi/commerce/Checkout.qml index 0b5d5978dd..48d5f5b1d5 100644 --- a/interface/resources/qml/hifi/commerce/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/Checkout.qml @@ -25,6 +25,7 @@ Rectangle { id: checkoutRoot; property string itemId; + property string itemHref; // Style color: hifi.colors.baseGray; Hifi.QmlCommerce { @@ -234,6 +235,7 @@ Rectangle { // "Cancel" button HifiControlsUit.Button { + id: cancelButton; color: hifi.buttons.black; colorScheme: hifi.colorSchemes.dark; anchors.top: parent.top; @@ -251,6 +253,8 @@ Rectangle { // "Buy" button HifiControlsUit.Button { + property bool buyFailed: false; + id: buyButton; color: hifi.buttons.black; colorScheme: hifi.colorSchemes.dark; anchors.top: parent.top; @@ -262,7 +266,11 @@ Rectangle { width: parent.width/2 - anchors.rightMargin*2; text: "Buy" onClicked: { - sendToScript({method: 'checkout_buyClicked', params: {success: commerce.buy(itemId, parseInt(itemPriceText.text))}}); + if (buyFailed) { + sendToScript({method: 'checkout_cancelClicked', params: itemId}); + } else { + sendToScript({method: 'checkout_buyClicked', success: commerce.buy(itemId, parseInt(itemPriceText.text)), itemId: itemId, itemHref: itemHref}); + } } } } @@ -293,6 +301,13 @@ Rectangle { itemNameText.text = message.params.itemName; itemAuthorText.text = message.params.itemAuthor; itemPriceText.text = message.params.itemPrice; + itemHref = message.params.itemHref; + buyButton.text = "Buy"; + buyButton.buyFailed = false; + break; + case 'buyFailed': + buyButton.text = "Buy Failed"; + buyButton.buyFailed = true; break; default: console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message)); diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index 644a1aa046..e078112360 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -93,24 +93,29 @@ }); } - function buyButtonClicked(id, name, author, price) { + function buyButtonClicked(id, name, author, price, href) { EventBridge.emitWebEvent(JSON.stringify({ type: "CHECKOUT", itemId: id, itemName: name, itemAuthor: author, - itemPrice: price + itemPrice: price, + itemHref: href })); } function injectBuyButtonOnMainPage() { - $('.grid-item').find('#price-or-edit').find('a').attr('href', '#'); + $('.grid-item').find('#price-or-edit').find('a').each(function() { + $(this).attr('data-href', $(this).attr('href')); + $(this).attr('href', '#'); + }); $('.grid-item').find('#price-or-edit').find('.price').text("BUY"); $('.grid-item').find('#price-or-edit').find('a').on('click', function () { buyButtonClicked($(this).closest('.grid-item').attr('data-item-id'), $(this).closest('.grid-item').find('.item-title').text(), $(this).closest('.grid-item').find('.creator').find('.value').text(), - 10); + 10, + $(this).attr('data-href')); }); } @@ -137,13 +142,15 @@ function injectHiFiItemPageCode() { if (confirmAllPurchases) { + var href = $('#side-info').find('.btn').attr('href'); $('#side-info').find('.btn').attr('href', '#'); $('#side-info').find('.btn').html('Buy Item '); $('#side-info').find('.btn').on('click', function () { buyButtonClicked(window.location.pathname.split("/")[3], $('#top-center').find('h1').text(), $('#creator').find('.value').text(), - 10); + 10, + href); }); } } @@ -415,16 +422,18 @@ function onLoad() { EventBridge.scriptEventReceived.connect(function (message) { - var parsedJsonMessage = JSON.parse(message); - if (message.slice(0, CAN_WRITE_ASSETS.length) === CAN_WRITE_ASSETS) { canWriteAssets = message.slice(-4) === "true"; } else if (message.slice(0, CLARA_IO_CANCEL_DOWNLOAD.length) === CLARA_IO_CANCEL_DOWNLOAD) { cancelClaraDownload(); - } else if (parsedJsonMessage.type === "marketplaces") { - if (parsedJsonMessage.action === "inspectionModeSetting") { - confirmAllPurchases = !!parsedJsonMessage.data; - injectCode(); + } else { + var parsedJsonMessage = JSON.parse(message); + + if (parsedJsonMessage.type === "marketplaces") { + if (parsedJsonMessage.action === "inspectionModeSetting") { + confirmAllPurchases = !!parsedJsonMessage.data; + injectCode(); + } } } }); diff --git a/scripts/system/marketplaces/marketplaces.js b/scripts/system/marketplaces/marketplaces.js index e29510b4c8..4dd7438ac2 100644 --- a/scripts/system/marketplaces/marketplaces.js +++ b/scripts/system/marketplaces/marketplaces.js @@ -101,31 +101,14 @@ Entities.canWriteAssetsChanged.connect(onCanWriteAssetsChanged); function onMessage(message) { - var parsedJsonMessage = JSON.parse(message); - if (parsedJsonMessage.type === "CHECKOUT") { - tablet.sendToQml({ method: 'updateCheckoutQML', params: parsedJsonMessage }); - tablet.pushOntoStack(MARKETPLACE_CHECKOUT_QML_PATH); - } else if (parsedJsonMessage.type === "REQUEST_SETTING") { - tablet.emitScriptEvent(JSON.stringify({ - type: "marketplaces", - action: "inspectionModeSetting", - data: Settings.getValue("inspectionMode", false) - })); - } if (message === GOTO_DIRECTORY) { tablet.gotoWebScreen(MARKETPLACES_URL, MARKETPLACES_INJECT_SCRIPT_URL); - } - - if (message === QUERY_CAN_WRITE_ASSETS) { + } else if (message === QUERY_CAN_WRITE_ASSETS) { tablet.emitScriptEvent(CAN_WRITE_ASSETS + " " + Entities.canWriteAssets()); - } - - if (message === WARN_USER_NO_PERMISSIONS) { + } else if (message === WARN_USER_NO_PERMISSIONS) { Window.alert(NO_PERMISSIONS_ERROR_MESSAGE); - } - - if (message.slice(0, CLARA_IO_STATUS.length) === CLARA_IO_STATUS) { + } else if (message.slice(0, CLARA_IO_STATUS.length) === CLARA_IO_STATUS) { if (isDownloadBeingCancelled) { return; } @@ -137,18 +120,26 @@ Window.updateMessageBox(messageBox, CLARA_DOWNLOAD_TITLE, text, CANCEL_BUTTON, NO_BUTTON); } return; - } - - if (message.slice(0, CLARA_IO_DOWNLOAD.length) === CLARA_IO_DOWNLOAD) { + } else if (message.slice(0, CLARA_IO_DOWNLOAD.length) === CLARA_IO_DOWNLOAD) { if (messageBox !== null) { Window.closeMessageBox(messageBox); messageBox = null; } return; - } - - if (message === CLARA_IO_CANCELLED_DOWNLOAD) { + } else if (message === CLARA_IO_CANCELLED_DOWNLOAD) { isDownloadBeingCancelled = false; + } else { + var parsedJsonMessage = JSON.parse(message); + if (parsedJsonMessage.type === "CHECKOUT") { + tablet.sendToQml({ method: 'updateCheckoutQML', params: parsedJsonMessage }); + tablet.pushOntoStack(MARKETPLACE_CHECKOUT_QML_PATH); + } else if (parsedJsonMessage.type === "REQUEST_SETTING") { + tablet.emitScriptEvent(JSON.stringify({ + type: "marketplaces", + action: "inspectionModeSetting", + data: Settings.getValue("inspectionMode", false) + })); + } } } @@ -207,7 +198,14 @@ //tablet.popFromStack(); break; case 'checkout_buyClicked': - print("fromQml: " + JSON.stringify(message)); + if (message.success === true) { + tablet.gotoWebScreen(message.itemHref); + Script.setTimeout(function () { + tablet.gotoWebScreen(MARKETPLACE_URL + '/items/' + message.itemId, MARKETPLACES_INJECT_SCRIPT_URL); + }, 100); + } else { + tablet.sendToQml({ method: 'buyFailed' }); + } //tablet.popFromStack(); break; default: From b0c91547b421fb634353c1b54131e5bab460c109 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 10 Aug 2017 14:14:09 -0700 Subject: [PATCH 17/24] Fixed WebGL rendering --- interface/src/main.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index a19055d4da..084e540ff4 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -216,7 +216,17 @@ int main(int argc, const char* argv[]) { SandboxUtils::runLocalSandbox(serverContentPath, true, noUpdater); } - Application app(argc, const_cast(argv), startupTime, runningMarkerExisted); + // to enable WebGL rendering + char* additionalCommandLineArg = (char*)"--ignore-gpu-blacklist"; + int newArgc = argc + 1; + char** newArgv = new char*[newArgc]; + for (int i = 0; i < argc; ++i) { + newArgv[i] = (char*)argv[i]; + } + newArgv[argc] = additionalCommandLineArg; + + Application app(newArgc, const_cast(newArgv), startupTime, runningMarkerExisted); + delete[] newArgv; // If we failed the OpenGLVersion check, log it. if (override) { From 28476960bb3d6560e941e260c99e2a9b91ca9f73 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 10 Aug 2017 14:23:45 -0700 Subject: [PATCH 18/24] Moved Blocks to tablet app --- scripts/defaultScripts.js | 1 + scripts/system/html/js/marketplacesInject.js | 28 +++----------------- scripts/system/html/marketplaces.html | 12 --------- scripts/system/marketplaces/blocksApp.js | 22 +++++++++++++++ 4 files changed, 26 insertions(+), 37 deletions(-) create mode 100644 scripts/system/marketplaces/blocksApp.js diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index 2270118861..bddb2ae703 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -24,6 +24,7 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/makeUserConnection.js", "system/tablet-goto.js", "system/marketplaces/marketplaces.js", + "system/marketplaces/blocksApp.js", // temporarily in default scripts for testing purposes "system/edit.js", "system/notifications.js", "system/dialTone.js", diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js index e078112360..dd239463d2 100644 --- a/scripts/system/html/js/marketplacesInject.js +++ b/scripts/system/html/js/marketplacesInject.js @@ -59,7 +59,7 @@ $("body").append( '
    ' + (!isInitialHiFiPage ? '' : '') + - (isInitialHiFiPage ? '🛈 Get items from Blocks and Clara.io!' : '') + + (isInitialHiFiPage ? '🛈 Get items from Clara.io!' : '') + (!isDirectoryPage ? '' : '') + (isDirectoryPage ? '🛈 Select a marketplace to explore.' : '') + '
    ' @@ -82,9 +82,6 @@ // Add button links. - $('#exploreBlocksMarketplace').on('click', function () { - window.location = "https://vr.google.com/objects"; - }); $('#exploreClaraMarketplace').on('click', function () { window.location = "https://clara.io/library?gameCheck=true&public=true"; }); @@ -155,18 +152,6 @@ } } - function injectBlocksCode() { - // Make space for marketplaces footer in Blocks pages. - /*$("body").append( - '
    ' + - '' + - '
    ' - );*/ - $("body").append( - '

    hello

    ' - ); - } - function updateClaraCode() { // Have to repeatedly update Clara page because its content can change dynamically without location.href changing. @@ -387,13 +372,11 @@ function injectCode() { var DIRECTORY = 0; var HIFI = 1; - var BLOCKS = 2; - var CLARA = 3; - var HIFI_ITEM_PAGE = 4; + var CLARA = 2; + var HIFI_ITEM_PAGE = 3; var pageType = DIRECTORY; if (location.href.indexOf("highfidelity.com/") !== -1) { pageType = HIFI; } - if (location.href.indexOf("google.com/") !== -1) { pageType = BLOCKS; } if (location.href.indexOf("clara.io/") !== -1) { pageType = CLARA; } if (location.href.indexOf("highfidelity.com/marketplace/items/") !== -1) { pageType = HIFI_ITEM_PAGE; } @@ -408,11 +391,6 @@ case CLARA: injectClaraCode(); break; - case BLOCKS: - console.log("in Blocks"); - //injectBlocksCode(); - //console.log("blocks injection"); - break; case HIFI_ITEM_PAGE: injectHiFiItemPageCode(); break; diff --git a/scripts/system/html/marketplaces.html b/scripts/system/html/marketplaces.html index 10184ae101..9e001c064f 100644 --- a/scripts/system/html/marketplaces.html +++ b/scripts/system/html/marketplaces.html @@ -31,18 +31,6 @@
    -
    -
    - -
    -
    -

    Blocks, released by Google, allows anyone to create 3D models using just a few simple tools. Browse through other users' creations for low-poly assets to add to your world.

    -
    -
    - -
    -
    -
    diff --git a/scripts/system/marketplaces/blocksApp.js b/scripts/system/marketplaces/blocksApp.js new file mode 100644 index 0000000000..46a102042e --- /dev/null +++ b/scripts/system/marketplaces/blocksApp.js @@ -0,0 +1,22 @@ +(function() { + var APP_NAME = "BLOCKS"; + var APP_URL = "https://vr.google.com/objects/"; + var APP_ICON = "https://hifi-content.s3.amazonaws.com/faye/gemstoneMagicMaker/gemstoneAppIcon.svg"; + + var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); + var button = tablet.addButton({ + icon: APP_ICON, + text: APP_NAME + }); + + function onClicked() { + tablet.gotoWebScreen(APP_URL); + } + button.clicked.connect(onClicked); + + function cleanup() { + tablet.removeButton(button); + } + + Script.scriptEnding.connect(cleanup); +}()); \ No newline at end of file From da5bb03187431111156690788e17ef848a6989d4 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 10 Aug 2017 16:34:37 -0700 Subject: [PATCH 19/24] Trying to add in a back button --- interface/resources/qml/hifi/tablet/TabletRoot.qml | 5 +++++ interface/resources/qml/hifi/tablet/WindowRoot.qml | 5 +++++ libraries/ui/src/ui/TabletScriptingInterface.cpp | 8 ++++++-- libraries/ui/src/ui/TabletScriptingInterface.h | 2 +- scripts/system/marketplaces/blocksApp.js | 4 ++-- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/TabletRoot.qml b/interface/resources/qml/hifi/tablet/TabletRoot.qml index c7df6ac64f..c89317c93c 100644 --- a/interface/resources/qml/hifi/tablet/TabletRoot.qml +++ b/interface/resources/qml/hifi/tablet/TabletRoot.qml @@ -93,6 +93,11 @@ Item { loader.source = ""; loader.source = "TabletWebView.qml"; } + + function loadTabletWebBase() { + loader.source = ""; + loader.source = "../../controls/TabletWebView.qml"; + } function returnToPreviousApp() { tabletApps.remove(currentApp); diff --git a/interface/resources/qml/hifi/tablet/WindowRoot.qml b/interface/resources/qml/hifi/tablet/WindowRoot.qml index fdfcfcf806..0858b46b40 100644 --- a/interface/resources/qml/hifi/tablet/WindowRoot.qml +++ b/interface/resources/qml/hifi/tablet/WindowRoot.qml @@ -42,6 +42,11 @@ Windows.ScrollingWindow { loader.source = "WindowWebView.qml"; } + function loadTabletWebBase() { + loader.source = ""; + loader.source = "../../controls/TabletWebView.qml"; + } + function loadWebUrl(url, injectedJavaScriptUrl) { loader.item.url = url; loader.item.scriptURL = injectedJavaScriptUrl; diff --git a/libraries/ui/src/ui/TabletScriptingInterface.cpp b/libraries/ui/src/ui/TabletScriptingInterface.cpp index 984d743ebf..1331b47590 100644 --- a/libraries/ui/src/ui/TabletScriptingInterface.cpp +++ b/libraries/ui/src/ui/TabletScriptingInterface.cpp @@ -604,7 +604,7 @@ void TabletProxy::loadWebScreenOnTop(const QVariant& url, const QString& injectJ _state = State::Web; } -void TabletProxy::gotoWebScreen(const QString& url, const QString& injectedJavaScriptUrl) { +void TabletProxy::gotoWebScreen(const QString& url, const QString& injectedJavaScriptUrl, bool loadOtherBase) { if (QThread::currentThread() != thread()) { QMetaObject::invokeMethod(this, "gotoWebScreen", Q_ARG(QString, url), Q_ARG(QString, injectedJavaScriptUrl)); return; @@ -619,7 +619,11 @@ void TabletProxy::gotoWebScreen(const QString& url, const QString& injectedJavaS if (root) { removeButtonsFromHomeScreen(); - QMetaObject::invokeMethod(root, "loadWebBase"); + if (loadOtherBase) { + QMetaObject::invokeMethod(root, "loadTabletWebBase"); + } else { + QMetaObject::invokeMethod(root, "loadWebBase"); + } QMetaObject::invokeMethod(root, "setShown", Q_ARG(const QVariant&, QVariant(true))); QMetaObject::invokeMethod(root, "loadWebUrl", Q_ARG(const QVariant&, QVariant(url)), Q_ARG(const QVariant&, QVariant(injectedJavaScriptUrl))); } diff --git a/libraries/ui/src/ui/TabletScriptingInterface.h b/libraries/ui/src/ui/TabletScriptingInterface.h index af38cb9351..822bae839e 100644 --- a/libraries/ui/src/ui/TabletScriptingInterface.h +++ b/libraries/ui/src/ui/TabletScriptingInterface.h @@ -122,7 +122,7 @@ public: * @param [injectedJavaScriptUrl] {string} optional url to an additional JS script to inject into the web page. */ Q_INVOKABLE void gotoWebScreen(const QString& url); - Q_INVOKABLE void gotoWebScreen(const QString& url, const QString& injectedJavaScriptUrl); + Q_INVOKABLE void gotoWebScreen(const QString& url, const QString& injectedJavaScriptUrl, bool loadOtherBase = false); Q_INVOKABLE void loadQMLSource(const QVariant& path); // FIXME: This currently relies on a script initializing the tablet (hence the bool denoting success); diff --git a/scripts/system/marketplaces/blocksApp.js b/scripts/system/marketplaces/blocksApp.js index 46a102042e..520b3657b9 100644 --- a/scripts/system/marketplaces/blocksApp.js +++ b/scripts/system/marketplaces/blocksApp.js @@ -10,7 +10,7 @@ }); function onClicked() { - tablet.gotoWebScreen(APP_URL); + tablet.gotoWebScreen(APP_URL, "", true); } button.clicked.connect(onClicked); @@ -19,4 +19,4 @@ } Script.scriptEnding.connect(cleanup); -}()); \ No newline at end of file +}()); From 6c2bf633929b86cd723c26ea9d411706782e9ce3 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 10 Aug 2017 17:51:19 -0700 Subject: [PATCH 20/24] Back button works --- interface/resources/qml/controls/TabletWebView.qml | 2 ++ interface/resources/qml/hifi/tablet/TabletRoot.qml | 3 +++ interface/resources/qml/hifi/tablet/WindowRoot.qml | 3 +++ libraries/ui/src/ui/TabletScriptingInterface.cpp | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/controls/TabletWebView.qml b/interface/resources/qml/controls/TabletWebView.qml index 0a5a68717e..59728c4157 100644 --- a/interface/resources/qml/controls/TabletWebView.qml +++ b/interface/resources/qml/controls/TabletWebView.qml @@ -24,6 +24,7 @@ Item { property alias webView: webview property alias profile: webview.profile property bool remove: false + property bool closeButtonVisible: true // Manage own browse history because WebEngineView history is wiped when a new URL is loaded via // onNewViewRequested, e.g., as happens when a social media share button is clicked. @@ -64,6 +65,7 @@ Item { disabledColor: hifi.colors.lightGrayText enabled: true text: "CLOSE" + visible: closeButtonVisible MouseArea { anchors.fill: parent diff --git a/interface/resources/qml/hifi/tablet/TabletRoot.qml b/interface/resources/qml/hifi/tablet/TabletRoot.qml index c89317c93c..bbf56c7827 100644 --- a/interface/resources/qml/hifi/tablet/TabletRoot.qml +++ b/interface/resources/qml/hifi/tablet/TabletRoot.qml @@ -126,6 +126,9 @@ Item { loader.item.url = url; loader.item.scriptURL = injectedJavaScriptUrl; tabletApps.append({"appUrl": "TabletWebView.qml", "isWebUrl": true, "scriptUrl": injectedJavaScriptUrl, "appWebUrl": url}); + if (loader.item.hasOwnProperty("closeButtonVisible")) { + loader.item.closeButtonVisible = false; + } } // used to send a message from qml to interface script. diff --git a/interface/resources/qml/hifi/tablet/WindowRoot.qml b/interface/resources/qml/hifi/tablet/WindowRoot.qml index 0858b46b40..8596007956 100644 --- a/interface/resources/qml/hifi/tablet/WindowRoot.qml +++ b/interface/resources/qml/hifi/tablet/WindowRoot.qml @@ -50,6 +50,9 @@ Windows.ScrollingWindow { function loadWebUrl(url, injectedJavaScriptUrl) { loader.item.url = url; loader.item.scriptURL = injectedJavaScriptUrl; + if (loader.item.hasOwnProperty("closeButtonVisible")) { + loader.item.closeButtonVisible = false; + } } // used to send a message from qml to interface script. diff --git a/libraries/ui/src/ui/TabletScriptingInterface.cpp b/libraries/ui/src/ui/TabletScriptingInterface.cpp index 1331b47590..adff219e0f 100644 --- a/libraries/ui/src/ui/TabletScriptingInterface.cpp +++ b/libraries/ui/src/ui/TabletScriptingInterface.cpp @@ -606,7 +606,7 @@ void TabletProxy::loadWebScreenOnTop(const QVariant& url, const QString& injectJ void TabletProxy::gotoWebScreen(const QString& url, const QString& injectedJavaScriptUrl, bool loadOtherBase) { if (QThread::currentThread() != thread()) { - QMetaObject::invokeMethod(this, "gotoWebScreen", Q_ARG(QString, url), Q_ARG(QString, injectedJavaScriptUrl)); + QMetaObject::invokeMethod(this, "gotoWebScreen", Q_ARG(QString, url), Q_ARG(QString, injectedJavaScriptUrl), Q_ARG(bool, loadOtherBase)); return; } From 072f3dfb03a203ac546acf631f5bdb484d1213c0 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Tue, 15 Aug 2017 10:25:14 -0700 Subject: [PATCH 21/24] removed commented out code, removed blocks from default scripts --- libraries/script-engine/src/FileScriptingInterface.cpp | 1 - scripts/defaultScripts.js | 1 - 2 files changed, 2 deletions(-) diff --git a/libraries/script-engine/src/FileScriptingInterface.cpp b/libraries/script-engine/src/FileScriptingInterface.cpp index 681156973b..68a141ad97 100644 --- a/libraries/script-engine/src/FileScriptingInterface.cpp +++ b/libraries/script-engine/src/FileScriptingInterface.cpp @@ -53,7 +53,6 @@ void FileScriptingInterface::runUnzip(QString path, QUrl url, bool autoAdd, bool } QStringList fileList = unzipFile(path, tempDir); - //QString filename = QUrl::fromLocalFile(fileList.first()).toString(); if (!fileList.isEmpty()) { qCDebug(scriptengine) << "File to upload: " + fileList.first(); diff --git a/scripts/defaultScripts.js b/scripts/defaultScripts.js index bddb2ae703..2270118861 100644 --- a/scripts/defaultScripts.js +++ b/scripts/defaultScripts.js @@ -24,7 +24,6 @@ var DEFAULT_SCRIPTS_COMBINED = [ "system/makeUserConnection.js", "system/tablet-goto.js", "system/marketplaces/marketplaces.js", - "system/marketplaces/blocksApp.js", // temporarily in default scripts for testing purposes "system/edit.js", "system/notifications.js", "system/dialTone.js", From 4b1498f7270df125154813f9ccf41c3310d30b76 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 17 Aug 2017 10:18:29 -0700 Subject: [PATCH 22/24] moved blocksApp.js to unpublished scripts, added icon --- .../marketplace/blocks}/blocksApp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {scripts/system/marketplaces => unpublishedScripts/marketplace/blocks}/blocksApp.js (81%) diff --git a/scripts/system/marketplaces/blocksApp.js b/unpublishedScripts/marketplace/blocks/blocksApp.js similarity index 81% rename from scripts/system/marketplaces/blocksApp.js rename to unpublishedScripts/marketplace/blocks/blocksApp.js index 520b3657b9..6a48cdc101 100644 --- a/scripts/system/marketplaces/blocksApp.js +++ b/unpublishedScripts/marketplace/blocks/blocksApp.js @@ -1,7 +1,7 @@ (function() { var APP_NAME = "BLOCKS"; var APP_URL = "https://vr.google.com/objects/"; - var APP_ICON = "https://hifi-content.s3.amazonaws.com/faye/gemstoneMagicMaker/gemstoneAppIcon.svg"; + var APP_ICON = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/blocks-i.svg"; var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var button = tablet.addButton({ From 4c28b9f09a5550c722fad1304014e00623765197 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Thu, 17 Aug 2017 18:16:41 -0700 Subject: [PATCH 23/24] attempt to check version of interface --- .../scripting/WindowScriptingInterface.cpp | 4 ++++ .../src/scripting/WindowScriptingInterface.h | 1 + .../marketplace/blocks/blocksApp.js | 23 ++++++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index 277989439c..4cfa68b0f5 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -264,6 +264,10 @@ void WindowScriptingInterface::showAssetServer(const QString& upload) { QMetaObject::invokeMethod(qApp, "showAssetServerWidget", Qt::QueuedConnection, Q_ARG(QString, upload)); } +int WindowScriptingInterface::checkVersion() { + return QCoreApplication::applicationVersion().toInt(); +} + int WindowScriptingInterface::getInnerWidth() { return qApp->getWindow()->geometry().width(); } diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 28f1bafa5d..0e1f156b27 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -58,6 +58,7 @@ public slots: QScriptValue save(const QString& title = "", const QString& directory = "", const QString& nameFilter = ""); QScriptValue browseAssets(const QString& title = "", const QString& directory = "", const QString& nameFilter = ""); void showAssetServer(const QString& upload = ""); + int checkVersion(); void copyToClipboard(const QString& text); void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f); void takeSecondaryCameraSnapshot(); diff --git a/unpublishedScripts/marketplace/blocks/blocksApp.js b/unpublishedScripts/marketplace/blocks/blocksApp.js index 6a48cdc101..f8994d5c3d 100644 --- a/unpublishedScripts/marketplace/blocks/blocksApp.js +++ b/unpublishedScripts/marketplace/blocks/blocksApp.js @@ -1,8 +1,29 @@ -(function() { +/// +/// blocksApp.js +/// A tablet app for downloading 3D assets from Google Blocks +/// +/// Author: Elisa Lupin-Jimenez +/// Copyright High Fidelity 2017 +/// +/// Licensed under the Apache 2.0 License +/// See accompanying license file or http://apache.org/ +/// +/// All assets are under CC Attribution Non-Commerical +/// http://creativecommons.org/licenses/ +/// + +(function () { var APP_NAME = "BLOCKS"; var APP_URL = "https://vr.google.com/objects/"; var APP_ICON = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/blocks-i.svg"; + try { + print("Current Interface version: " + Script.checkVersion()); + } catch(err) { + print("Outdated Interface version does not support Blocks"); + APP_URL = null; + } + var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var button = tablet.addButton({ icon: APP_ICON, From 65f876acf3274816f8b9baf46996752fae9a9d16 Mon Sep 17 00:00:00 2001 From: Elisa Lupin-Jimenez Date: Fri, 18 Aug 2017 10:49:40 -0700 Subject: [PATCH 24/24] enabled version check --- interface/src/scripting/WindowScriptingInterface.cpp | 4 ++-- interface/src/scripting/WindowScriptingInterface.h | 2 +- unpublishedScripts/marketplace/blocks/blocksApp.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/src/scripting/WindowScriptingInterface.cpp b/interface/src/scripting/WindowScriptingInterface.cpp index 4cfa68b0f5..f63c128cf5 100644 --- a/interface/src/scripting/WindowScriptingInterface.cpp +++ b/interface/src/scripting/WindowScriptingInterface.cpp @@ -264,8 +264,8 @@ void WindowScriptingInterface::showAssetServer(const QString& upload) { QMetaObject::invokeMethod(qApp, "showAssetServerWidget", Qt::QueuedConnection, Q_ARG(QString, upload)); } -int WindowScriptingInterface::checkVersion() { - return QCoreApplication::applicationVersion().toInt(); +QString WindowScriptingInterface::checkVersion() { + return QCoreApplication::applicationVersion(); } int WindowScriptingInterface::getInnerWidth() { diff --git a/interface/src/scripting/WindowScriptingInterface.h b/interface/src/scripting/WindowScriptingInterface.h index 0e1f156b27..4b5e2e81fc 100644 --- a/interface/src/scripting/WindowScriptingInterface.h +++ b/interface/src/scripting/WindowScriptingInterface.h @@ -58,7 +58,7 @@ public slots: QScriptValue save(const QString& title = "", const QString& directory = "", const QString& nameFilter = ""); QScriptValue browseAssets(const QString& title = "", const QString& directory = "", const QString& nameFilter = ""); void showAssetServer(const QString& upload = ""); - int checkVersion(); + QString checkVersion(); void copyToClipboard(const QString& text); void takeSnapshot(bool notify = true, bool includeAnimated = false, float aspectRatio = 0.0f); void takeSecondaryCameraSnapshot(); diff --git a/unpublishedScripts/marketplace/blocks/blocksApp.js b/unpublishedScripts/marketplace/blocks/blocksApp.js index f8994d5c3d..2c20e13005 100644 --- a/unpublishedScripts/marketplace/blocks/blocksApp.js +++ b/unpublishedScripts/marketplace/blocks/blocksApp.js @@ -18,10 +18,10 @@ var APP_ICON = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/blocks-i.svg"; try { - print("Current Interface version: " + Script.checkVersion()); + print("Current Interface version: " + Window.checkVersion()); } catch(err) { print("Outdated Interface version does not support Blocks"); - APP_URL = null; + APP_URL = "https://hifi-content.s3.amazonaws.com/elisalj/blocks/updateToBlocks.html"; } var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");