diff --git a/domain-server/src/DomainGatekeeper.cpp b/domain-server/src/DomainGatekeeper.cpp index 709c5810e2..6d339852d5 100644 --- a/domain-server/src/DomainGatekeeper.cpp +++ b/domain-server/src/DomainGatekeeper.cpp @@ -127,7 +127,8 @@ void DomainGatekeeper::processConnectRequestPacket(QSharedPointer()->putLocalPortIntoSharedMemory(DOMAIN_SERVER_LOCAL_PORT_SMEM_KEY, this, localSockAddr.getPort()); + }); // register as the packet receiver for the types we want PacketReceiver& packetReceiver = nodeList->getPacketReceiver(); diff --git a/domain-server/src/NodeConnectionData.cpp b/domain-server/src/NodeConnectionData.cpp index b4aaacd749..9703db39c8 100644 --- a/domain-server/src/NodeConnectionData.cpp +++ b/domain-server/src/NodeConnectionData.cpp @@ -36,6 +36,9 @@ NodeConnectionData NodeConnectionData::fromDataStream(QDataStream& dataStream, c // now the machine fingerprint dataStream >> newHeader.machineFingerprint; + // and the operating system type + dataStream >> newHeader.SystemInfo; + dataStream >> newHeader.connectReason; dataStream >> newHeader.previousConnectionUpTime; diff --git a/domain-server/src/NodeConnectionData.h b/domain-server/src/NodeConnectionData.h index 23eceb0dca..3833f5afd3 100644 --- a/domain-server/src/NodeConnectionData.h +++ b/domain-server/src/NodeConnectionData.h @@ -31,9 +31,9 @@ public: QString placeName; QString hardwareAddress; QUuid machineFingerprint; + QString SystemInfo; quint32 connectReason; quint64 previousConnectionUpTime; - QByteArray protocolVersion; }; diff --git a/interface/resources/qml/controls/qmldir b/interface/resources/qml/controls/qmldir new file mode 100644 index 0000000000..6d7cf458cd --- /dev/null +++ b/interface/resources/qml/controls/qmldir @@ -0,0 +1,25 @@ +module controls +Button 1.0 Button.qml +ButtonAwesome 1.0 ButtonAwesome.qml +CheckBox 1.0 CheckBox.qml +ComboBox 1.0 ComboBox.qml +FlickableWebViewCore 1.0 FlickableWebViewCore.qml +FontAwesome 1.0 FontAwesome.qml +Player 1.0 Player.qml +RadioButton 1.0 RadioButton.qml +Slider 1.0 Slider.qml +Spacer 1.0 Spacer.qml +SpinBox 1.0 SpinBox.qml +TabletWebButton 1.0 TabletWebButton.qml +TabletWebScreen 1.0 TabletWebScreen.qml +TabletWebView 1.0 TabletWebView.qml +Text 1.0 Text.qml +TextAndSlider 1.0 TextAndSlider.qml +TextAndSpinBox 1.0 TextAndSpinBox.qml +TextArea 1.0 TextArea.qml +TextEdit 1.0 TextEdit.qml +TextField 1.0 TextField.qml +TextHeader 1.0 TextHeader.qml +TextInput 1.0 TextInput.qml +TextInputAndButton 1.0 TextInputAndButton.qml +WebView 1.0 WebView.qml \ No newline at end of file diff --git a/interface/resources/qml/hifi/dialogs/qmldir b/interface/resources/qml/hifi/dialogs/qmldir new file mode 100644 index 0000000000..4075738e33 --- /dev/null +++ b/interface/resources/qml/hifi/dialogs/qmldir @@ -0,0 +1,18 @@ +module dialogs +AboutDialog 1.0 AboutDialog.qml +AdvancedPreferencesDialog 1.0 AdvancedPreferencesDialog.qml +AudioBuffers 1.0 AudioBuffers.qml +AvatarPreferencesDialog 1.0 AvatarPreferencesDialog.qml +GeneralPreferencesDialog 1.0 GeneralPreferencesDialog.qml +LodPreferencesDialog 1.0 LodPreferencesDialog.qml +ModelBrowserDialog 1.0 ModelBrowserDialog.qml +NetworkingPreferencesDialog 1.0 NetworkingPreferencesDialog.qml +RunningScripts 1.0 RunningScripts.qml +TabletAboutDialog 1.0 TabletAboutDialog.qml +TabletAssetServer 1.0 TabletAssetServer.qml +TabletDCDialog 1.0 TabletDCDialog.qml +TabletDebugWindow 1.0 TabletDebugWindow.qml +TabletEntityStatistics 1.0 TabletEntityStatistics.qml +TabletEntityStatisticsItem 1.0 TabletEntityStatisticsItem.qml +TabletLODTools 1.0 TabletLODTools.qml +TabletRunningScripts 1.0 TabletRunningScripts.qml \ No newline at end of file diff --git a/interface/resources/qml/hifi/toolbars/qmldir b/interface/resources/qml/hifi/toolbars/qmldir new file mode 100644 index 0000000000..a27cdc0a4f --- /dev/null +++ b/interface/resources/qml/hifi/toolbars/qmldir @@ -0,0 +1,4 @@ +module toolbars +StateImage 1.0 StateImage.qml +Toolbar 1.0 Toolbar.qml +ToolbarButton 1.0 ToolbarButton.qml \ No newline at end of file diff --git a/interface/src/avatar/MyAvatar.h b/interface/src/avatar/MyAvatar.h index f31e6e524e..8cd2c44088 100644 --- a/interface/src/avatar/MyAvatar.h +++ b/interface/src/avatar/MyAvatar.h @@ -267,7 +267,7 @@ class MyAvatar : public Avatar { * @property {number} analogPlusWalkSpeed - The walk speed of your avatar for the "AnalogPlus" control scheme. *

Warning: Setting this value also sets the value of analogPlusSprintSpeed to twice * the value.

- * @property {number} analogPlusSprintSpeed - The sprint speed of your avatar for the "AnalogPlus" control scheme. + * @property {number} analogPlusSprintSpeed - The sprint (run) speed of your avatar for the "AnalogPlus" control scheme. * @property {MyAvatar.SitStandModelType} userRecenterModel - Controls avatar leaning and recentering behavior. * @property {number} isInSittingState - true if your avatar is sitting (avatar leaning is disabled, * recenntering is enabled), false if it is standing (avatar leaning is enabled, and avatar recenters if it @@ -2198,33 +2198,35 @@ signals: void audioListenerModeChanged(); /**jsdoc - * Notifies when the analogPlusWalkSpeed value is changed. + * Triggered when the walk speed set for the "AnalogPlus" control scheme changes. * @function MyAvatar.analogPlusWalkSpeedChanged - * @param {float} value - the new avatar walk speed + * @param {number} speed - The new walk speed set for the "AnalogPlus" control scheme. * @returns {Signal} */ void analogPlusWalkSpeedChanged(float value); /**jsdoc - * Notifies when the analogPlusSprintSpeed value is changed. + * Triggered when the sprint (run) speed set for the "AnalogPlus" control scheme changes. * @function MyAvatar.analogPlusSprintSpeedChanged - * @param {float} value - the new avatar sprint speed + * @param {number} speed - The new sprint speed set for the "AnalogPlus" control scheme. * @returns {Signal} */ void analogPlusSprintSpeedChanged(float value); /**jsdoc - * Notifies when the sprintSpeed value is changed. + * Triggered when the sprint (run) speed set for the current control scheme (see + * {@link MyAvatar.getControlScheme|getControlScheme}) changes. * @function MyAvatar.sprintSpeedChanged - * @param {float} value - the new avatar sprint speed + * @param {number} speed -The new sprint speed set for the current control scheme. * @returns {Signal} */ void sprintSpeedChanged(float value); /**jsdoc - * Notifies when the walkBackwardSpeed value is changed. + * Triggered when the walk backward speed set for the current control scheme (see + * {@link MyAvatar.getControlScheme|getControlScheme}) changes. * @function MyAvatar.walkBackwardSpeedChanged - * @param {float} value - the new avatar walk backward speed + * @param {number} speed - The new walk backward speed set for the current control scheme. * @returns {Signal} */ void walkBackwardSpeedChanged(float value); diff --git a/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.cpp index 9828a8beda..5e1c720ba3 100644 --- a/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.cpp @@ -109,6 +109,21 @@ bool Basic2DWindowOpenGLDisplayPlugin::internalActivate() { return Parent::internalActivate(); } +gpu::PipelinePointer Basic2DWindowOpenGLDisplayPlugin::getCompositeScenePipeline() { +#if defined(Q_OS_ANDROID) + return _linearToSRGBPipeline; +#endif + return _SRGBToLinearPipeline; +} + +gpu::Element Basic2DWindowOpenGLDisplayPlugin::getCompositeFBColorSpace() { +#if defined(Q_OS_ANDROID) + return gpu::Element::COLOR_SRGBA_32; +#endif + return gpu::Element::COLOR_RGBA_32; +} + + void Basic2DWindowOpenGLDisplayPlugin::compositeExtra() { #if defined(Q_OS_ANDROID) auto& virtualPadManager = VirtualPad::Manager::instance(); diff --git a/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.h b/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.h index cc304c19c2..7f654915e1 100644 --- a/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.h +++ b/libraries/display-plugins/src/display-plugins/Basic2DWindowOpenGLDisplayPlugin.h @@ -37,6 +37,9 @@ public: virtual void pluginUpdate() override {}; + virtual gpu::PipelinePointer getCompositeScenePipeline() override; + virtual gpu::Element getCompositeFBColorSpace() override; + protected: mutable bool _isThrottled = false; diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp index 6c6c2aee80..aa1233ce22 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.cpp @@ -48,12 +48,16 @@ #include "CompositorHelper.h" #include "Logging.h" #include "RefreshRateController.h" + +using namespace shader::gpu::program; + extern QThread* RENDER_THREAD; class PresentThread : public QThread, public Dependency { using Mutex = std::mutex; using Condition = std::condition_variable; using Lock = std::unique_lock; + public: PresentThread() { @@ -380,57 +384,45 @@ void OpenGLDisplayPlugin::customizeContext() { } } - if (!_presentPipeline) { + if (!_drawTexturePipeline) { gpu::StatePointer blendState = gpu::StatePointer(new gpu::State()); blendState->setDepthTest(gpu::State::DepthTest(false)); blendState->setBlendFunction(true, - gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA, - gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::ONE); + gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, + gpu::State::INV_SRC_ALPHA, + gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, + gpu::State::ONE); gpu::StatePointer scissorState = gpu::StatePointer(new gpu::State()); scissorState->setDepthTest(gpu::State::DepthTest(false)); scissorState->setScissorEnable(true); - { -#ifdef Q_OS_ANDROID - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTextureGammaLinearToSRGB); -#else - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTexture); -#endif - _simplePipeline = gpu::Pipeline::create(program, scissorState); - } - { -#ifdef Q_OS_ANDROID - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTextureGammaLinearToSRGB); -#else - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTextureGammaSRGBToLinear); -#endif - _presentPipeline = gpu::Pipeline::create(program, scissorState); - } + _drawTexturePipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), scissorState); - { - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTexture); - _hudPipeline = gpu::Pipeline::create(program, blendState); - } - { - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTextureMirroredX); - _mirrorHUDPipeline = gpu::Pipeline::create(program, blendState); - } + _linearToSRGBPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaLinearToSRGB), scissorState); - { - gpu::ShaderPointer program = gpu::Shader::createProgram(shader::gpu::program::DrawTransformedTexture); - _cursorPipeline = gpu::Pipeline::create(program, blendState); - } + _SRGBToLinearPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureGammaSRGBToLinear), scissorState); + + _hudPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTexture), blendState); + + _mirrorHUDPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTextureMirroredX), blendState); + + _cursorPipeline = gpu::Pipeline::create(gpu::Shader::createProgram(DrawTransformedTexture), blendState); } + updateCompositeFramebuffer(); } void OpenGLDisplayPlugin::uncustomizeContext() { - _presentPipeline.reset(); - _cursorPipeline.reset(); + + _drawTexturePipeline.reset(); + _linearToSRGBPipeline.reset(); + _SRGBToLinearPipeline.reset(); _hudPipeline.reset(); _mirrorHUDPipeline.reset(); + _cursorPipeline.reset(); _compositeFramebuffer.reset(); + withPresentThreadLock([&] { _currentFrame.reset(); _lastFrame = nullptr; @@ -535,11 +527,9 @@ void OpenGLDisplayPlugin::renderFromTexture(gpu::Batch& batch, const gpu::Textur batch.setStateScissorRect(scissor); batch.setViewportTransform(viewport); batch.setResourceTexture(0, texture); -#ifndef USE_GLES - batch.setPipeline(_presentPipeline); -#else - batch.setPipeline(_simplePipeline); -#endif + + batch.setPipeline(_drawTexturePipeline); + batch.draw(gpu::TRIANGLE_STRIP, 4); if (copyFbo) { gpu::Vec4i copyFboRect(0, 0, copyFbo->getWidth(), copyFbo->getHeight()); @@ -644,6 +634,11 @@ void OpenGLDisplayPlugin::compositePointer() { }); } +// Overridden by Basic2DWindowDisplayPlugin and OculusDisplayPlugin +gpu::PipelinePointer OpenGLDisplayPlugin::getCompositeScenePipeline() { + return _drawTexturePipeline; +} + void OpenGLDisplayPlugin::compositeScene() { render([&](gpu::Batch& batch) { batch.enableStereo(false); @@ -652,7 +647,7 @@ void OpenGLDisplayPlugin::compositeScene() { batch.setStateScissorRect(ivec4(uvec2(), _compositeFramebuffer->getSize())); batch.resetViewTransform(); batch.setProjectionTransform(mat4()); - batch.setPipeline(_simplePipeline); + batch.setPipeline(getCompositeScenePipeline()); batch.setResourceTexture(0, _currentFrame->framebuffer->getRenderBuffer(0)); batch.draw(gpu::TRIANGLE_STRIP, 4); }); @@ -924,11 +919,17 @@ void OpenGLDisplayPlugin::render(std::function f) { OpenGLDisplayPlugin::~OpenGLDisplayPlugin() { } +// Added this to allow desktop composite framebuffer to be RGBA while mobile is SRGBA +// Overridden by Basic2DWindowDisplayPlugin +// FIXME: Eventually it would be ideal to have both framebuffers be of the same type +gpu::Element OpenGLDisplayPlugin::getCompositeFBColorSpace() { + return gpu::Element::COLOR_RGBA_32; +} + void OpenGLDisplayPlugin::updateCompositeFramebuffer() { auto renderSize = glm::uvec2(getRecommendedRenderSize()); if (!_compositeFramebuffer || _compositeFramebuffer->getSize() != renderSize) { - _compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", gpu::Element::COLOR_RGBA_32, renderSize.x, renderSize.y)); - // _compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", gpu::Element::COLOR_SRGBA_32, renderSize.x, renderSize.y)); + _compositeFramebuffer = gpu::FramebufferPointer(gpu::Framebuffer::create("OpenGLDisplayPlugin::composite", getCompositeFBColorSpace(), renderSize.x, renderSize.y)); } } diff --git a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h index 562c5af5cf..672d9a4beb 100644 --- a/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h +++ b/libraries/display-plugins/src/display-plugins/OpenGLDisplayPlugin.h @@ -106,6 +106,9 @@ protected: virtual void compositePointer(); virtual void compositeExtra() {}; + virtual gpu::PipelinePointer getCompositeScenePipeline(); + virtual gpu::Element getCompositeFBColorSpace(); + // These functions must only be called on the presentation thread virtual void customizeContext(); virtual void uncustomizeContext(); @@ -149,9 +152,11 @@ protected: gpu::PipelinePointer _hudPipeline; gpu::PipelinePointer _mirrorHUDPipeline; gpu::ShaderPointer _mirrorHUDPS; - gpu::PipelinePointer _simplePipeline; - gpu::PipelinePointer _presentPipeline; + gpu::PipelinePointer _drawTexturePipeline; + gpu::PipelinePointer _linearToSRGBPipeline; + gpu::PipelinePointer _SRGBToLinearPipeline; gpu::PipelinePointer _cursorPipeline; + gpu::TexturePointer _displayTexture{}; float _compositeHUDAlpha { 1.0f }; diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 8fefe5820c..ac0f9e0b07 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -450,13 +450,16 @@ qint64 LimitedNodeList::sendPacket(std::unique_ptr packet, const HifiS auto size = sendUnreliablePacket(*packet, sockAddr, hmacAuth); if (size < 0) { auto now = usecTimestampNow(); - eachNode([now](const SharedNodePointer & node) { - qCDebug(networking) << "Stats for " << node->getPublicSocket() << "\n" - << " Last Heard Microstamp: " << node->getLastHeardMicrostamp() << " (" << (now - node->getLastHeardMicrostamp()) << "usec ago)\n" - << " Outbound Kbps: " << node->getOutboundKbps() << "\n" - << " Inbound Kbps: " << node->getInboundKbps() << "\n" - << " Ping: " << node->getPingMs(); - }); + if (now - _sendErrorStatsTime > ERROR_STATS_PERIOD_US) { + _sendErrorStatsTime = now; + eachNode([now](const SharedNodePointer& node) { + qCDebug(networking) << "Stats for " << node->getPublicSocket() << "\n" + << " Last Heard Microstamp: " << node->getLastHeardMicrostamp() << " (" << (now - node->getLastHeardMicrostamp()) << "usec ago)\n" + << " Outbound Kbps: " << node->getOutboundKbps() << "\n" + << " Inbound Kbps: " << node->getInboundKbps() << "\n" + << " Ping: " << node->getPingMs(); + }); + } } return size; } @@ -996,7 +999,7 @@ void LimitedNodeList::sendSTUNRequest() { const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10; if (!_hasCompletedInitialSTUN) { - qCDebug(networking) << "Sending intial stun request to" << STUN_SERVER_HOSTNAME; + qCDebug(networking) << "Sending initial stun request to" << STUN_SERVER_HOSTNAME; if (_numInitialSTUNRequests > NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL) { // we're still trying to do our initial STUN we're over the fail threshold @@ -1185,7 +1188,7 @@ void LimitedNodeList::stopInitialSTUNUpdate(bool success) { // We now setup a timer here to fire every so often to check that our IP address has not changed. // Or, if we failed - if will check if we can eventually get a public socket - const int STUN_IP_ADDRESS_CHECK_INTERVAL_MSECS = 30 * 1000; + const int STUN_IP_ADDRESS_CHECK_INTERVAL_MSECS = 10 * 1000; QTimer* stunOccasionalTimer = new QTimer { this }; connect(stunOccasionalTimer, &QTimer::timeout, this, &LimitedNodeList::sendSTUNRequest); @@ -1243,15 +1246,22 @@ void LimitedNodeList::errorTestingLocalSocket() { } void LimitedNodeList::setLocalSocket(const HifiSockAddr& sockAddr) { - if (sockAddr != _localSockAddr) { + if (sockAddr.getAddress() != _localSockAddr.getAddress()) { if (_localSockAddr.isNull()) { qCInfo(networking) << "Local socket is" << sockAddr; + _localSockAddr = sockAddr; } else { qCInfo(networking) << "Local socket has changed from" << _localSockAddr << "to" << sockAddr; + _localSockAddr = sockAddr; + if (_hasTCPCheckedLocalSocket) { // Force a port change for NAT: + reset(); + _nodeSocket.rebind(0); + _localSockAddr.setPort(_nodeSocket.localPort()); + qCInfo(networking) << "Local port changed to" << _localSockAddr.getPort(); + } } - _localSockAddr = sockAddr; emit localSockAddrChanged(_localSockAddr); } } diff --git a/libraries/networking/src/LimitedNodeList.h b/libraries/networking/src/LimitedNodeList.h index f9f6bf3b3e..5f24401b10 100644 --- a/libraries/networking/src/LimitedNodeList.h +++ b/libraries/networking/src/LimitedNodeList.h @@ -497,6 +497,9 @@ private: float _outboundKbps { 0.0f }; bool _dropOutgoingNodeTraffic { false }; + + quint64 _sendErrorStatsTime { (quint64)0 }; + static const quint64 ERROR_STATS_PERIOD_US { 1 * USECS_PER_SECOND }; }; #endif // hifi_LimitedNodeList_h diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 3d367bc761..96b713c583 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -418,6 +418,20 @@ void NodeList::sendDomainServerCheckIn() { auto accountManager = DependencyManager::get(); packetStream << FingerprintUtils::getMachineFingerprint(); + QString systemInfo; +#if defined Q_OS_WIN + systemInfo = "OS:Windows"; +#elif defined Q_OS_OSX + systemInfo = "OS:OSX"; +#elif defined Q_OS_LINUX + systemInfo = "OS:Linux"; +#elif defined Q_OS_ANDROID + systemInfo = "OS:Android"; +#else + systemInfo = "OS:Unknown"; +#endif + packetStream << systemInfo; + packetStream << _connectReason; if (_nodeDisconnectTimestamp < _nodeConnectTimestamp) { diff --git a/libraries/networking/src/udt/PacketHeaders.cpp b/libraries/networking/src/udt/PacketHeaders.cpp index 30066b68e8..e434867c9a 100644 --- a/libraries/networking/src/udt/PacketHeaders.cpp +++ b/libraries/networking/src/udt/PacketHeaders.cpp @@ -72,7 +72,7 @@ PacketVersion versionForPacketType(PacketType packetType) { return static_cast(DomainConnectionDeniedVersion::IncludesExtraInfo); case PacketType::DomainConnectRequest: - return static_cast(DomainConnectRequestVersion::HasReason); + return static_cast(DomainConnectRequestVersion::HasSystemInfo); case PacketType::DomainServerAddedNode: return static_cast(DomainServerAddedNodeVersion::PermissionsGrid); diff --git a/libraries/networking/src/udt/PacketHeaders.h b/libraries/networking/src/udt/PacketHeaders.h index 93a5d4e2b4..a244399c5a 100644 --- a/libraries/networking/src/udt/PacketHeaders.h +++ b/libraries/networking/src/udt/PacketHeaders.h @@ -346,7 +346,8 @@ enum class DomainConnectRequestVersion : PacketVersion { HasMachineFingerprint, AlwaysHasMachineFingerprint, HasTimestamp, - HasReason + HasReason, + HasSystemInfo }; enum class DomainConnectionDeniedVersion : PacketVersion { diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 3a7a056c77..c56f276560 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -33,6 +33,7 @@ using namespace udt; Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) : QObject(parent), + _udpSocket(parent), _readyReadBackupTimer(new QTimer(this)), _shouldChangeSocketOptions(shouldChangeSocketOptions) { @@ -50,6 +51,7 @@ Socket::Socket(QObject* parent, bool shouldChangeSocketOptions) : } void Socket::bind(const QHostAddress& address, quint16 port) { + _udpSocket.bind(address, port); if (_shouldChangeSocketOptions) { @@ -75,7 +77,7 @@ void Socket::rebind() { } void Socket::rebind(quint16 localPort) { - _udpSocket.close(); + _udpSocket.abort(); bind(QHostAddress::AnyIPv4, localPort); } diff --git a/libraries/pointers/src/PickManager.cpp b/libraries/pointers/src/PickManager.cpp index 0cf5f90e3d..aadfbc41a0 100644 --- a/libraries/pointers/src/PickManager.cpp +++ b/libraries/pointers/src/PickManager.cpp @@ -122,22 +122,22 @@ void PickManager::update() { // FIXME: give each type its own expiry // Each type will update at least one pick, regardless of the expiry { - PROFILE_RANGE(picks, "StylusPicks"); + PROFILE_RANGE_EX(picks, "StylusPicks", 0xffff0000, (uint64_t)_totalPickCounts[PickQuery::Stylus]); PerformanceTimer perfTimer("StylusPicks"); _updatedPickCounts[PickQuery::Stylus] = _stylusPickCacheOptimizer.update(cachedPicks[PickQuery::Stylus], _nextPickToUpdate[PickQuery::Stylus], expiry, false); } { - PROFILE_RANGE(picks, "RayPicks"); + PROFILE_RANGE_EX(picks, "RayPicks", 0xffff0000, (uint64_t)_totalPickCounts[PickQuery::Ray]); PerformanceTimer perfTimer("RayPicks"); _updatedPickCounts[PickQuery::Ray] = _rayPickCacheOptimizer.update(cachedPicks[PickQuery::Ray], _nextPickToUpdate[PickQuery::Ray], expiry, shouldPickHUD); } { - PROFILE_RANGE(picks, "ParabolaPick"); - PerformanceTimer perfTimer("ParabolaPick"); + PROFILE_RANGE_EX(picks, "ParabolaPicks", 0xffff0000, (uint64_t)_totalPickCounts[PickQuery::Parabola]); + PerformanceTimer perfTimer("ParabolaPicks"); _updatedPickCounts[PickQuery::Parabola] = _parabolaPickCacheOptimizer.update(cachedPicks[PickQuery::Parabola], _nextPickToUpdate[PickQuery::Parabola], expiry, shouldPickHUD); } { - PROFILE_RANGE(picks, "CollisoinPicks"); + PROFILE_RANGE_EX(picks, "CollisionPicks", 0xffff0000, (uint64_t)_totalPickCounts[PickQuery::Collision]); PerformanceTimer perfTimer("CollisionPicks"); _updatedPickCounts[PickQuery::Collision] = _collisionPickCacheOptimizer.update(cachedPicks[PickQuery::Collision], _nextPickToUpdate[PickQuery::Collision], expiry, false); } diff --git a/libraries/ui/src/DockWidget.cpp b/libraries/ui/src/DockWidget.cpp index 3bcd479d61..44bac1f670 100644 --- a/libraries/ui/src/DockWidget.cpp +++ b/libraries/ui/src/DockWidget.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -28,6 +29,7 @@ DockWidget::DockWidget(const QString& title, QWidget* parent) : QDockWidget(titl auto offscreenUi = DependencyManager::get(); auto qmlEngine = offscreenUi->getSurfaceContext()->engine(); _quickView = std::shared_ptr(new QQuickView(qmlEngine, nullptr), quickViewDeleter); + _quickView->setFormat(getDefaultOpenGLSurfaceFormat()); QWidget* widget = QWidget::createWindowContainer(_quickView.get()); setWidget(widget); QWidget* headerWidget = new QWidget(); diff --git a/plugins/oculus/src/OculusDisplayPlugin.cpp b/plugins/oculus/src/OculusDisplayPlugin.cpp index df01591639..c493588992 100644 --- a/plugins/oculus/src/OculusDisplayPlugin.cpp +++ b/plugins/oculus/src/OculusDisplayPlugin.cpp @@ -124,6 +124,10 @@ void OculusDisplayPlugin::uncustomizeContext() { Parent::uncustomizeContext(); } +gpu::PipelinePointer OculusDisplayPlugin::getCompositeScenePipeline() { + return _SRGBToLinearPipeline; +} + static const uint64_t FRAME_BUDGET = (11 * USECS_PER_MSEC); static const uint64_t FRAME_OVER_BUDGET = (15 * USECS_PER_MSEC); @@ -163,7 +167,7 @@ void OculusDisplayPlugin::hmdPresent() { batch.setStateScissorRect(ivec4(uvec2(), _outputFramebuffer->getSize())); batch.resetViewTransform(); batch.setProjectionTransform(mat4()); - batch.setPipeline(_presentPipeline); + batch.setPipeline(_drawTexturePipeline); batch.setResourceTexture(0, _compositeFramebuffer->getRenderBuffer(0)); batch.draw(gpu::TRIANGLE_STRIP, 4); }); diff --git a/plugins/oculus/src/OculusDisplayPlugin.h b/plugins/oculus/src/OculusDisplayPlugin.h index 9209fd373e..8eda599fa9 100644 --- a/plugins/oculus/src/OculusDisplayPlugin.h +++ b/plugins/oculus/src/OculusDisplayPlugin.h @@ -34,6 +34,8 @@ protected: void uncustomizeContext() override; void cycleDebugOutput() override; + virtual gpu::PipelinePointer getCompositeScenePipeline() override; + private: static const char* NAME; ovrTextureSwapChain _textureSwapChain; diff --git a/scripts/simplifiedUI/ui/simplifiedNametag/resources/modules/nameTagListManager.js b/scripts/simplifiedUI/ui/simplifiedNametag/resources/modules/nameTagListManager.js index f8b6f2e6cd..2ba9904845 100644 --- a/scripts/simplifiedUI/ui/simplifiedNametag/resources/modules/nameTagListManager.js +++ b/scripts/simplifiedUI/ui/simplifiedNametag/resources/modules/nameTagListManager.js @@ -9,16 +9,17 @@ // // Helps manage the list of avatars added to the nametag list // - -var EntityMaker = Script.require('./entityMaker.js?' + Date.now()); -var entityProps = Script.require('./defaultLocalEntityProps.js?' + Date.now()); -var textHelper = new (Script.require('./textHelper.js?' + Date.now())); +var EntityMaker = Script.require('./entityMaker.js'); +var entityProps = Script.require('./defaultLocalEntityProps.js'); +var textHelper = new (Script.require('./textHelper.js')); var X = 0; var Y = 1; var Z = 2; var HALF = 0.5; var CLEAR_ENTITY_EDIT_PROPS = true; var MILISECONDS_IN_SECOND = 1000; +var SECONDS_IN_MINUTE = 60; +var ALWAYS_ON_MAX_LIFETIME_IN_SECONDS = 20 * SECONDS_IN_MINUTE; // Delete after 20 minutes in case a nametag is hanging around in on mode // ************************************* // START UTILTY @@ -58,8 +59,6 @@ var distanceScaler = DISTANCE_SCALER_ON; var userScaler = 1.0; var DEFAULT_LINE_HEIGHT = entityProps.lineHeight; function calculateInitialProperties(uuid) { - var avatar = _this.avatars[uuid]; - var adjustedScaler = null; var distance = null; var dimensions = null; @@ -97,19 +96,6 @@ function calculateInitialProperties(uuid) { } -// Used in alwaysOn mode to show or hide if they reached the max radius -function showHide(uuid, type) { - var avatar = _this.avatars[uuid]; - var nametag = avatar.nametag; - - if (type === "show") { - nametag.show(); - } else { - nametag.hide(); - } -} - - // Go through the selected avatar list and see if any of the avatars need a redraw function checkAllSelectedForRedraw() { for (var avatar in _this.selectedAvatars) { @@ -168,6 +154,18 @@ function getDistance(uuid, checkAvatar, shouldSave) { } +// Quick check for distance from avatar +function quickDistanceCheckForNonSelectedAvatars(uuid) { + var source = MyAvatar.position; + + var target = AvatarManager.getAvatar(uuid).position; + + var avatarDistance = Vec3.distance(target, source); + + return avatarDistance; +} + + // Check to see if we need to toggle our interval check because we went to 0 avatars // or if we got our first avatar in the select list function shouldToggleInterval() { @@ -197,7 +195,9 @@ function toggleInterval() { } -// handle turning the peristenet mode on +// Handle checking to see if we should add or delete nametags in persistent mode +var alwaysOnAvatarDistanceCheck = false; +var DISTANCE_CHECK_INTERVAL_MS = 1000; function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) { _this.reset(); if (shouldTurnOnAlwaysOnMode) { @@ -205,9 +205,23 @@ function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) { .getAvatarIdentifiers() .forEach(function (avatar) { if (avatar) { - add(avatar); + var avatarDistance = quickDistanceCheckForNonSelectedAvatars(avatar); + if (avatarDistance < MAX_RADIUS_IGNORE_METERS) { + add(avatar); + } } }); + maybeClearAlwaysOnAvatarDistanceCheck(); + alwaysOnAvatarDistanceCheck = Script.setInterval(maybeAddOrRemoveIntervalCheck, DISTANCE_CHECK_INTERVAL_MS); + } +} + + +// Check to see if we need to clear the distance check in persistent mode +function maybeClearAlwaysOnAvatarDistanceCheck() { + if (alwaysOnAvatarDistanceCheck) { + Script.clearInterval(alwaysOnAvatarDistanceCheck); + alwaysOnAvatarDistanceCheck = false; } } @@ -313,12 +327,6 @@ function makeNameTag(uuid) { var nameTagPosition = jointInObjectFrame.y + scaledDimenionsYHalf + ABOVE_HEAD_OFFSET; var localPosition = [0, nameTagPosition, 0]; - var visible = true; - if (avatarNametagMode === "alwaysOn") { - var currentDistance = getDistance(uuid, CHECK_AVATAR, false); - visible = currentDistance > MAX_RADIUS_IGNORE_METERS ? false : true; - } - nametag .add("leftMargin", lineHeight * LEFT_MARGIN_SCALER) .add("rightMargin", lineHeight * RIGHT_MARGIN_SCALER) @@ -328,7 +336,6 @@ function makeNameTag(uuid) { .add("dimensions", scaledDimensions) .add("parentID", parentID) .add("localPosition", localPosition) - .add("visible", visible) .create(CLEAR_ENTITY_EDIT_PROPS); Script.setTimeout(function () { @@ -341,33 +348,45 @@ function makeNameTag(uuid) { var MAX_RADIUS_IGNORE_METERS = 22; var MAX_ON_MODE_DISTANCE = 35; var CHECK_AVATAR = true; -var MIN_DISTANCE = 0.2; +var MIN_DISTANCE_FOR_REDRAW_METERS = 0.1; function maybeRedraw(uuid) { var avatar = _this.avatars[uuid]; getAvatarData(uuid); getDistance(uuid); - var avatarDistance = getDistance(uuid, CHECK_AVATAR, false); - if (avatarNametagMode === "alwaysOn" && avatarDistance > MAX_RADIUS_IGNORE_METERS) { - showHide(uuid, "hide"); - } - - if (avatarNametagMode === "alwaysOn" && avatarDistance < MAX_RADIUS_IGNORE_METERS) { - showHide(uuid, "show"); - } + var distanceDelta = Math.abs(avatar.currentDistance - avatar.previousDistance); var name = getCorrectName(uuid); if (avatar.previousName !== name) { updateName(uuid, name); - } else { + } else if (distanceDelta > MIN_DISTANCE_FOR_REDRAW_METERS) { redraw(uuid); } +} + +// Check to see if we need to add or remove this avatar during always on mode +function maybeAddOrRemoveIntervalCheck() { + AvatarManager + .getAvatarIdentifiers() + .forEach(function (avatar) { + if (avatar) { + var avatarDistance = quickDistanceCheckForNonSelectedAvatars(avatar); + if (avatar && avatarNametagMode === "alwaysOn" && !(avatar in _this.avatars) && avatarDistance < MAX_RADIUS_IGNORE_METERS) { + add(avatar); + return; + } + if (avatarDistance > MAX_RADIUS_IGNORE_METERS) { + maybeRemove(avatar); + } + } + }); } // Handle redrawing if needed +var MIN_DISTANCE = 0.1; function redraw(uuid) { var avatar = _this.avatars[uuid]; @@ -447,7 +466,7 @@ function add(uuid) { _this.selectedAvatars[uuid] = true; if (avatarNametagMode === "alwaysOn") { - entityProps.lifetime = -1; + entityProps.lifetime = ALWAYS_ON_MAX_LIFETIME_IN_SECONDS; } else { entityProps.lifetime = DEFAULT_LIFETIME; } @@ -521,16 +540,20 @@ function removeNametag(uuid) { // #region API -// Create the manager and hook up username signal +// Create the manager. function create() { + if (avatarNametagMode === "alwaysOn") { + handleAvatarNametagMode("alwaysOn"); + } return _this; } -// Destory the manager and disconnect from username signal +// Destroy the manager function destroy() { _this.reset(); + return _this; } @@ -601,7 +624,9 @@ function maybeRemove(uuid) { // Check to see if we need to add this user to our list function maybeAdd(uuid) { - if (uuid && avatarNametagMode === "alwaysOn" && !(uuid in _this.avatars)) { + var avatarDistance = quickDistanceCheckForNonSelectedAvatars(uuid); + + if (uuid && avatarNametagMode === "alwaysOn" && !(uuid in _this.avatars) && avatarDistance < MAX_RADIUS_IGNORE_METERS) { add(uuid); } } @@ -628,6 +653,7 @@ function reset() { removeAllNametags(); _this.avatars = {}; shouldToggleInterval(); + maybeClearAlwaysOnAvatarDistanceCheck(); return _this; } diff --git a/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js b/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js index 9b4d9cfad3..7c23c45674 100644 --- a/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js +++ b/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js @@ -8,8 +8,8 @@ // // Click on someone to get a nametag for them // -var PickRayController = Script.require('./resources/modules/pickRayController.js?' + Date.now()); -var NameTagListManager = Script.require('./resources/modules/nameTagListManager.js?' + Date.now()); +var PickRayController = Script.require('./resources/modules/pickRayController.js'); +var NameTagListManager = Script.require('./resources/modules/nameTagListManager.js'); var pickRayController = new PickRayController(); var nameTagListManager = new NameTagListManager(); @@ -31,6 +31,7 @@ function selectAvatar(uuid, intersection) { // Handles reset of list if you change domains function onDomainChange() { nameTagListManager.reset(); + nameTagListManager.handleAvatarNametagMode(avatarNametagMode); } diff --git a/interface/resources/qml/hifi/tablet/Edit.qml b/scripts/system/create/Edit.qml similarity index 100% rename from interface/resources/qml/hifi/tablet/Edit.qml rename to scripts/system/create/Edit.qml diff --git a/interface/resources/qml/hifi/tablet/EditEntityList.qml b/scripts/system/create/EditEntityList.qml similarity index 87% rename from interface/resources/qml/hifi/tablet/EditEntityList.qml rename to scripts/system/create/EditEntityList.qml index 2afaa8cd82..94935c7bb5 100644 --- a/interface/resources/qml/hifi/tablet/EditEntityList.qml +++ b/scripts/system/create/EditEntityList.qml @@ -1,8 +1,8 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 import QtWebChannel 1.0 -import "../../controls" -import "../toolbars" +import controls 1.0 +import hifi.toolbars 1.0 import QtGraphicalEffects 1.0 import controlsUit 1.0 as HifiControls import stylesUit 1.0 diff --git a/interface/resources/qml/hifi/tablet/EditTabButton.qml b/scripts/system/create/EditTabButton.qml similarity index 100% rename from interface/resources/qml/hifi/tablet/EditTabButton.qml rename to scripts/system/create/EditTabButton.qml diff --git a/interface/resources/qml/hifi/tablet/EditTabView.qml b/scripts/system/create/EditTabView.qml similarity index 94% rename from interface/resources/qml/hifi/tablet/EditTabView.qml rename to scripts/system/create/EditTabView.qml index 87db317b17..7e8789487c 100644 --- a/interface/resources/qml/hifi/tablet/EditTabView.qml +++ b/scripts/system/create/EditTabView.qml @@ -1,8 +1,8 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 import QtWebChannel 1.0 -import "../../controls" -import "../toolbars" +import controls 1.0 +import hifi.toolbars 1.0 import QtGraphicalEffects 1.0 import controlsUit 1.0 as HifiControls import stylesUit 1.0 @@ -72,7 +72,7 @@ TabBar { NewEntityButton { - icon: "icons/create-icons/94-model-01.svg" + icon: "create-icons/94-model-01.svg" text: "MODEL" onClicked: { editRoot.sendToScript({ @@ -84,7 +84,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/21-cube-01.svg" + icon: "create-icons/21-cube-01.svg" text: "SHAPE" onClicked: { editRoot.sendToScript({ @@ -96,7 +96,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/24-light-01.svg" + icon: "create-icons/24-light-01.svg" text: "LIGHT" onClicked: { editRoot.sendToScript({ @@ -108,7 +108,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/20-text-01.svg" + icon: "create-icons/20-text-01.svg" text: "TEXT" onClicked: { editRoot.sendToScript({ @@ -120,7 +120,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/image.svg" + icon: "create-icons/image.svg" text: "IMAGE" onClicked: { editRoot.sendToScript({ @@ -132,7 +132,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/25-web-1-01.svg" + icon: "create-icons/25-web-1-01.svg" text: "WEB" onClicked: { editRoot.sendToScript({ @@ -144,7 +144,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/23-zone-01.svg" + icon: "create-icons/23-zone-01.svg" text: "ZONE" onClicked: { editRoot.sendToScript({ @@ -156,7 +156,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/90-particles-01.svg" + icon: "create-icons/90-particles-01.svg" text: "PARTICLE" onClicked: { editRoot.sendToScript({ @@ -168,7 +168,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/126-material-01.svg" + icon: "create-icons/126-material-01.svg" text: "MATERIAL" onClicked: { editRoot.sendToScript({ diff --git a/interface/resources/qml/hifi/tablet/EditTools.qml b/scripts/system/create/EditTools.qml similarity index 95% rename from interface/resources/qml/hifi/tablet/EditTools.qml rename to scripts/system/create/EditTools.qml index 976e98cd50..468935b287 100644 --- a/interface/resources/qml/hifi/tablet/EditTools.qml +++ b/scripts/system/create/EditTools.qml @@ -37,7 +37,7 @@ StackView { } function pushSource(path) { - var item = Qt.createComponent(Qt.resolvedUrl("../../" + path)); + var item = Qt.createComponent(Qt.resolvedUrl(path)); editRoot.push(item, itemProperties, StackView.Immediate); editRoot.currentItem.sendToScript.connect(editRoot.sendToScript); diff --git a/interface/resources/qml/hifi/tablet/EditToolsTabView.qml b/scripts/system/create/EditToolsTabView.qml similarity index 94% rename from interface/resources/qml/hifi/tablet/EditToolsTabView.qml rename to scripts/system/create/EditToolsTabView.qml index 1f062815b6..a333acc586 100644 --- a/interface/resources/qml/hifi/tablet/EditToolsTabView.qml +++ b/scripts/system/create/EditToolsTabView.qml @@ -1,8 +1,8 @@ import QtQuick 2.7 import QtQuick.Controls 2.2 import QtWebChannel 1.0 -import "../../controls" -import "../toolbars" +import controls 1.0 +import hifi.toolbars 1.0 import QtGraphicalEffects 1.0 import controlsUit 1.0 as HifiControls import stylesUit 1.0 @@ -78,7 +78,7 @@ TabBar { NewEntityButton { - icon: "icons/create-icons/94-model-01.svg" + icon: "create-icons/94-model-01.svg" text: "MODEL" onClicked: { editRoot.sendToScript({ @@ -90,7 +90,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/21-cube-01.svg" + icon: "create-icons/21-cube-01.svg" text: "SHAPE" onClicked: { editRoot.sendToScript({ @@ -102,7 +102,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/24-light-01.svg" + icon: "create-icons/24-light-01.svg" text: "LIGHT" onClicked: { editRoot.sendToScript({ @@ -114,7 +114,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/20-text-01.svg" + icon: "create-icons/20-text-01.svg" text: "TEXT" onClicked: { editRoot.sendToScript({ @@ -126,7 +126,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/image.svg" + icon: "create-icons/image.svg" text: "IMAGE" onClicked: { editRoot.sendToScript({ @@ -138,7 +138,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/25-web-1-01.svg" + icon: "create-icons/25-web-1-01.svg" text: "WEB" onClicked: { editRoot.sendToScript({ @@ -150,7 +150,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/23-zone-01.svg" + icon: "create-icons/23-zone-01.svg" text: "ZONE" onClicked: { editRoot.sendToScript({ @@ -162,7 +162,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/90-particles-01.svg" + icon: "create-icons/90-particles-01.svg" text: "PARTICLE" onClicked: { editRoot.sendToScript({ @@ -174,7 +174,7 @@ TabBar { } NewEntityButton { - icon: "icons/create-icons/126-material-01.svg" + icon: "create-icons/126-material-01.svg" text: "MATERIAL" onClicked: { editRoot.sendToScript({ diff --git a/interface/resources/qml/hifi/tablet/EntityList.qml b/scripts/system/create/EntityList.qml similarity index 100% rename from interface/resources/qml/hifi/tablet/EntityList.qml rename to scripts/system/create/EntityList.qml diff --git a/interface/resources/qml/hifi/tablet/NewEntityButton.qml b/scripts/system/create/NewEntityButton.qml similarity index 92% rename from interface/resources/qml/hifi/tablet/NewEntityButton.qml rename to scripts/system/create/NewEntityButton.qml index 1952ef7ee8..9c210ac95a 100644 --- a/interface/resources/qml/hifi/tablet/NewEntityButton.qml +++ b/scripts/system/create/NewEntityButton.qml @@ -6,7 +6,7 @@ Item { id: newEntityButton property var uuid; property string text: "ENTITY" - property string icon: "icons/edit-icon.svg" + property string icon: Path.resources + "icons/edit-icon.svg" property string activeText: newEntityButton.text property string activeIcon: newEntityButton.icon property bool isActive: false @@ -47,14 +47,6 @@ Item { anchors.topMargin: 0 } - function urlHelper(src) { - if (src.match(/\bhttp/)) { - return src; - } else { - return "../../../" + src; - } - } - Rectangle { id: buttonOutline color: "#00000000" @@ -96,7 +88,7 @@ Item { anchors.bottomMargin: 5 anchors.horizontalCenter: parent.horizontalCenter fillMode: Image.Stretch - source: newEntityButton.urlHelper(newEntityButton.icon) + source: newEntityButton.icon } ColorOverlay { diff --git a/interface/resources/qml/hifi/tablet/NewMaterialDialog.qml b/scripts/system/create/NewMaterialDialog.qml similarity index 99% rename from interface/resources/qml/hifi/tablet/NewMaterialDialog.qml rename to scripts/system/create/NewMaterialDialog.qml index dde372648b..75570327e0 100644 --- a/interface/resources/qml/hifi/tablet/NewMaterialDialog.qml +++ b/scripts/system/create/NewMaterialDialog.qml @@ -15,7 +15,7 @@ import QtQuick.Dialogs 1.2 as OriginalDialogs import stylesUit 1.0 import controlsUit 1.0 -import "../dialogs" +import dialogs 1.0 Rectangle { id: newMaterialDialog diff --git a/interface/resources/qml/hifi/tablet/NewMaterialWindow.qml b/scripts/system/create/NewMaterialWindow.qml similarity index 100% rename from interface/resources/qml/hifi/tablet/NewMaterialWindow.qml rename to scripts/system/create/NewMaterialWindow.qml diff --git a/interface/resources/qml/hifi/tablet/NewModelDialog.qml b/scripts/system/create/NewModelDialog.qml similarity index 99% rename from interface/resources/qml/hifi/tablet/NewModelDialog.qml rename to scripts/system/create/NewModelDialog.qml index 9540979479..1ded00d701 100644 --- a/interface/resources/qml/hifi/tablet/NewModelDialog.qml +++ b/scripts/system/create/NewModelDialog.qml @@ -14,7 +14,7 @@ import QtQuick.Dialogs 1.2 as OriginalDialogs import stylesUit 1.0 import controlsUit 1.0 -import "../dialogs" +import dialogs 1.0 Rectangle { id: newModelDialog diff --git a/interface/resources/qml/hifi/tablet/NewModelWindow.qml b/scripts/system/create/NewModelWindow.qml similarity index 100% rename from interface/resources/qml/hifi/tablet/NewModelWindow.qml rename to scripts/system/create/NewModelWindow.qml diff --git a/interface/resources/icons/create-icons/126-material-01.svg b/scripts/system/create/create-icons/126-material-01.svg similarity index 100% rename from interface/resources/icons/create-icons/126-material-01.svg rename to scripts/system/create/create-icons/126-material-01.svg diff --git a/interface/resources/icons/create-icons/20-text-01.svg b/scripts/system/create/create-icons/20-text-01.svg similarity index 100% rename from interface/resources/icons/create-icons/20-text-01.svg rename to scripts/system/create/create-icons/20-text-01.svg diff --git a/interface/resources/icons/create-icons/21-cube-01.svg b/scripts/system/create/create-icons/21-cube-01.svg similarity index 100% rename from interface/resources/icons/create-icons/21-cube-01.svg rename to scripts/system/create/create-icons/21-cube-01.svg diff --git a/interface/resources/icons/create-icons/22-sphere-01.svg b/scripts/system/create/create-icons/22-sphere-01.svg similarity index 100% rename from interface/resources/icons/create-icons/22-sphere-01.svg rename to scripts/system/create/create-icons/22-sphere-01.svg diff --git a/interface/resources/icons/create-icons/23-zone-01.svg b/scripts/system/create/create-icons/23-zone-01.svg similarity index 100% rename from interface/resources/icons/create-icons/23-zone-01.svg rename to scripts/system/create/create-icons/23-zone-01.svg diff --git a/interface/resources/icons/create-icons/24-light-01.svg b/scripts/system/create/create-icons/24-light-01.svg similarity index 100% rename from interface/resources/icons/create-icons/24-light-01.svg rename to scripts/system/create/create-icons/24-light-01.svg diff --git a/interface/resources/icons/create-icons/25-web-1-01.svg b/scripts/system/create/create-icons/25-web-1-01.svg similarity index 100% rename from interface/resources/icons/create-icons/25-web-1-01.svg rename to scripts/system/create/create-icons/25-web-1-01.svg diff --git a/interface/resources/icons/create-icons/90-particles-01.svg b/scripts/system/create/create-icons/90-particles-01.svg similarity index 100% rename from interface/resources/icons/create-icons/90-particles-01.svg rename to scripts/system/create/create-icons/90-particles-01.svg diff --git a/interface/resources/icons/create-icons/94-model-01.svg b/scripts/system/create/create-icons/94-model-01.svg similarity index 100% rename from interface/resources/icons/create-icons/94-model-01.svg rename to scripts/system/create/create-icons/94-model-01.svg diff --git a/interface/resources/icons/create-icons/image.svg b/scripts/system/create/create-icons/image.svg similarity index 100% rename from interface/resources/icons/create-icons/image.svg rename to scripts/system/create/create-icons/image.svg diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 371a8d48ca..cf99f3a618 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -45,7 +45,7 @@ var MAX_DEFAULT_ENTITY_LIST_HEIGHT = 942; var DEFAULT_IMAGE = "https://hifi-content.s3.amazonaws.com/DomainContent/production/no-image.jpg"; var createToolsWindow = new CreateWindow( - Script.resourcesPath() + "qml/hifi/tablet/EditTools.qml", + Script.resolvePath("create/EditTools.qml"), 'Create Tools', 'com.highfidelity.create.createToolsWindow', function () { @@ -812,7 +812,7 @@ var toolBar = (function () { tablet.screenChanged.connect(function (type, url) { var isGoingToHomescreenOnDesktop = (!shouldUseEditTabletApp() && (url === 'hifi/tablet/TabletHome.qml' || url === '')); - if (isActive && (type !== "QML" || url !== "hifi/tablet/Edit.qml") && !isGoingToHomescreenOnDesktop) { + if (isActive && (type !== "QML" || url !== Script.resolvePath("create/Edit.qml")) && !isGoingToHomescreenOnDesktop) { that.setActive(false); } }); @@ -841,10 +841,10 @@ var toolBar = (function () { if (shouldUseEditTabletApp()) { // tablet version of new-model dialog var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); - tablet.pushOntoStack("hifi/tablet/New" + entityType + "Dialog.qml"); + tablet.pushOntoStack(Script.resolvePath("create/New" + entityType + "Dialog.qml")); } else { closeExistingDialogWindow(); - var qmlPath = Script.resourcesPath() + "qml/hifi/tablet/New" + entityType + "Window.qml"; + var qmlPath = Script.resolvePath("create/New" + entityType + "Window.qml"); var DIALOG_WINDOW_SIZE = { x: 500, y: 300 }; dialogWindow = Desktop.createWindow(qmlPath, { title: "New " + entityType + " Entity", @@ -965,7 +965,7 @@ var toolBar = (function () { Controller.disableMapping(CONTROLLER_MAPPING_NAME); } else { if (shouldUseEditTabletApp()) { - tablet.loadQMLSource("hifi/tablet/Edit.qml", true); + tablet.loadQMLSource(Script.resolvePath("create/Edit.qml"), true); } else { // make other apps inactive while in desktop mode tablet.gotoHomeScreen(); diff --git a/scripts/system/libraries/entityList.js b/scripts/system/libraries/entityList.js index 6498c92f17..585e4e06a5 100644 --- a/scripts/system/libraries/entityList.js +++ b/scripts/system/libraries/entityList.js @@ -37,7 +37,7 @@ EntityListTool = function(shouldUseEditTabletApp) { var ENTITY_LIST_WIDTH = 495; var MAX_DEFAULT_CREATE_TOOLS_HEIGHT = 778; var entityListWindow = new CreateWindow( - Script.resolvePath("EditEntityList.qml"), + Script.resolvePath("../create/EditEntityList.qml"), 'Entity List', 'com.highfidelity.create.entityListWindow', function () { diff --git a/tools/nitpick/src/TestRunnerDesktop.cpp b/tools/nitpick/src/TestRunnerDesktop.cpp index b9caaa0ecb..acb5cc77b9 100644 --- a/tools/nitpick/src/TestRunnerDesktop.cpp +++ b/tools/nitpick/src/TestRunnerDesktop.cpp @@ -265,8 +265,8 @@ void TestRunnerDesktop::runInstaller() { folderName += QString(" - ") + getPRNumberFromURL(_url->text()); } - script.write((QString("cp -rf \"$VOLUME/") + folderName + "/interface.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); - script.write((QString("cp -rf \"$VOLUME/") + folderName + "/Sandbox.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); + script.write((QString("cp -Rf \"$VOLUME/") + folderName + "/interface.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); + script.write((QString("cp -Rf \"$VOLUME/") + folderName + "/Sandbox.app\" \"" + _workingFolder + "/High_Fidelity/\"\n").toStdString().c_str()); script.write("hdiutil detach \"$VOLUME\"\n"); script.write("killall yes\n");