From 384a6a8154fb6841012e528d1079208a344859a0 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Wed, 21 Oct 2015 11:36:49 -0700 Subject: [PATCH 1/5] rename /toys to /toybox, remove non toybox scripts, update master refs --- .../{toys => entityScripts}/breakdanceCore.js | 1 - .../{toys => entityScripts}/breakdanceToy.js | 0 examples/{toys => entityScripts}/grenade.js | 0 examples/{toys => entityScripts}/magBalls.js | 8 ++++---- .../magBalls/constants.js | 0 .../magBalls/debugUtils.js | 0 .../magBalls/edgeSpring.js | 0 .../{toys => entityScripts}/magBalls/graph.js | 0 .../magBalls/magBalls.js | 0 .../AC_scripts/flickeringLight.js | 0 .../AC_scripts/originalPositionResetter.js | 0 .../AC_scripts/toybox_sounds.js | 0 .../{toys => toybox}/basketball/createHoop.js | 0 .../{toys => toybox}/basketball/createRack.js | 0 .../basketball/createSingleBasketball.js | 0 .../blockers/createTestBlocks.js | 0 .../{toys => toybox}/bubblewand/createWand.js | 0 examples/{toys => toybox}/bubblewand/wand.js | 0 examples/{toys => toybox/cat}/cat.js | 0 examples/{toys => toybox}/doll/createDoll.js | 0 examples/{toys => toybox}/doll/doll.js | 0 .../flashlight/createFlashlight.js | 0 .../{toys => toybox}/flashlight/flashlight.js | 0 examples/{toys => toybox/lights}/lightSwitch.js | 2 +- .../ping_pong_gun/createPingPongGun.js | 0 .../ping_pong_gun/createTargets.js | 0 .../ping_pong_gun/pingPongGun.js | 0 .../ping_pong_gun/wallTarget.js | 0 .../spray_paint}/sprayPaintCan.js | 2 +- unpublishedScripts/hiddenEntityReset.js | 17 +++++++++-------- unpublishedScripts/masterReset.js | 16 ++++++++-------- 31 files changed, 23 insertions(+), 23 deletions(-) rename examples/{toys => entityScripts}/breakdanceCore.js (99%) rename examples/{toys => entityScripts}/breakdanceToy.js (100%) rename examples/{toys => entityScripts}/grenade.js (100%) rename examples/{toys => entityScripts}/magBalls.js (97%) rename examples/{toys => entityScripts}/magBalls/constants.js (100%) rename examples/{toys => entityScripts}/magBalls/debugUtils.js (100%) rename examples/{toys => entityScripts}/magBalls/edgeSpring.js (100%) rename examples/{toys => entityScripts}/magBalls/graph.js (100%) rename examples/{toys => entityScripts}/magBalls/magBalls.js (100%) rename examples/{toys => toybox}/AC_scripts/flickeringLight.js (100%) rename examples/{toys => toybox}/AC_scripts/originalPositionResetter.js (100%) rename examples/{toys => toybox}/AC_scripts/toybox_sounds.js (100%) rename examples/{toys => toybox}/basketball/createHoop.js (100%) rename examples/{toys => toybox}/basketball/createRack.js (100%) rename examples/{toys => toybox}/basketball/createSingleBasketball.js (100%) rename examples/{toys => toybox}/blockers/createTestBlocks.js (100%) rename examples/{toys => toybox}/bubblewand/createWand.js (100%) rename examples/{toys => toybox}/bubblewand/wand.js (100%) rename examples/{toys => toybox/cat}/cat.js (100%) rename examples/{toys => toybox}/doll/createDoll.js (100%) rename examples/{toys => toybox}/doll/doll.js (100%) rename examples/{toys => toybox}/flashlight/createFlashlight.js (100%) rename examples/{toys => toybox}/flashlight/flashlight.js (100%) rename examples/{toys => toybox/lights}/lightSwitch.js (97%) rename examples/{toys => toybox}/ping_pong_gun/createPingPongGun.js (100%) rename examples/{toys => toybox}/ping_pong_gun/createTargets.js (100%) rename examples/{toys => toybox}/ping_pong_gun/pingPongGun.js (100%) rename examples/{toys => toybox}/ping_pong_gun/wallTarget.js (100%) rename examples/{toys => toybox/spray_paint}/sprayPaintCan.js (98%) diff --git a/examples/toys/breakdanceCore.js b/examples/entityScripts/breakdanceCore.js similarity index 99% rename from examples/toys/breakdanceCore.js rename to examples/entityScripts/breakdanceCore.js index 655e55dfc6..0220962ec8 100644 --- a/examples/toys/breakdanceCore.js +++ b/examples/entityScripts/breakdanceCore.js @@ -1,6 +1,5 @@ // // breakdanceCore.js -// examples/toys // // This is the core breakdance game library, it can be used as part of an entity script, or an omniTool module, or bootstapped on it's own // Created by Brad Hefta-Gaub on August 24, 2015 diff --git a/examples/toys/breakdanceToy.js b/examples/entityScripts/breakdanceToy.js similarity index 100% rename from examples/toys/breakdanceToy.js rename to examples/entityScripts/breakdanceToy.js diff --git a/examples/toys/grenade.js b/examples/entityScripts/grenade.js similarity index 100% rename from examples/toys/grenade.js rename to examples/entityScripts/grenade.js diff --git a/examples/toys/magBalls.js b/examples/entityScripts/magBalls.js similarity index 97% rename from examples/toys/magBalls.js rename to examples/entityScripts/magBalls.js index e163aa5ffd..721e174676 100644 --- a/examples/toys/magBalls.js +++ b/examples/entityScripts/magBalls.js @@ -7,10 +7,10 @@ // // FIXME Script paths have to be relative to the caller, in this case libraries/OmniTool.js -Script.include("../toys/magBalls/constants.js"); -Script.include("../toys/magBalls/graph.js"); -Script.include("../toys/magBalls/edgeSpring.js"); -Script.include("../toys/magBalls/magBalls.js"); +Script.include("../entityScripts/magBalls/constants.js"); +Script.include("../entityScripts/magBalls/graph.js"); +Script.include("../entityScripts/magBalls/edgeSpring.js"); +Script.include("../entityScripts/magBalls/magBalls.js"); Script.include("avatarRelativeOverlays.js"); OmniToolModuleType = "MagBallsController" diff --git a/examples/toys/magBalls/constants.js b/examples/entityScripts/magBalls/constants.js similarity index 100% rename from examples/toys/magBalls/constants.js rename to examples/entityScripts/magBalls/constants.js diff --git a/examples/toys/magBalls/debugUtils.js b/examples/entityScripts/magBalls/debugUtils.js similarity index 100% rename from examples/toys/magBalls/debugUtils.js rename to examples/entityScripts/magBalls/debugUtils.js diff --git a/examples/toys/magBalls/edgeSpring.js b/examples/entityScripts/magBalls/edgeSpring.js similarity index 100% rename from examples/toys/magBalls/edgeSpring.js rename to examples/entityScripts/magBalls/edgeSpring.js diff --git a/examples/toys/magBalls/graph.js b/examples/entityScripts/magBalls/graph.js similarity index 100% rename from examples/toys/magBalls/graph.js rename to examples/entityScripts/magBalls/graph.js diff --git a/examples/toys/magBalls/magBalls.js b/examples/entityScripts/magBalls/magBalls.js similarity index 100% rename from examples/toys/magBalls/magBalls.js rename to examples/entityScripts/magBalls/magBalls.js diff --git a/examples/toys/AC_scripts/flickeringLight.js b/examples/toybox/AC_scripts/flickeringLight.js similarity index 100% rename from examples/toys/AC_scripts/flickeringLight.js rename to examples/toybox/AC_scripts/flickeringLight.js diff --git a/examples/toys/AC_scripts/originalPositionResetter.js b/examples/toybox/AC_scripts/originalPositionResetter.js similarity index 100% rename from examples/toys/AC_scripts/originalPositionResetter.js rename to examples/toybox/AC_scripts/originalPositionResetter.js diff --git a/examples/toys/AC_scripts/toybox_sounds.js b/examples/toybox/AC_scripts/toybox_sounds.js similarity index 100% rename from examples/toys/AC_scripts/toybox_sounds.js rename to examples/toybox/AC_scripts/toybox_sounds.js diff --git a/examples/toys/basketball/createHoop.js b/examples/toybox/basketball/createHoop.js similarity index 100% rename from examples/toys/basketball/createHoop.js rename to examples/toybox/basketball/createHoop.js diff --git a/examples/toys/basketball/createRack.js b/examples/toybox/basketball/createRack.js similarity index 100% rename from examples/toys/basketball/createRack.js rename to examples/toybox/basketball/createRack.js diff --git a/examples/toys/basketball/createSingleBasketball.js b/examples/toybox/basketball/createSingleBasketball.js similarity index 100% rename from examples/toys/basketball/createSingleBasketball.js rename to examples/toybox/basketball/createSingleBasketball.js diff --git a/examples/toys/blockers/createTestBlocks.js b/examples/toybox/blockers/createTestBlocks.js similarity index 100% rename from examples/toys/blockers/createTestBlocks.js rename to examples/toybox/blockers/createTestBlocks.js diff --git a/examples/toys/bubblewand/createWand.js b/examples/toybox/bubblewand/createWand.js similarity index 100% rename from examples/toys/bubblewand/createWand.js rename to examples/toybox/bubblewand/createWand.js diff --git a/examples/toys/bubblewand/wand.js b/examples/toybox/bubblewand/wand.js similarity index 100% rename from examples/toys/bubblewand/wand.js rename to examples/toybox/bubblewand/wand.js diff --git a/examples/toys/cat.js b/examples/toybox/cat/cat.js similarity index 100% rename from examples/toys/cat.js rename to examples/toybox/cat/cat.js diff --git a/examples/toys/doll/createDoll.js b/examples/toybox/doll/createDoll.js similarity index 100% rename from examples/toys/doll/createDoll.js rename to examples/toybox/doll/createDoll.js diff --git a/examples/toys/doll/doll.js b/examples/toybox/doll/doll.js similarity index 100% rename from examples/toys/doll/doll.js rename to examples/toybox/doll/doll.js diff --git a/examples/toys/flashlight/createFlashlight.js b/examples/toybox/flashlight/createFlashlight.js similarity index 100% rename from examples/toys/flashlight/createFlashlight.js rename to examples/toybox/flashlight/createFlashlight.js diff --git a/examples/toys/flashlight/flashlight.js b/examples/toybox/flashlight/flashlight.js similarity index 100% rename from examples/toys/flashlight/flashlight.js rename to examples/toybox/flashlight/flashlight.js diff --git a/examples/toys/lightSwitch.js b/examples/toybox/lights/lightSwitch.js similarity index 97% rename from examples/toys/lightSwitch.js rename to examples/toybox/lights/lightSwitch.js index 5c47108c94..fbd314a9af 100644 --- a/examples/toys/lightSwitch.js +++ b/examples/toybox/lights/lightSwitch.js @@ -17,7 +17,7 @@ (function () { var _this; - var utilitiesScript = Script.resolvePath("../libraries/utils.js"); + var utilitiesScript = Script.resolvePath("../../libraries/utils.js"); Script.include(utilitiesScript); LightSwitch = function () { _this = this; diff --git a/examples/toys/ping_pong_gun/createPingPongGun.js b/examples/toybox/ping_pong_gun/createPingPongGun.js similarity index 100% rename from examples/toys/ping_pong_gun/createPingPongGun.js rename to examples/toybox/ping_pong_gun/createPingPongGun.js diff --git a/examples/toys/ping_pong_gun/createTargets.js b/examples/toybox/ping_pong_gun/createTargets.js similarity index 100% rename from examples/toys/ping_pong_gun/createTargets.js rename to examples/toybox/ping_pong_gun/createTargets.js diff --git a/examples/toys/ping_pong_gun/pingPongGun.js b/examples/toybox/ping_pong_gun/pingPongGun.js similarity index 100% rename from examples/toys/ping_pong_gun/pingPongGun.js rename to examples/toybox/ping_pong_gun/pingPongGun.js diff --git a/examples/toys/ping_pong_gun/wallTarget.js b/examples/toybox/ping_pong_gun/wallTarget.js similarity index 100% rename from examples/toys/ping_pong_gun/wallTarget.js rename to examples/toybox/ping_pong_gun/wallTarget.js diff --git a/examples/toys/sprayPaintCan.js b/examples/toybox/spray_paint/sprayPaintCan.js similarity index 98% rename from examples/toys/sprayPaintCan.js rename to examples/toybox/spray_paint/sprayPaintCan.js index 1532ff19f3..4e6719af76 100644 --- a/examples/toys/sprayPaintCan.js +++ b/examples/toybox/spray_paint/sprayPaintCan.js @@ -13,7 +13,7 @@ // Script.include("../libraries/utils.js"); //Need absolute path for now, for testing before PR merge and s3 cloning. Will change post-merge - Script.include("../libraries/utils.js"); + Script.include("../../libraries/utils.js"); this.spraySound = SoundCache.getSound("https://s3.amazonaws.com/hifi-public/sounds/sprayPaintSound.wav"); diff --git a/unpublishedScripts/hiddenEntityReset.js b/unpublishedScripts/hiddenEntityReset.js index 19a7a5ee5e..e441db3aa6 100644 --- a/unpublishedScripts/hiddenEntityReset.js +++ b/unpublishedScripts/hiddenEntityReset.js @@ -14,14 +14,15 @@ var _this; - var sprayPaintScriptURL = Script.resolvePath("../examples/toys/sprayPaintCan.js"); - var catScriptURL = Script.resolvePath("../examples/toys/cat.js"); - var flashlightScriptURL = Script.resolvePath('../examples/toys/flashlight/flashlight.js'); - var pingPongScriptURL = Script.resolvePath('../examples/toys/ping_pong_gun/pingPongGun.js'); - var wandScriptURL = Script.resolvePath("../examples/toys/bubblewand/wand.js"); - var dollScriptURL = Script.resolvePath("../examples/toys/doll/doll.js"); - var lightsScriptURL = Script.resolvePath("../examples/toys/lightSwitch.js"); - var targetsScriptURL = Script.resolvePath('../examples/toys/ping_pong_gun/wallTarget.js'); + var sprayPaintScriptURL = Script.resolvePath("../examples/toybox/spray_paint/sprayPaintCan.js"); + var catScriptURL = Script.resolvePath("../examples/toybox/cat/cat.js"); + var flashlightScriptURL = Script.resolvePath('../examples/toybox/flashlight/flashlight.js'); + var pingPongScriptURL = Script.resolvePath('../examples/toybox/ping_pong_gun/pingPongGun.js'); + var wandScriptURL = Script.resolvePath("../examples/toybox/bubblewand/wand.js"); + var dollScriptURL = Script.resolvePath("../examples/toybox/doll/doll.js"); + var lightsScriptURL = Script.resolvePath("../examples/toybox/lights/lightSwitch.js"); + var targetsScriptURL = Script.resolvePath('../examples/toybox/ping_pong_gun/wallTarget.js'); + ResetSwitch = function() { _this = this; diff --git a/unpublishedScripts/masterReset.js b/unpublishedScripts/masterReset.js index 54f29b4259..956db41235 100644 --- a/unpublishedScripts/masterReset.js +++ b/unpublishedScripts/masterReset.js @@ -14,14 +14,14 @@ var utilitiesScript = Script.resolvePath("../examples/libraries/utils.js"); Script.include(utilitiesScript); -var sprayPaintScriptURL = Script.resolvePath("../examples/toys/sprayPaintCan.js"); -var catScriptURL = Script.resolvePath("../examples/toys/cat.js"); -var flashlightScriptURL = Script.resolvePath('../examples/toys/flashlight/flashlight.js'); -var pingPongScriptURL = Script.resolvePath('../examples/toys/ping_pong_gun/pingPongGun.js'); -var wandScriptURL = Script.resolvePath("../examples/toys/bubblewand/wand.js"); -var dollScriptURL = Script.resolvePath("../examples/toys/doll/doll.js"); -var lightsScriptURL = Script.resolvePath("../examples/toys/lightSwitch.js"); -var targetsScriptURL = Script.resolvePath('../examples/toys/ping_pong_gun/wallTarget.js'); + var sprayPaintScriptURL = Script.resolvePath("../examples/toybox/spray_paint/sprayPaintCan.js"); + var catScriptURL = Script.resolvePath("../examples/toybox/cat/cat.js"); + var flashlightScriptURL = Script.resolvePath('../examples/toybox/flashlight/flashlight.js'); + var pingPongScriptURL = Script.resolvePath('../examples/toybox/ping_pong_gun/pingPongGun.js'); + var wandScriptURL = Script.resolvePath("../examples/toybox/bubblewand/wand.js"); + var dollScriptURL = Script.resolvePath("../examples/toybox/doll/doll.js"); + var lightsScriptURL = Script.resolvePath("../examples/toybox/lights/lightSwitch.js"); + var targetsScriptURL = Script.resolvePath('../examples/toybox/ping_pong_gun/wallTarget.js'); From 856af8c764b2fbad658d602bd7d0f6dc20b1d0b6 Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Wed, 21 Oct 2015 14:31:17 -0700 Subject: [PATCH 2/5] fix EntityItemID dependency --- libraries/entities/src/EntityItemID.cpp | 16 ++++++++++++++++ libraries/entities/src/EntityItemID.h | 1 + libraries/shared/src/RegisteredMetaTypes.cpp | 15 --------------- libraries/shared/src/RegisteredMetaTypes.h | 2 -- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libraries/entities/src/EntityItemID.cpp b/libraries/entities/src/EntityItemID.cpp index 36664f5457..1462a4ef88 100644 --- a/libraries/entities/src/EntityItemID.cpp +++ b/libraries/entities/src/EntityItemID.cpp @@ -52,3 +52,19 @@ QScriptValue EntityItemIDtoScriptValue(QScriptEngine* engine, const EntityItemID void EntityItemIDfromScriptValue(const QScriptValue &object, EntityItemID& id) { quuidFromScriptValue(object, id); } + +QVector qVectorEntityItemIDFromScriptValue(const QScriptValue& array) { + if (!array.isArray()) { + return QVector(); + } + QVector newVector; + int length = array.property("length").toInteger(); + newVector.reserve(length); + for (int i = 0; i < length; i++) { + QString uuidAsString = array.property(i).toString(); + EntityItemID fromString(uuidAsString); + newVector << fromString; + } + return newVector; +} + diff --git a/libraries/entities/src/EntityItemID.h b/libraries/entities/src/EntityItemID.h index 765082ef0b..41a11147f8 100644 --- a/libraries/entities/src/EntityItemID.h +++ b/libraries/entities/src/EntityItemID.h @@ -43,5 +43,6 @@ Q_DECLARE_METATYPE(EntityItemID); Q_DECLARE_METATYPE(QVector); QScriptValue EntityItemIDtoScriptValue(QScriptEngine* engine, const EntityItemID& properties); void EntityItemIDfromScriptValue(const QScriptValue &object, EntityItemID& properties); +QVector qVectorEntityItemIDFromScriptValue(const QScriptValue& array); #endif // hifi_EntityItemID_h diff --git a/libraries/shared/src/RegisteredMetaTypes.cpp b/libraries/shared/src/RegisteredMetaTypes.cpp index 016c99a8dc..008ac238d5 100644 --- a/libraries/shared/src/RegisteredMetaTypes.cpp +++ b/libraries/shared/src/RegisteredMetaTypes.cpp @@ -118,21 +118,6 @@ QVector qVectorQUuidFromScriptValue(const QScriptValue& array) { return newVector; } -QVector qVectorEntityItemIDFromScriptValue(const QScriptValue& array) { - if (!array.isArray()) { - return QVector(); - } - QVector newVector; - int length = array.property("length").toInteger(); - newVector.reserve(length); - for (int i = 0; i < length; i++) { - QString uuidAsString = array.property(i).toString(); - EntityItemID fromString(uuidAsString); - newVector << fromString; - } - return newVector; -} - QScriptValue qVectorFloatToScriptValue(QScriptEngine* engine, const QVector& vector) { QScriptValue array = engine->newArray(); for (int i = 0; i < vector.size(); i++) { diff --git a/libraries/shared/src/RegisteredMetaTypes.h b/libraries/shared/src/RegisteredMetaTypes.h index 8e53f0ee37..cd1e3b0d3e 100644 --- a/libraries/shared/src/RegisteredMetaTypes.h +++ b/libraries/shared/src/RegisteredMetaTypes.h @@ -14,7 +14,6 @@ #include #include -#include "../../entities/src/EntityItemID.h" #include #include @@ -67,7 +66,6 @@ void qVectorFloatFromScriptValue(const QScriptValue& array, QVector& vect QVector qVectorFloatFromScriptValue(const QScriptValue& array); QVector qVectorQUuidFromScriptValue(const QScriptValue& array); -QVector qVectorEntityItemIDFromScriptValue(const QScriptValue& array); class PickRay { public: From 695f0a75b0b0cd9bc9f0f4ff6ec6c9fb57f50ba7 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 22 Oct 2015 11:12:51 -0700 Subject: [PATCH 3/5] fixes for builds with qt 5.5 --- libraries/render-utils/src/GlWindow.cpp | 6 ++-- libraries/ui/src/VrMenu.cpp | 40 +++++++++---------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/libraries/render-utils/src/GlWindow.cpp b/libraries/render-utils/src/GlWindow.cpp index 78ac046b59..248b9305e2 100644 --- a/libraries/render-utils/src/GlWindow.cpp +++ b/libraries/render-utils/src/GlWindow.cpp @@ -43,11 +43,9 @@ bool GlWindow::makeCurrent() { qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER)); }); - #ifndef QT_NO_DEBUG - QOpenGLContext * currentContext = - #endif - QOpenGLContext::currentContext(); + QOpenGLContext * currentContext = QOpenGLContext::currentContext(); Q_ASSERT(_context == currentContext); + return makeCurrentResult; } diff --git a/libraries/ui/src/VrMenu.cpp b/libraries/ui/src/VrMenu.cpp index a2cc7f0214..57df4d5306 100644 --- a/libraries/ui/src/VrMenu.cpp +++ b/libraries/ui/src/VrMenu.cpp @@ -108,13 +108,10 @@ void VrMenu::addMenu(QMenu* menu) { Q_ASSERT(false); } QVariant returnedValue; - #ifndef QT_NO_DEBUG - bool invokeResult = - #endif - QMetaObject::invokeMethod(this, "addMenu", Qt::DirectConnection, - Q_RETURN_ARG(QVariant, returnedValue), - Q_ARG(QVariant, QVariant::fromValue(qmlParent)), - Q_ARG(QVariant, QVariant::fromValue(menu->title()))); + bool invokeResult = QMetaObject::invokeMethod(this, "addMenu", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, returnedValue), + Q_ARG(QVariant, QVariant::fromValue(qmlParent)), + Q_ARG(QVariant, QVariant::fromValue(menu->title()))); Q_ASSERT(invokeResult); QObject* result = returnedValue.value(); Q_ASSERT(result); @@ -150,13 +147,11 @@ void VrMenu::addAction(QMenu* menu, QAction* action) { QObject* menuQml = findMenuObject(userData->uuid.toString()); Q_ASSERT(menuQml); QVariant returnedValue; - #ifndef QT_NO_DEBUG - bool invokeResult = - #endif - QMetaObject::invokeMethod(this, "addItem", Qt::DirectConnection, - Q_RETURN_ARG(QVariant, returnedValue), - Q_ARG(QVariant, QVariant::fromValue(menuQml)), - Q_ARG(QVariant, QVariant::fromValue(action->text()))); + + bool invokeResult = QMetaObject::invokeMethod(this, "addItem", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, returnedValue), + Q_ARG(QVariant, QVariant::fromValue(menuQml)), + Q_ARG(QVariant, QVariant::fromValue(action->text()))); Q_ASSERT(invokeResult); QObject* result = returnedValue.value(); Q_ASSERT(result); @@ -173,14 +168,11 @@ void VrMenu::insertAction(QAction* before, QAction* action) { } QObject* menu = beforeQml->parent(); QVariant returnedValue; - #ifndef QT_NO_DEBUG - bool invokeResult = - #endif - QMetaObject::invokeMethod(this, "insertItem", Qt::DirectConnection, - Q_RETURN_ARG(QVariant, returnedValue), - Q_ARG(QVariant, QVariant::fromValue(menu)), - Q_ARG(QVariant, QVariant::fromValue(beforeQml)), - Q_ARG(QVariant, QVariant::fromValue(action->text()))); + bool invokeResult = QMetaObject::invokeMethod(this, "insertItem", Qt::DirectConnection, + Q_RETURN_ARG(QVariant, returnedValue), + Q_ARG(QVariant, QVariant::fromValue(menu)), + Q_ARG(QVariant, QVariant::fromValue(beforeQml)), + Q_ARG(QVariant, QVariant::fromValue(action->text()))); Q_ASSERT(invokeResult); QObject* result = returnedValue.value(); Q_ASSERT(result); @@ -199,9 +191,5 @@ void VrMenu::removeAction(QAction* action) { bool invokeResult = QMetaObject::invokeMethod(this, "removeItem", Qt::DirectConnection, Q_ARG(QVariant, QVariant::fromValue(menu)), Q_ARG(QVariant, QVariant::fromValue(item))); -#ifndef QT_NO_DEBUG Q_ASSERT(invokeResult); -#else - Q_UNUSED(invokeResult); -#endif } From a44ac4cbfd13e54aa68bf101334a00f21f30dc45 Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 22 Oct 2015 11:40:56 -0700 Subject: [PATCH 4/5] Fiing the dark colors for surfaces without texture --- libraries/render-utils/src/MeshPartPayload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render-utils/src/MeshPartPayload.cpp b/libraries/render-utils/src/MeshPartPayload.cpp index 80327b7e54..30b72891dd 100644 --- a/libraries/render-utils/src/MeshPartPayload.cpp +++ b/libraries/render-utils/src/MeshPartPayload.cpp @@ -147,7 +147,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ModelRender::Locatio batch.setResourceTexture(ModelRender::DIFFUSE_MAP_SLOT, textureCache->getGrayTexture()); } } else { - batch.setResourceTexture(ModelRender::DIFFUSE_MAP_SLOT, textureCache->getGrayTexture()); + batch.setResourceTexture(ModelRender::DIFFUSE_MAP_SLOT, textureCache->getWhiteTexture()); } // Normal map From ea917f85f472332cc2ccc953cf1b10b17f36e09c Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Thu, 22 Oct 2015 12:56:45 -0700 Subject: [PATCH 5/5] added ability to set keyhole radius on EntityViewer --- libraries/octree/src/OctreeHeadlessViewer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/octree/src/OctreeHeadlessViewer.h b/libraries/octree/src/OctreeHeadlessViewer.h index 605db15cd2..cebfa5a928 100644 --- a/libraries/octree/src/OctreeHeadlessViewer.h +++ b/libraries/octree/src/OctreeHeadlessViewer.h @@ -46,6 +46,7 @@ public slots: // setters for camera attributes void setPosition(const glm::vec3& position) { _viewFrustum.setPosition(position); } void setOrientation(const glm::quat& orientation) { _viewFrustum.setOrientation(orientation); } + void setKeyholeRadius(float keyholdRadius) { _viewFrustum.setKeyholeRadius(keyholdRadius); } // setters for LOD and PPS void setVoxelSizeScale(float sizeScale) { _voxelSizeScale = sizeScale; }