From 19c3f1516f4bc4b572bf4eea8ed4d9dc4879e0be Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Tue, 9 Oct 2018 00:17:19 +0300 Subject: [PATCH 01/15] relax 'isWearable' conditions to treat entities like 'ghost.json' as wearables --- interface/src/avatar/MyAvatar.cpp | 2 -- scripts/system/avatarapp.js | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index b347963cf1..f683e518e9 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -1765,8 +1765,6 @@ void MyAvatar::setSkeletonModelURL(const QUrl& skeletonModelURL) { bool isWearableEntity(const EntityItemPointer& entity) { return entity->isVisible() - && (entity->getParentJointIndex() != INVALID_JOINT_INDEX - || (entity->getType() == EntityTypes::Model && (std::static_pointer_cast(entity))->getRelayParentJoints())) && (entity->getParentID() == DependencyManager::get()->getSessionUUID() || entity->getParentID() == AVATAR_SELF_ID); } diff --git a/scripts/system/avatarapp.js b/scripts/system/avatarapp.js index 10ccb66d96..858671badf 100644 --- a/scripts/system/avatarapp.js +++ b/scripts/system/avatarapp.js @@ -28,9 +28,8 @@ function executeLater(callback) { Script.setTimeout(callback, 300); } -var INVALID_JOINT_INDEX = -1 function isWearable(avatarEntity) { - return avatarEntity.properties.visible === true && (avatarEntity.properties.parentJointIndex !== INVALID_JOINT_INDEX || avatarEntity.properties.relayParentJoints === true) && + return avatarEntity.properties.visible === true && (avatarEntity.properties.parentID === MyAvatar.sessionUUID || avatarEntity.properties.parentID === MyAvatar.SELF_ID); } From 7d470cf1610a37228e30b4a5103d873458da9b6b Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Tue, 9 Oct 2018 01:59:41 +0300 Subject: [PATCH 02/15] FB18859 - Avatar App Bug when material entity is added as avatar entity --- .../qml/hifi/avatarapp/AdjustWearables.qml | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml index 5fff14e4a1..9fc3e51f2a 100644 --- a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml +++ b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml @@ -49,16 +49,32 @@ Rectangle { refresh(avatar); } + function extractTitleFromUrl(url) { + for (var j = (url.length - 1); j >= 0; --j) { + if (url[j] === '/') { + return url.substring(j + 1); + } + } + return url; + } + function refresh(avatar) { wearablesCombobox.model.clear(); wearablesCombobox.currentIndex = -1; for (var i = 0; i < avatar.wearables.count; ++i) { var wearable = avatar.wearables.get(i).properties; - for (var j = (wearable.modelURL.length - 1); j >= 0; --j) { - if (wearable.modelURL[j] === '/') { - wearable.text = wearable.modelURL.substring(j + 1); - break; + if (wearable.modelURL) { + wearable.text = extractTitleFromUrl(wearable.modelURL); + } else if (wearable.materialURL) { + var materialUrlOrJson = ''; + if (wearable.materialURL !== 'materialData') { + materialUrlOrJson = extractTitleFromUrl(wearable.materialURL); + } else if (wearable.materialData) { + materialUrlOrJson = JSON.stringify(JSON.parse(wearable.materialData)) + } + if(materialUrlOrJson) { + wearable.text = 'Material: ' + materialUrlOrJson; } } wearablesCombobox.model.append(wearable); From 6e66f289fe96db9a051200461154afacede1b5a5 Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Tue, 9 Oct 2018 23:08:14 +0300 Subject: [PATCH 03/15] take 'materialData?materialName' cases into account --- interface/resources/qml/hifi/avatarapp/AdjustWearables.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml index 9fc3e51f2a..a6c90197d7 100644 --- a/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml +++ b/interface/resources/qml/hifi/avatarapp/AdjustWearables.qml @@ -68,7 +68,7 @@ Rectangle { wearable.text = extractTitleFromUrl(wearable.modelURL); } else if (wearable.materialURL) { var materialUrlOrJson = ''; - if (wearable.materialURL !== 'materialData') { + if (!wearable.materialURL.startsWith('materialData')) { materialUrlOrJson = extractTitleFromUrl(wearable.materialURL); } else if (wearable.materialData) { materialUrlOrJson = JSON.stringify(JSON.parse(wearable.materialData)) From 48a48883b0af734d8bf4bba46a5b2cf99b1e4ab5 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Thu, 18 Oct 2018 16:42:22 -0700 Subject: [PATCH 04/15] Add logging to the windows installer to track install options and install steps --- cmake/templates/CPackProperties.cmake.in | 1 + cmake/templates/NSIS.template.in | 33 +++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/cmake/templates/CPackProperties.cmake.in b/cmake/templates/CPackProperties.cmake.in index cb6474b010..73f52d72bf 100644 --- a/cmake/templates/CPackProperties.cmake.in +++ b/cmake/templates/CPackProperties.cmake.in @@ -54,3 +54,4 @@ set(CLIENT_COMPONENT_CONDITIONAL "@CLIENT_COMPONENT_CONDITIONAL@") set(INSTALLER_TYPE "@INSTALLER_TYPE@") set(APP_USER_MODEL_ID "@APP_USER_MODEL_ID@") set(BYPASS_SIGNING "@BYPASS_SIGNING@") +set(HF_CMAKE_DIR "@HF_CMAKE_DIR@") diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index fd48a792dc..4a9b67d843 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -28,6 +28,11 @@ !include "WinVer.nsh" +;-------------------------------- +;Include Installer Logging + !addincludedir "@HF_CMAKE_DIR@\installer" + !include "TextLog.nsh" + ;-------------------------------- ; Utilities and Functions ;-------------------------------- @@ -375,6 +380,10 @@ Var GAClientID !insertmacro CreateGUID $GAClientID !macroend +!macro LogStep Category Action Label Value + ${LogText} "Step: ${Category} ${Action} ${Label} ${Value}" +!macroend + !macro GoogleAnalytics Category Action Label Value ${If} "@GA_TRACKING_ID@" != "" Push $0 @@ -557,11 +566,13 @@ Var Express !macro MaybeSkipPage ; Check if Express is set, if so, abort the post install options page ${If} $Express == "1" + ${LogText} "Express Install: Skipping Post Install Options Page" Abort ${EndIf} !macroend !macro DownloadSlideshowImages + ${LogText} "Download Slideshow Images" InitPluginsDir Push $0 @@ -583,32 +594,40 @@ Var Express !macroend Function OnUserAbort + !insertmacro LogStep "Installer" "Abort" "User Abort" "" !insertmacro GoogleAnalytics "Installer" "Abort" "User Abort" "" FunctionEnd Function PageWelcomePre + !insertmacro LogStep "Installer" "Welcome" "" "" !insertmacro GoogleAnalytics "Installer" "Welcome" "" "" !insertmacro DownloadSlideshowImages FunctionEnd Function PageLicensePre + !insertmacro LogStep "Installer" "License" "" "" !insertmacro GoogleAnalytics "Installer" "License" "" "" FunctionEnd Function PageDirectoryPre !insertmacro MaybeSkipPage + !insertmacro LogStep "Installer" "Directory" "" "" !insertmacro GoogleAnalytics "Installer" "Directory" "" "" FunctionEnd Function PageStartMenuPre !insertmacro MaybeSkipPage + !insertmacro LogStep "Installer" "StartMenu" "" "" !insertmacro GoogleAnalytics "Installer" "StartMenu" "" "" FunctionEnd Function PageComponentsPre !insertmacro MaybeSkipPage + !insertmacro LogStep "Installer" "Components" "" "" !insertmacro GoogleAnalytics "Installer" "Components" "" "" FunctionEnd Function PageInstallFilesPre + !insertmacro LogStep "Installer" "Install" "" "" !insertmacro GoogleAnalytics "Installer" "Install" "" "" FunctionEnd !macro SetInstallOption Checkbox OptionName Default + ${LogText} "SetInstallOption ${OptionName} ${Default}" ; reads the value for the given install option to the registry ReadRegStr $0 HKLM "@REGISTRY_HKLM_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\@POST_INSTALL_OPTIONS_REG_GROUP@" "${OptionName}" @@ -625,6 +644,7 @@ FunctionEnd !macroend Function InstallTypesPage + !insertmacro LogStep "Installer" "Install Types" "" "" !insertmacro GoogleAnalytics "Installer" "Install Types" "" "" !insertmacro MUI_HEADER_TEXT "Choose Installation Type" "Express or Custom Install" @@ -688,6 +708,7 @@ FunctionEnd Function StartInstallSlideshow ; create a slideshow file based on what files we have available + ${LogText} "Start Installs Slideshow" ; stash $0 and $1 Push $0 @@ -730,7 +751,11 @@ Function StartInstallSlideshow FunctionEnd Function PostInstallOptionsPage + + ${LogText} "Install Directory: $INSTDIR" + !insertmacro MaybeSkipPage + !insertmacro LogStep "Installer" "Post Install Options" "" "" !insertmacro GoogleAnalytics "Installer" "Post Install Options" "" "" !insertmacro MUI_HEADER_TEXT "Setup Options" "" @@ -1225,6 +1250,7 @@ Section "-Core installation" ; Handle whichever post install options were set Call HandlePostInstallOptions + !insertmacro LogStep "Installer" "Done" "" "" !insertmacro GoogleAnalytics "Installer" "Done" "" "" SectionEnd @@ -1232,7 +1258,6 @@ SectionEnd !macro PromptForRunningApplication applicationName displayName action prompter !define UniqueID ${__LINE__} - Prompt_${UniqueID}: ${nsProcess::FindProcess} ${applicationName} $R0 @@ -1478,6 +1503,11 @@ InstallDirRegKey HKLM "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_RE Function .onInit + Delete "$TEMP\hifi_install.log" + ${LogSetFileName} "$TEMP\hifi_install.log" + ${LogSetOn} + ${LogText} "In .onInit" + !ifdef INNER ; If INNER is defined, then we aren't supposed to do anything except write out ; the installer. This is better than processing a command line option as it means @@ -1495,6 +1525,7 @@ Function .onInit !insertmacro GoogleAnalytics "Installer" "Start" "$CampaignName" "" ; make sure none of the installed applications are still running + ${LogText} "Checking For Running Applications" !insertmacro CheckForRunningApplications "installed" "Installer" ${nsProcess::Unload} From 659302d20fe004759f08276f22074bf6b774fec1 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Thu, 18 Oct 2018 17:06:09 -0700 Subject: [PATCH 05/15] Include TextLog logging include file for NSIS --- cmake/installer/TextLog.nsh | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 cmake/installer/TextLog.nsh diff --git a/cmake/installer/TextLog.nsh b/cmake/installer/TextLog.nsh new file mode 100644 index 0000000000..a61ea1531e --- /dev/null +++ b/cmake/installer/TextLog.nsh @@ -0,0 +1,68 @@ +# TextLog.nsh v1.1 - 2005-12-26 +# Written by Mike Schinkel [http://www.mikeschinkel.com/blog/] + +Var /GLOBAL __TextLog_FileHandle +Var /GLOBAL __TextLog_FileName +Var /GLOBAL __TextLog_State + +!define LogMsg '!insertmacro LogMsgCall' +!macro LogMsgCall _text + Call LogSetOn + Push "${_text}" + Call LogText + Call LogSetOff +!macroend + + +!define LogText '!insertmacro LogTextCall' +!macro LogTextCall _text + Push "${_text}" + Call LogText +!macroend + +Function LogText + Exch $0 ; pABC -> 0ABC + FileWrite $__TextLog_FileHandle "$0$\r$\n" + Pop $0 ; 0ABC -> ABC +FunctionEnd + +!define LogSetFileName '!insertmacro LogSetFileNameCall' +!macro LogSetFileNameCall _filename + Push "${_filename}" + Call LogSetFileName +!macroend + +Function LogSetFileName + Exch $0 ; pABC -> 0ABC + StrCpy $__TextLog_FileName "$0" + StrCmp $__TextLog_State "open" +1 +3 + Call LogSetOff + Call LogSetOn + Pop $0 ; 0ABC -> ABC +FunctionEnd + +!define LogSetOn '!insertmacro LogSetOnCall' +!macro LogSetOnCall + Call LogSetOn +!macroend + +Function LogSetOn + StrCmp $__TextLog_FileName "" +1 AlreadySet + StrCpy $__TextLog_FileName "$INSTDIR\install.log" +AlreadySet: + StrCmp $__TextLog_State "open" +2 + FileOpen $__TextLog_FileHandle "$__TextLog_FileName" a + FileSeek $__TextLog_FileHandle 0 END + StrCpy $__TextLog_State "open" +FunctionEnd + +!define LogSetOff '!insertmacro LogSetOffCall' +!macro LogSetOffCall + Call LogSetOff +!macroend + +Function LogSetOff + StrCmp $__TextLog_State "open" +1 +2 + FileClose $__TextLog_FileHandle + StrCpy $__TextLog_State "" +FunctionEnd \ No newline at end of file From 2755cbcf4fb792e3816f402e45a5871cb29f3ed8 Mon Sep 17 00:00:00 2001 From: SamGondelman Date: Tue, 23 Oct 2018 12:00:50 -0700 Subject: [PATCH 06/15] enable interaction with locked web entity --- .../src/RenderableWebEntityItem.cpp | 12 +++--------- .../entities-renderer/src/RenderableWebEntityItem.h | 1 - 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp index bc9ac84c91..d7fb20009b 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp @@ -108,10 +108,6 @@ bool WebEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPointe return true; } - if (_lastLocked != entity->getLocked()) { - return true; - } - return false; } @@ -203,7 +199,6 @@ void WebEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene } _lastDPI = entity->getDPI(); - _lastLocked = entity->getLocked(); glm::vec2 windowSize = getWindowSize(entity); _webSurface->resize(QSize(windowSize.x, windowSize.y)); @@ -361,7 +356,7 @@ glm::vec2 WebEntityRenderer::getWindowSize(const TypedEntityPointer& entity) con } void WebEntityRenderer::hoverEnterEntity(const PointerEvent& event) { - if (!_lastLocked && _webSurface) { + if (_webSurface) { PointerEvent webEvent = event; webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _lastDPI)); _webSurface->hoverBeginEvent(webEvent, _touchDevice); @@ -369,7 +364,7 @@ void WebEntityRenderer::hoverEnterEntity(const PointerEvent& event) { } void WebEntityRenderer::hoverLeaveEntity(const PointerEvent& event) { - if (!_lastLocked && _webSurface) { + if (_webSurface) { PointerEvent webEvent = event; webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _lastDPI)); _webSurface->hoverEndEvent(webEvent, _touchDevice); @@ -377,8 +372,7 @@ void WebEntityRenderer::hoverLeaveEntity(const PointerEvent& event) { } void WebEntityRenderer::handlePointerEvent(const PointerEvent& event) { - // Ignore mouse interaction if we're locked - if (!_lastLocked && _webSurface) { + if (_webSurface) { PointerEvent webEvent = event; webEvent.setPos2D(event.getPos2D() * (METERS_TO_INCHES * _lastDPI)); _webSurface->handlePointerEvent(webEvent, _touchDevice); diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.h b/libraries/entities-renderer/src/RenderableWebEntityItem.h index 1ba8ed0ec7..12640f697d 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.h +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.h @@ -65,7 +65,6 @@ private: gpu::TexturePointer _texture; QString _lastSourceUrl; uint16_t _lastDPI; - bool _lastLocked; QTimer _timer; uint64_t _lastRenderTime { 0 }; }; From 1dc96fec79065ca4b2bed34bdd6b147cae158a82 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Tue, 30 Oct 2018 12:13:46 -0700 Subject: [PATCH 07/15] Implement CR comments for installer text logging --- cmake/installer/TextLog.nsh | 68 ----------------------- cmake/templates/CPackProperties.cmake.in | 1 - cmake/templates/NSIS.template.in | 71 +++++++++++++++++++++++- 3 files changed, 69 insertions(+), 71 deletions(-) delete mode 100644 cmake/installer/TextLog.nsh diff --git a/cmake/installer/TextLog.nsh b/cmake/installer/TextLog.nsh deleted file mode 100644 index a61ea1531e..0000000000 --- a/cmake/installer/TextLog.nsh +++ /dev/null @@ -1,68 +0,0 @@ -# TextLog.nsh v1.1 - 2005-12-26 -# Written by Mike Schinkel [http://www.mikeschinkel.com/blog/] - -Var /GLOBAL __TextLog_FileHandle -Var /GLOBAL __TextLog_FileName -Var /GLOBAL __TextLog_State - -!define LogMsg '!insertmacro LogMsgCall' -!macro LogMsgCall _text - Call LogSetOn - Push "${_text}" - Call LogText - Call LogSetOff -!macroend - - -!define LogText '!insertmacro LogTextCall' -!macro LogTextCall _text - Push "${_text}" - Call LogText -!macroend - -Function LogText - Exch $0 ; pABC -> 0ABC - FileWrite $__TextLog_FileHandle "$0$\r$\n" - Pop $0 ; 0ABC -> ABC -FunctionEnd - -!define LogSetFileName '!insertmacro LogSetFileNameCall' -!macro LogSetFileNameCall _filename - Push "${_filename}" - Call LogSetFileName -!macroend - -Function LogSetFileName - Exch $0 ; pABC -> 0ABC - StrCpy $__TextLog_FileName "$0" - StrCmp $__TextLog_State "open" +1 +3 - Call LogSetOff - Call LogSetOn - Pop $0 ; 0ABC -> ABC -FunctionEnd - -!define LogSetOn '!insertmacro LogSetOnCall' -!macro LogSetOnCall - Call LogSetOn -!macroend - -Function LogSetOn - StrCmp $__TextLog_FileName "" +1 AlreadySet - StrCpy $__TextLog_FileName "$INSTDIR\install.log" -AlreadySet: - StrCmp $__TextLog_State "open" +2 - FileOpen $__TextLog_FileHandle "$__TextLog_FileName" a - FileSeek $__TextLog_FileHandle 0 END - StrCpy $__TextLog_State "open" -FunctionEnd - -!define LogSetOff '!insertmacro LogSetOffCall' -!macro LogSetOffCall - Call LogSetOff -!macroend - -Function LogSetOff - StrCmp $__TextLog_State "open" +1 +2 - FileClose $__TextLog_FileHandle - StrCpy $__TextLog_State "" -FunctionEnd \ No newline at end of file diff --git a/cmake/templates/CPackProperties.cmake.in b/cmake/templates/CPackProperties.cmake.in index 73f52d72bf..cb6474b010 100644 --- a/cmake/templates/CPackProperties.cmake.in +++ b/cmake/templates/CPackProperties.cmake.in @@ -54,4 +54,3 @@ set(CLIENT_COMPONENT_CONDITIONAL "@CLIENT_COMPONENT_CONDITIONAL@") set(INSTALLER_TYPE "@INSTALLER_TYPE@") set(APP_USER_MODEL_ID "@APP_USER_MODEL_ID@") set(BYPASS_SIGNING "@BYPASS_SIGNING@") -set(HF_CMAKE_DIR "@HF_CMAKE_DIR@") diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 4a9b67d843..19f661b42b 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -30,8 +30,75 @@ ;-------------------------------- ;Include Installer Logging - !addincludedir "@HF_CMAKE_DIR@\installer" - !include "TextLog.nsh" +; taken from http://nsis.sourceforge.net/Logging:_Simple_Text_File_Logging_Functions_and_Macros +; TextLog.nsh v1.1 - 2005-12-26 +; Written by Mike Schinkel [http://www.mikeschinkel.com/blog/] + + Var /GLOBAL __TextLog_FileHandle + Var /GLOBAL __TextLog_FileName + Var /GLOBAL __TextLog_State + + !define LogMsg '!insertmacro LogMsgCall' + !macro LogMsgCall _text + Call LogSetOn + Push "${_text}" + Call LogText + Call LogSetOff + !macroend + + + !define LogText '!insertmacro LogTextCall' + !macro LogTextCall _text + Push "${_text}" + Call LogText + !macroend + + Function LogText + Exch $0 ; pABC -> 0ABC + FileWrite $__TextLog_FileHandle "$0$\r$\n" + Pop $0 ; 0ABC -> ABC + FunctionEnd + + !define LogSetFileName '!insertmacro LogSetFileNameCall' + !macro LogSetFileNameCall _filename + Push "${_filename}" + Call LogSetFileName + !macroend + + Function LogSetFileName + Exch $0 ; pABC -> 0ABC + StrCpy $__TextLog_FileName "$0" + StrCmp $__TextLog_State "open" +1 +3 + Call LogSetOff + Call LogSetOn + Pop $0 ; 0ABC -> ABC + FunctionEnd + + !define LogSetOn '!insertmacro LogSetOnCall' + !macro LogSetOnCall + Call LogSetOn + !macroend + + Function LogSetOn + StrCmp $__TextLog_FileName "" +1 AlreadySet + StrCpy $__TextLog_FileName "$INSTDIR\install.log" + AlreadySet: + StrCmp $__TextLog_State "open" +2 + FileOpen $__TextLog_FileHandle "$__TextLog_FileName" a + FileSeek $__TextLog_FileHandle 0 END + StrCpy $__TextLog_State "open" + FunctionEnd + + !define LogSetOff '!insertmacro LogSetOffCall' + !macro LogSetOffCall + Call LogSetOff + !macroend + + Function LogSetOff + StrCmp $__TextLog_State "open" +1 +2 + FileClose $__TextLog_FileHandle + StrCpy $__TextLog_State "" + FunctionEnd ;-------------------------------- ; Utilities and Functions From 90e944f130cdba4dc99252683f65183dfea62ec3 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 30 Oct 2018 16:20:33 -0700 Subject: [PATCH 08/15] always zero velocity on near-grab release of non-dynamic --- .../controllerModules/nearParentGrabEntity.js | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js index bbdcbaaa64..f354067a77 100644 --- a/scripts/system/controllers/controllerModules/nearParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/nearParentGrabEntity.js @@ -149,20 +149,12 @@ Script.include("/~/system/libraries/controllers.js"); this.hapticTargetID = null; var props = controllerData.nearbyEntityPropertiesByID[this.targetEntityID]; if (this.thisHandIsParent(props) && !this.robbed) { - if (this.previousParentID[this.targetEntityID] === Uuid.NULL || this.previousParentID === undefined) { - Entities.editEntity(this.targetEntityID, { - parentID: this.previousParentID[this.targetEntityID], - parentJointIndex: this.previousParentJointIndex[this.targetEntityID] - }); - } else { - // we're putting this back as a child of some other parent, so zero its velocity - Entities.editEntity(this.targetEntityID, { - parentID: this.previousParentID[this.targetEntityID], - parentJointIndex: this.previousParentJointIndex[this.targetEntityID], - localVelocity: {x: 0, y: 0, z: 0}, - localAngularVelocity: {x: 0, y: 0, z: 0} - }); - } + Entities.editEntity(this.targetEntityID, { + parentID: this.previousParentID[this.targetEntityID], + parentJointIndex: this.previousParentJointIndex[this.targetEntityID], + localVelocity: {x: 0, y: 0, z: 0}, + localAngularVelocity: {x: 0, y: 0, z: 0} + }); } var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID]; From 225e8e055613526598bfd7181f3d45185711b73b Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Wed, 31 Oct 2018 10:20:21 -0700 Subject: [PATCH 09/15] always zero velocity on far-grab release of non-dynamic --- .../controllers/controllerModules/farParentGrabEntity.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/controllerModules/farParentGrabEntity.js b/scripts/system/controllers/controllerModules/farParentGrabEntity.js index ac6c41d4d6..f85869aa7f 100644 --- a/scripts/system/controllers/controllerModules/farParentGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farParentGrabEntity.js @@ -262,7 +262,9 @@ Script.include("/~/system/libraries/controllers.js"); if (this.thisFarGrabJointIsParent(endProps)) { Entities.editEntity(this.targetEntityID, { parentID: this.previousParentID[this.targetEntityID], - parentJointIndex: this.previousParentJointIndex[this.targetEntityID] + parentJointIndex: this.previousParentJointIndex[this.targetEntityID], + localVelocity: {x: 0, y: 0, z: 0}, + localAngularVelocity: {x: 0, y: 0, z: 0} }); } From 2482bb9731f038be80ed6a4630a8d3301d0bd397 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Wed, 31 Oct 2018 11:07:26 -0700 Subject: [PATCH 10/15] Add logging for install options --- cmake/templates/NSIS.template.in | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmake/templates/NSIS.template.in b/cmake/templates/NSIS.template.in index 19f661b42b..9ce11ca032 100644 --- a/cmake/templates/NSIS.template.in +++ b/cmake/templates/NSIS.template.in @@ -968,30 +968,43 @@ Function ReadPostInstallOptions ; check if the user asked for a desktop shortcut to console ${NSD_GetState} $DesktopConsoleCheckbox $DesktopConsoleState - + ${LogText} "Option: Start Desktop Console: $DesktopConsoleState" + ; check if the user asked to have console launched every startup ${NSD_GetState} $ConsoleStartupCheckbox $ConsoleStartupState + ${LogText} "Option: Start Desktop Console On Startup: $ConsoleStartupState" + ${If} @SERVER_COMPONENT_CONDITIONAL@ + ${LogText} "Option: Install Server" + ${EndIf} + ${If} @CLIENT_COMPONENT_CONDITIONAL@ + ${LogText} "Option: Install Client" ; check if the user asked for a desktop shortcut to High Fidelity ${NSD_GetState} $DesktopClientCheckbox $DesktopClientState + ${LogText} "Option: Create Client Desktop Shortcut: $DesktopClientState" ${EndIf} ${If} @PR_BUILD@ == 1 + ${LogText} "Option: PR Build" ; check if we need to copy settings/content from production for this PR build ${NSD_GetState} $CopyFromProductionCheckbox $CopyFromProductionState + ${LogText} "Option: Copy Settings From Production: $CopyFromProductionState" ${EndIf} ; check if we need to launch the console post-install ${NSD_GetState} $LaunchConsoleNowCheckbox $LaunchConsoleNowState + ${LogText} "Option: Launch Console Now: $LaunchConsoleNowState" ${If} @CLIENT_COMPONENT_CONDITIONAL@ ; check if we need to launch the client post-install ${NSD_GetState} $LaunchClientNowCheckbox $LaunchClientNowState + ${LogText} "Option: Launch Client Now: $LaunchClientNowState" ${EndIf} ; check if the user asked for a clean install ${NSD_GetState} $CleanInstallCheckbox $CleanInstallState + ${LogText} "Option: Clean Install: $CleanInstallState" FunctionEnd Function HandlePostInstallOptions From e64557a46cf908fe664b4638787926bb116a7d53 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 2 Nov 2018 11:52:40 -0700 Subject: [PATCH 11/15] Clamp the fixed-point network values to their limits --- libraries/shared/src/GLMHelpers.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libraries/shared/src/GLMHelpers.cpp b/libraries/shared/src/GLMHelpers.cpp index 1a62227c31..39ee4d2d1d 100644 --- a/libraries/shared/src/GLMHelpers.cpp +++ b/libraries/shared/src/GLMHelpers.cpp @@ -9,6 +9,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include #include "GLMHelpers.h" #include #include "NumericalConstants.h" @@ -76,9 +77,11 @@ glm::quat safeMix(const glm::quat& q1, const glm::quat& q2, float proportion) { // Allows sending of fixed-point numbers: radix 1 makes 15.1 number, radix 8 makes 8.8 number, etc int packFloatScalarToSignedTwoByteFixed(unsigned char* buffer, float scalar, int radix) { - int16_t twoByteFixed = (int16_t)(scalar * (float)(1 << radix)); - memcpy(buffer, &twoByteFixed, sizeof(int16_t)); - return sizeof(int16_t); + using FixedType = int16_t; + FixedType twoByteFixed = (FixedType) glm::clamp(scalar * (1 << radix), (float)std::numeric_limits::min(), + (float)std::numeric_limits::max()); + memcpy(buffer, &twoByteFixed, sizeof(FixedType)); + return sizeof(FixedType); } int unpackFloatScalarFromSignedTwoByteFixed(const int16_t* byteFixedPointer, float* destinationPointer, int radix) { From 26b9e2e162c96425250fca5f85dd93f21c1aeb49 Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 2 Nov 2018 14:47:40 -0700 Subject: [PATCH 12/15] Fix a URL while we're in the file --- libraries/shared/src/GLMHelpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/GLMHelpers.cpp b/libraries/shared/src/GLMHelpers.cpp index 39ee4d2d1d..905bf3ccfd 100644 --- a/libraries/shared/src/GLMHelpers.cpp +++ b/libraries/shared/src/GLMHelpers.cpp @@ -44,8 +44,8 @@ const mat4 Matrices::X_180 { createMatFromQuatAndPos(Quaternions::X_180, Vectors const mat4 Matrices::Y_180 { createMatFromQuatAndPos(Quaternions::Y_180, Vectors::ZERO) }; const mat4 Matrices::Z_180 { createMatFromQuatAndPos(Quaternions::Z_180, Vectors::ZERO) }; -// Safe version of glm::mix; based on the code in Nick Bobick's article, -// http://www.gamasutra.com/features/19980703/quaternions_01.htm (via Clyde, +// Safe version of glm::mix; based on the code in Nick Bobic's article, +// https://www.gamasutra.com/view/feature/131686/rotating_objects_using_quaternions.php?page=1 (via Clyde, // https://github.com/threerings/clyde/blob/master/src/main/java/com/threerings/math/Quaternion.java) glm::quat safeMix(const glm::quat& q1, const glm::quat& q2, float proportion) { float cosa = q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; From a94fd2a1c97350deee39f90b896faa479c62bb6b Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Sat, 3 Nov 2018 13:14:08 -0700 Subject: [PATCH 13/15] only equip an entity to a hand-controller joint if the hand-controllers are in use, else use avatar hand --- scripts/system/controllers/controllerModules/equipEntity.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/controllers/controllerModules/equipEntity.js b/scripts/system/controllers/controllerModules/equipEntity.js index 2f343ff84b..12a69d7b27 100644 --- a/scripts/system/controllers/controllerModules/equipEntity.js +++ b/scripts/system/controllers/controllerModules/equipEntity.js @@ -485,7 +485,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa } var handJointIndex; - if (grabData.grabFollowsController) { + if (HMD.mounted && HMD.isHandControllerAvailable() && grabData.grabFollowsController) { handJointIndex = this.controllerJointIndex; } else { handJointIndex = MyAvatar.getJointIndex(this.hand === RIGHT_HAND ? "RightHand" : "LeftHand"); From 1ce6079c5af4659c9eacc4a7f5965f2300b31df7 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Nov 2018 11:26:18 -0800 Subject: [PATCH 14/15] Remove extra as --- interface/resources/qml/hifi/dialogs/security/Security.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/dialogs/security/Security.qml b/interface/resources/qml/hifi/dialogs/security/Security.qml index 08605033a5..b754cb06ab 100644 --- a/interface/resources/qml/hifi/dialogs/security/Security.qml +++ b/interface/resources/qml/hifi/dialogs/security/Security.qml @@ -15,7 +15,7 @@ import Hifi 1.0 as Hifi import QtQuick 2.5 import QtGraphicalEffects 1.0 import stylesUit 1.0 as HifiStylesUit -import controlsUit 1.0 as as HifiControlsUit +import controlsUit 1.0 as HifiControlsUit import "qrc:////qml//controls" as HifiControls import "qrc:////qml//hifi//commerce//common" as HifiCommerceCommon From 8d325d8dd9fa60f4fda11ca15e7261c8d6ea8994 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Fri, 9 Nov 2018 15:02:57 -0800 Subject: [PATCH 15/15] Actually fix MS19803: Replace missing imports --- .../resources/qml/hifi/dialogs/security/SecurityImageChange.qml | 2 +- .../qml/hifi/dialogs/security/SecurityImageSelection.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/dialogs/security/SecurityImageChange.qml b/interface/resources/qml/hifi/dialogs/security/SecurityImageChange.qml index 82d094144d..e563bd13ca 100644 --- a/interface/resources/qml/hifi/dialogs/security/SecurityImageChange.qml +++ b/interface/resources/qml/hifi/dialogs/security/SecurityImageChange.qml @@ -13,7 +13,7 @@ import Hifi 1.0 as Hifi import QtQuick 2.5 -import stylesUit 1.0 +import stylesUit 1.0 as HifiStylesUit import controlsUit 1.0 as HifiControlsUit import "qrc:////qml//controls" as HifiControls diff --git a/interface/resources/qml/hifi/dialogs/security/SecurityImageSelection.qml b/interface/resources/qml/hifi/dialogs/security/SecurityImageSelection.qml index 366372622c..3451cbcf50 100644 --- a/interface/resources/qml/hifi/dialogs/security/SecurityImageSelection.qml +++ b/interface/resources/qml/hifi/dialogs/security/SecurityImageSelection.qml @@ -13,7 +13,7 @@ import Hifi 1.0 as Hifi import QtQuick 2.5 -import stylesUit 1.0 +import stylesUit 1.0 as HifiStylesUit import controlsUit 1.0 as HifiControlsUit import "qrc:////qml//controls" as HifiControls