From f710eac468e26f2faaaa0e18e8c618ebcf8b6b43 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Tue, 26 Nov 2024 19:02:39 +0000 Subject: [PATCH 01/43] FIRE-34884: Get control avatar name for attached control avatars --- indra/newview/fsfloaterposer.cpp | 27 ++++++++++++++++++++++++++- indra/newview/fsfloaterposer.h | 11 +++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 23e34adf3b..2d4c4c9e9f 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -41,6 +41,7 @@ #include "llviewerwindow.h" #include "llwindow.h" #include "llvoavatarself.h" +#include "llinventoryfunctions.h" namespace { @@ -2018,12 +2019,17 @@ void FSFloaterPoser::onAvatarsRefresh() if (!couldAnimateAvatar(avatar)) continue; + LLAvatarName av_name; + std::string animeshName = getControlAvatarName(avatar); + if (animeshName.empty()) + animeshName = avatar->getFullname(); + LLSD row; row["columns"][COL_ICON]["column"] = "icon"; row["columns"][COL_ICON]["type"] = "icon"; row["columns"][COL_ICON]["value"] = iconObjectName; row["columns"][COL_NAME]["column"] = "name"; - row["columns"][COL_NAME]["value"] = avatar->getFullname(); + row["columns"][COL_NAME]["value"] = animeshName; row["columns"][COL_UUID]["column"] = "uuid"; row["columns"][COL_UUID]["value"] = avatar->getID(); row["columns"][COL_SAVE]["column"] = "saveFileName"; @@ -2035,6 +2041,25 @@ void FSFloaterPoser::onAvatarsRefresh() refreshTextHighlightingOnAvatarScrollList(); } +std::string FSFloaterPoser::getControlAvatarName(const LLControlAvatar* avatar) +{ + if (!avatar) + return ""; + + const LLVOVolume* rootVolume = avatar->mRootVolp; + const LLViewerObject* rootEditObject = (rootVolume) ? rootVolume->getRootEdit() : NULL; + if (!rootEditObject) + return ""; + + const LLViewerInventoryItem* attachedItem = + (rootEditObject->isAttachment()) ? gInventory.getItem(rootEditObject->getAttachmentItemID()) : NULL; + + if (attachedItem) + return attachedItem->getName(); + + return ""; +} + void FSFloaterPoser::refreshTextHighlightingOnAvatarScrollList() { for (auto listItem : mAvatarSelectionScrollList->getAllData()) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index ab20071128..373885befa 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -333,6 +333,17 @@ class FSFloaterPoser : public LLFloater /// bool getWhetherToResetBaseRotationOnEdit(); + /// + /// Gets the name of an item from the supplied object ID. + /// + /// The control avatar to get the name for. + /// The name of the supplied object. + /// + /// Getting the name for an arbitrary item appears to involve sending system message and creating a + /// callback, making for unwanted dependencies and conflict-risk; so not implemented. + /// + std::string getControlAvatarName(const LLControlAvatar* avatar); + /// /// The time when the last click of a button was made. /// Utilized for controls needing a 'double click do' function. From 8c135423318b4798786ba38a9c5d6af1bb7c6786 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Tue, 26 Nov 2024 21:29:03 +0000 Subject: [PATCH 02/43] FIRE-34884: Add hand presets and copy at runtime --- indra/newview/CMakeLists.txt | 8 + indra/newview/fsfloaterposer.cpp | 56 +- indra/newview/fsfloaterposer.h | 1 + indra/newview/poses/hand_presets/Flat.xml | 764 ++++++++++++++++++ indra/newview/poses/hand_presets/Grip.xml | 764 ++++++++++++++++++ indra/newview/poses/hand_presets/Horns.xml | 764 ++++++++++++++++++ indra/newview/poses/hand_presets/Okay.xml | 764 ++++++++++++++++++ indra/newview/poses/hand_presets/Pointing.xml | 764 ++++++++++++++++++ indra/newview/poses/hand_presets/Relaxed.xml | 764 ++++++++++++++++++ .../newview/poses/hand_presets/Thumbs Up.xml | 764 ++++++++++++++++++ .../newview/poses/hand_presets/Tight Grip.xml | 764 ++++++++++++++++++ .../poses/hand_presets/Two Finger Salute.xml | 764 ++++++++++++++++++ indra/newview/viewer_manifest.py | 4 + 13 files changed, 6931 insertions(+), 14 deletions(-) create mode 100644 indra/newview/poses/hand_presets/Flat.xml create mode 100644 indra/newview/poses/hand_presets/Grip.xml create mode 100644 indra/newview/poses/hand_presets/Horns.xml create mode 100644 indra/newview/poses/hand_presets/Okay.xml create mode 100644 indra/newview/poses/hand_presets/Pointing.xml create mode 100644 indra/newview/poses/hand_presets/Relaxed.xml create mode 100644 indra/newview/poses/hand_presets/Thumbs Up.xml create mode 100644 indra/newview/poses/hand_presets/Tight Grip.xml create mode 100644 indra/newview/poses/hand_presets/Two Finger Salute.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index cb2d524eed..0729dc9961 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2122,6 +2122,14 @@ set_source_files_properties(${viewer_PY_SCRIPTS} list(APPEND viewer_SOURCE_FILES ${viewer_PY_SCRIPTS}) # +# Add Poser Presets +file(GLOB viewer_POSER_PRESET_FILES poses/hand_presets/*.xml) +source_group("Poser Presets" FILES ${viewer_POSER_PRESET_FILES}) +set_source_files_properties(${viewer_POSER_PRESET_FILES} + PROPERTIES HEADER_FILE_ONLY TRUE) +list(APPEND viewer_SOURCE_FILES ${viewer_POSER_PRESET_FILES}) +# Poser presets + if (WINDOWS) file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 2d4c4c9e9f..321250bdc7 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -214,6 +214,7 @@ bool FSFloaterPoser::postBuild() void FSFloaterPoser::onOpen(const LLSD& key) { + createUserPoseDirectoryIfNeeded(); onAvatarsRefresh(); refreshJointScrollListMembers(); onJointTabSelect(); @@ -324,6 +325,41 @@ void FSFloaterPoser::onClickPoseSave() } } +void FSFloaterPoser::createUserPoseDirectoryIfNeeded() +{ + std::string userPath = + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY); + + if (!gDirUtilp->fileExists(userPath)) + { + LL_WARNS("Poser") << "Couldn't find folder: " << userPath << " - creating one." << LL_ENDL; + LLFile::mkdir(userPath); + } + + userPath = userPath + gDirUtilp->getDirDelimiter() + std::string(POSE_PRESETS_HANDS_SUBDIRECTORY); + if (gDirUtilp->fileExists(userPath)) + return; + + LL_WARNS("Poser") << "Couldn't find folder: " << userPath << " - creating one." << LL_ENDL; + LLFile::mkdir(userPath); + + std::string sourcePresetPath = + gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, POSE_SAVE_SUBDIRECTORY, std::string(POSE_PRESETS_HANDS_SUBDIRECTORY)); + + if (!gDirUtilp->fileExists(sourcePresetPath)) + return; + + auto posesToCopy = gDirUtilp->getFilesInDir(sourcePresetPath); + for (auto pose : posesToCopy) + { + std::string source = sourcePresetPath + gDirUtilp->getDirDelimiter() + pose; + std::string destination = userPath + gDirUtilp->getDirDelimiter() + pose; + + if (!LLFile::copy(source, destination)) + LL_WARNS("LLDiskCache") << "Failed to copy " << source << " to " << destination << LL_ENDL; + } +} + bool FSFloaterPoser::savePoseToXml(LLVOAvatar* avatar, const std::string& poseFileName) { if (poseFileName.empty()) @@ -334,18 +370,9 @@ bool FSFloaterPoser::savePoseToXml(LLVOAvatar* avatar, const std::string& poseFi try { - std::string pathname = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY); - if (!gDirUtilp->fileExists(pathname)) - { - LL_WARNS("Poser") << "Couldn't find folder: " << pathname << " - creating one." << LL_ENDL; - LLFile::mkdir(pathname); - } - - std::string fullSavePath = - gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY, poseFileName + POSE_INTERNAL_FORMAT_FILE_EXT); + createUserPoseDirectoryIfNeeded(); bool savingDiff = !mPoserAnimator.allBaseRotationsAreZero(avatar); - LLSD record; record["version"]["value"] = (S32)5; record["startFromTeePose"]["value"] = !savingDiff; @@ -377,6 +404,9 @@ bool FSFloaterPoser::savePoseToXml(LLVOAvatar* avatar, const std::string& poseFi record[bone_name]["scale"] = scale.getValue(); } + std::string fullSavePath = + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY, poseFileName + POSE_INTERNAL_FORMAT_FILE_EXT); + llofstream file; file.open(fullSavePath.c_str()); if (!file.is_open()) @@ -509,10 +539,9 @@ void FSFloaterPoser::onClickRecaptureSelectedBones() void FSFloaterPoser::onClickBrowsePoseCache() { - std::string pathname = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY); - if (!gDirUtilp->fileExists(pathname)) - LLFile::mkdir(pathname); + createUserPoseDirectoryIfNeeded(); + std::string pathname = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY); gViewerWindow->getWindow()->openFile(pathname); } @@ -667,7 +696,6 @@ void FSFloaterPoser::onClickLoadHandPose(bool isRightHand) { LL_WARNS("Posing") << "Threw an exception trying to load a hand pose: " << poseName << " exception: " << e.what() << LL_ENDL; } - } bool FSFloaterPoser::poseFileStartsFromTeePose(const std::string& poseFileName) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index 373885befa..090419cf3e 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -193,6 +193,7 @@ class FSFloaterPoser : public LLFloater LLVector3 getScaleOfFirstSelectedJoint() const; // Pose load/save + void createUserPoseDirectoryIfNeeded(); void onToggleLoadSavePanel(); void onClickPoseSave(); void onPoseFileSelect(); diff --git a/indra/newview/poses/hand_presets/Flat.xml b/indra/newview/poses/hand_presets/Flat.xml new file mode 100644 index 0000000000..2d88b70202 --- /dev/null +++ b/indra/newview/poses/hand_presets/Flat.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285325691103935241699219 + -4.65661342818890489070327e-10 + 0.2496847659349441528320312 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285325691103935241699219 + -4.65661342818890489070327e-10 + -0.2496847659349441528320312 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285326063632965087890625 + 1.455191696309032778344772e-11 + -0.01314130239188671112060547 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285326063632965087890625 + 1.455191696309032778344772e-11 + 0.01314130239188671112060547 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195824444293975830078 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195824444293975830078 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.006570651195943355560302734 + 0 + -0.05913586542010307312011719 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.006570651195943355560302734 + 0 + 0.05913586542010307312011719 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285325691103935241699219 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285325691103935241699219 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195638179779052734375 + 2.910383392618065556689544e-11 + -0.04599456489086151123046875 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195638179779052734375 + 2.910383392618065556689544e-11 + 0.04599456489086151123046875 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.1576956361532211303710938 + -0.21991145610809326171875 + -0.545364081859588623046875 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1576956361532211303710938 + -0.21991145610809326171875 + 0.545364081859588623046875 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03942390903830528259277344 + 0.03141593188047409057617188 + -0.03285326063632965087890625 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03942390903830528259277344 + 0.03141593188047409057617188 + 0.03285326063632965087890625 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.0131413042545318603515625 + 5.820767479125521504101926e-11 + 0.1051304414868354797363281 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.0131413042545318603515625 + 5.820767479125521504101926e-11 + -0.1051304414868354797363281 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.02628260292112827301025391 + 0 + -0.2365434616804122924804688 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.02628260292112827301025391 + 0 + 0.2365434616804122924804688 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03942390903830528259277344 + 1.746229966181900294941443e-10 + -0.03285325691103935241699219 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03942390903830528259277344 + 1.746229966181900294941443e-10 + 0.03285325691103935241699219 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195451915264129638672 + 7.27595848154516389172386e-12 + -0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195451915264129638672 + 7.27595848154516389172386e-12 + 0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01314130239188671112060547 + 0 + -0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01314130239188671112060547 + 0 + 0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03942390531301498413085938 + 5.82076609134674072265625e-11 + 0.01971195451915264129638672 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03942390531301498413085938 + 5.82076609134674072265625e-11 + -0.01971195451915264129638672 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285325691103935241699219 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285325691103935241699219 + 0 + -0 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Grip.xml b/indra/newview/poses/hand_presets/Grip.xml new file mode 100644 index 0000000000..53e365510d --- /dev/null +++ b/indra/newview/poses/hand_presets/Grip.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.183978259563446044921875 + 0 + 0.4796575605869293212890625 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.183978259563446044921875 + 0 + -0.4796575605869293212890625 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.7096302509307861328125 + 0.3141592442989349365234375 + -0.03285326436161994934082031 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.7096302509307861328125 + 0.3141592442989349365234375 + 0.03285326436161994934082031 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.51908147335052490234375 + 0.2199114710092544555664062 + -0.1576956659555435180664062 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.51908147335052490234375 + 0.2199114710092544555664062 + 0.1576956659555435180664062 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.499369442462921142578125 + -0.0628318488597869873046875 + 0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.499369442462921142578125 + -0.0628318488597869873046875 + -0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.663635790348052978515625 + -4.656612873077392578125e-10 + -0.01971195638179779052734375 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.663635790348052978515625 + -4.656612873077392578125e-10 + 0.01971195638179779052734375 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.814760744571685791015625 + -0.09424778074026107788085938 + -0.308820664882659912109375 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.814760744571685791015625 + -0.09424778074026107788085938 + 0.308820664882659912109375 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.57821738719940185546875 + -0.628318607807159423828125 + -0.57164680957794189453125 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.57821738719940185546875 + -0.628318607807159423828125 + 0.57164680957794189453125 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.4796575605869293212890625 + -0.502654850482940673828125 + 0.229972779750823974609375 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.4796575605869293212890625 + -0.502654850482940673828125 + -0.229972779750823974609375 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.210260808467864990234375 + -0.1884955465793609619140625 + 0.1248423606157302856445312 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.210260808467864990234375 + -0.1884955465793609619140625 + -0.1248423606157302856445312 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.519081413745880126953125 + -0.1256636828184127807617188 + -0.2431140989065170288085938 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.519081413745880126953125 + -0.1256636828184127807617188 + 0.2431140989065170288085938 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.7293422222137451171875 + -0.2199114859104156494140625 + -0.08541847020387649536132812 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.7293422222137451171875 + -0.2199114859104156494140625 + 0.08541847020387649536132812 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.676777184009552001953125 + -0.3455752432346343994140625 + -0.2299728244543075561523438 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.676777184009552001953125 + -0.3455752432346343994140625 + 0.2299728244543075561523438 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195451915264129638672 + 1.09955751895904541015625 + 0.03285326063632965087890625 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195451915264129638672 + 1.09955751895904541015625 + -0.03285326063632965087890625 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.1182717159390449523925781 + 0.28274333477020263671875 + -0.2365434169769287109375 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1182717159390449523925781 + 0.28274333477020263671875 + 0.2365434169769287109375 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285324946045875549316406 + 1.16415321826934814453125e-10 + 0.05256520211696624755859375 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285324946045875549316406 + 1.16415321826934814453125e-10 + -0.05256520211696624755859375 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Horns.xml b/indra/newview/poses/hand_presets/Horns.xml new file mode 100644 index 0000000000..d440f00016 --- /dev/null +++ b/indra/newview/poses/hand_presets/Horns.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.19054889678955078125 + 0 + 0.2956793308258056640625 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.19054889678955078125 + 0 + -0.2956793308258056640625 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195451915264129638672 + -7.27595848154516389172386e-12 + 0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195451915264129638672 + -7.27595848154516389172386e-12 + -0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195824444293975830078 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195824444293975830078 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3548151552677154541015625 + -9.31322685637780978140654e-10 + -0.07227716594934463500976562 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3548151552677154541015625 + -9.31322685637780978140654e-10 + 0.07227716594934463500976562 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.6755158901214599609375 + -0.1256637275218963623046875 + -0.1051304340362548828125 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.6755158901214599609375 + -0.1256637275218963623046875 + 0.1051304340362548828125 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.887037813663482666015625 + 0.06283186376094818115234375 + 0.07884781807661056518554688 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.887037813663482666015625 + 0.06283186376094818115234375 + -0.07884781807661056518554688 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.1445543617010116577148438 + -0.53407084941864013671875 + -0.591358661651611328125 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1445543617010116577148438 + -0.53407084941864013671875 + 0.591358661651611328125 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.07884781807661056518554688 + 0.03141593188047409057617188 + 0.006570651661604642868041992 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.07884781807661056518554688 + 0.03141593188047409057617188 + -0.006570651661604642868041992 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.0131413042545318603515625 + 5.820767479125521504101926e-11 + 0.1051304414868354797363281 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.0131413042545318603515625 + 5.820767479125521504101926e-11 + -0.1051304414868354797363281 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.289108574390411376953125 + 0.03141591325402259826660156 + -0.45337498188018798828125 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.289108574390411376953125 + 0.03141591325402259826660156 + 0.45337498188018798828125 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.62295067310333251953125 + -0.6911504268646240234375 + -0.3810977935791015625 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.62295067310333251953125 + -0.6911504268646240234375 + 0.3810977935791015625 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.0775868892669677734375 + -0.188495576381683349609375 + -0.01314130146056413650512695 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.0775868892669677734375 + -0.188495576381683349609375 + 0.01314130146056413650512695 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.02628260292112827301025391 + 0.56548678874969482421875 + 0.164266288280487060546875 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.02628260292112827301025391 + 0.56548678874969482421875 + -0.164266288280487060546875 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.131413042545318603515625 + 0.4084071218967437744140625 + 0.249684751033782958984375 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.131413042545318603515625 + 0.4084071218967437744140625 + -0.249684751033782958984375 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.08415758609771728515625 + -2.980232594040899130050093e-08 + 0.735913097858428955078125 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.08415758609771728515625 + -2.980232594040899130050093e-08 + -0.735913097858428955078125 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Okay.xml b/indra/newview/poses/hand_presets/Okay.xml new file mode 100644 index 0000000000..41f1c48625 --- /dev/null +++ b/indra/newview/poses/hand_presets/Okay.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.47965753078460693359375 + 0.1884955614805221557617188 + 0.39423906803131103515625 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.47965753078460693359375 + 0.1884955614805221557617188 + -0.39423906803131103515625 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.79504883289337158203125 + 0.125663697719573974609375 + -0.1051304116845130920410156 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.79504883289337158203125 + 0.125663697719573974609375 + 0.1051304116845130920410156 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.749054431915283203125 + 0.628318488597869873046875 + -0.08541847020387649536132812 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.749054431915283203125 + 0.628318488597869873046875 + 0.08541847020387649536132812 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.177407562732696533203125 + -0.0628318488597869873046875 + 0.01314130239188671112060547 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.177407562732696533203125 + -0.0628318488597869873046875 + -0.01314130239188671112060547 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.926461756229400634765625 + -0.0628318488597869873046875 + 0.05913585051894187927246094 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.926461756229400634765625 + -0.0628318488597869873046875 + -0.05913585051894187927246094 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.69648897647857666015625 + 0.1256637126207351684570312 + -0.006570654921233654022216797 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.69648897647857666015625 + 0.1256637126207351684570312 + 0.006570654921233654022216797 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01314130704849958419799805 + -0.502654850482940673828125 + -0.742483675479888916015625 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01314130704849958419799805 + -0.502654850482940673828125 + 0.742483675479888916015625 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.2891086637973785400390625 + -0.1884955614805221557617188 + 0.183978259563446044921875 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.2891086637973785400390625 + -0.1884955614805221557617188 + -0.183978259563446044921875 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.06570651382207870483398438 + -0.188495576381683349609375 + 0.0722771584987640380859375 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.06570651382207870483398438 + -0.188495576381683349609375 + -0.0722771584987640380859375 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.0657065212726593017578125 + -0.09424778074026107788085938 + -0.3219619095325469970703125 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.0657065212726593017578125 + -0.09424778074026107788085938 + 0.3219619095325469970703125 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3285325467586517333984375 + -0.2827433645725250244140625 + 0.08541848510503768920898438 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3285325467586517333984375 + -0.2827433645725250244140625 + -0.08541848510503768920898438 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.45337498188018798828125 + 0.03141593188047409057617188 + 4.658912144961391277320217e-10 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.45337498188018798828125 + 0.03141593188047409057617188 + -4.658912144961391277320217e-10 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.15769565105438232421875 + 0.785398185253143310546875 + 0.2956793606281280517578125 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.15769565105438232421875 + 0.785398185253143310546875 + -0.2956793606281280517578125 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.624211966991424560546875 + 0.87964594364166259765625 + -0.59135878086090087890625 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.624211966991424560546875 + 0.87964594364166259765625 + 0.59135878086090087890625 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1051304042339324951171875 + 9.31322685637780978140654e-10 + 0.1182717159390449523925781 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.1051304042339324951171875 + 9.31322685637780978140654e-10 + -0.1182717159390449523925781 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Pointing.xml b/indra/newview/poses/hand_presets/Pointing.xml new file mode 100644 index 0000000000..7fbc0c19b4 --- /dev/null +++ b/indra/newview/poses/hand_presets/Pointing.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.08541845530271530151367188 + -1.862645371275561956281308e-09 + 0.387668430805206298828125 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.08541845530271530151367188 + -1.862645371275561956281308e-09 + -0.387668430805206298828125 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.05256521329283714294433594 + 0 + 0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.05256521329283714294433594 + 0 + -0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.86075532436370849609375 + -0.1884955614805221557617188 + 0.06570651382207870483398438 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.86075532436370849609375 + -0.1884955614805221557617188 + -0.06570651382207870483398438 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.386407375335693359375 + 0.188495576381683349609375 + -0.01314130052924156188964844 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.386407375335693359375 + 0.188495576381683349609375 + 0.01314130052924156188964844 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.1104400157928466796875 + 0 + -0.0657065212726593017578125 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.1104400157928466796875 + 0 + 0.0657065212726593017578125 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.8081901073455810546875 + -0.50265491008758544921875 + -0.880467355251312255859375 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.8081901073455810546875 + -0.50265491008758544921875 + 0.880467355251312255859375 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.7543637752532958984375 + -1.09955751895904541015625 + -0.505940258502960205078125 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.7543637752532958984375 + -1.09955751895904541015625 + 0.505940258502960205078125 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.972456395626068115234375 + -0.53407084941864013671875 + -0.03942396119236946105957031 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.972456395626068115234375 + -0.53407084941864013671875 + 0.03942396119236946105957031 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.94617378711700439453125 + -0.094247758388519287109375 + -0.3613858520984649658203125 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.94617378711700439453125 + -0.094247758388519287109375 + 0.3613858520984649658203125 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.32727146148681640625 + -0.6283185482025146484375 + -0.275967419147491455078125 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.32727146148681640625 + -0.6283185482025146484375 + 0.275967419147491455078125 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.93960297107696533203125 + -0.2513274252414703369140625 + 1.538449367899374919943511e-08 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.93960297107696533203125 + -0.2513274252414703369140625 + -1.538449367899374919943511e-08 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.26939666271209716796875 + 0.879645764827728271484375 + -0.02628259360790252685546875 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.26939666271209716796875 + 0.879645764827728271484375 + 0.02628259360790252685546875 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.4993695318698883056640625 + -1.490116297020449565025046e-08 + 0.58478796482086181640625 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.4993695318698883056640625 + -1.490116297020449565025046e-08 + -0.58478796482086181640625 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.08541847765445709228515625 + -0.2199115008115768432617188 + -0.2496847659349441528320312 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.08541847765445709228515625 + -0.2199115008115768432617188 + 0.2496847659349441528320312 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Relaxed.xml b/indra/newview/poses/hand_presets/Relaxed.xml new file mode 100644 index 0000000000..0f0b871f10 --- /dev/null +++ b/indra/newview/poses/hand_presets/Relaxed.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.07884781807661056518554688 + -1.862645371275561956281308e-09 + 0.4139510691165924072265625 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.07884781807661056518554688 + -1.862645371275561956281308e-09 + -0.4139510691165924072265625 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.4665162563323974609375 + 0.314159333705902099609375 + -0.01314130146056413650512695 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.4665162563323974609375 + 0.314159333705902099609375 + 0.01314130146056413650512695 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1511249989271163940429688 + 0.2199115008115768432617188 + -0.04599456116557121276855469 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.1511249989271163940429688 + 0.2199115008115768432617188 + 0.04599456116557121276855469 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195451915264129638672 + 0.06283185631036758422851562 + -0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195451915264129638672 + 0.06283185631036758422851562 + 0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3088206350803375244140625 + -9.31322685637780978140654e-10 + -0.07227717339992523193359375 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3088206350803375244140625 + -9.31322685637780978140654e-10 + 0.07227717339992523193359375 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3088206350803375244140625 + -9.31322685637780978140654e-10 + -0.07227717339992523193359375 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3088206350803375244140625 + -9.31322685637780978140654e-10 + 0.07227717339992523193359375 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.1576956361532211303710938 + -0.21991145610809326171875 + -0.545364081859588623046875 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1576956361532211303710938 + -0.21991145610809326171875 + 0.545364081859588623046875 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.210260808467864990234375 + -0.1884955465793609619140625 + 0.1248423606157302856445312 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.210260808467864990234375 + -0.1884955465793609619140625 + -0.1248423606157302856445312 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.210260808467864990234375 + -0.1884955465793609619140625 + 0.1248423606157302856445312 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.210260808467864990234375 + -0.1884955465793609619140625 + -0.1248423606157302856445312 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.078847825527191162109375 + -0.06283185631036758422851562 + -0.249684751033782958984375 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.078847825527191162109375 + -0.06283185631036758422851562 + 0.249684751033782958984375 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.2562553882598876953125 + -0.03141593188047409057617188 + -0.05256520584225654602050781 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.2562553882598876953125 + -0.03141593188047409057617188 + 0.05256520584225654602050781 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.2431140840053558349609375 + -0.1570796519517898559570312 + -0.03942390903830528259277344 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.2431140840053558349609375 + -0.1570796519517898559570312 + 0.03942390903830528259277344 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3548151552677154541015625 + 0.69115030765533447265625 + 0.03285327181220054626464844 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3548151552677154541015625 + 0.69115030765533447265625 + -0.03285327181220054626464844 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.07227717339992523193359375 + 0.282743394374847412109375 + 0.0985597670078277587890625 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.07227717339992523193359375 + 0.282743394374847412109375 + -0.0985597670078277587890625 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285324946045875549316406 + 1.16415321826934814453125e-10 + 0.05256520211696624755859375 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285324946045875549316406 + 1.16415321826934814453125e-10 + -0.05256520211696624755859375 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Thumbs Up.xml b/indra/newview/poses/hand_presets/Thumbs Up.xml new file mode 100644 index 0000000000..e8e42da86f --- /dev/null +++ b/indra/newview/poses/hand_presets/Thumbs Up.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.16957604885101318359375 + 0.3141593039035797119140625 + 0.275967419147491455078125 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.16957604885101318359375 + 0.3141593039035797119140625 + -0.275967419147491455078125 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.6426627635955810546875 + 0.4712389409542083740234375 + 0.19711959362030029296875 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.6426627635955810546875 + 0.4712389409542083740234375 + -0.19711959362030029296875 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.2693967521190643310546875 + 0.502654969692230224609375 + -0.059135854244232177734375 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.2693967521190643310546875 + 0.502654969692230224609375 + 0.059135854244232177734375 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.18928778171539306640625 + 0.157079637050628662109375 + -0.2234021276235580444335938 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.18928778171539306640625 + 0.157079637050628662109375 + 0.2234021276235580444335938 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.57695615291595458984375 + -1.490116297020449565025046e-08 + -0.1576956212520599365234375 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.57695615291595458984375 + -1.490116297020449565025046e-08 + 0.1576956212520599365234375 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3876684010028839111328125 + -1.86264514923095703125e-09 + -0.07884781062602996826171875 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3876684010028839111328125 + -1.86264514923095703125e-09 + 0.07884781062602996826171875 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.2287118434906005859375 + -0.34557521343231201171875 + -1.04473364353179931640625 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.2287118434906005859375 + -0.34557521343231201171875 + 1.04473364353179931640625 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.7477934360504150390625 + -1.13097345829010009765625 + -0.749054491519927978515625 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.7477934360504150390625 + -1.13097345829010009765625 + 0.749054491519927978515625 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01314130052924156188964844 + -0.2199115008115768432617188 + 0.269396722316741943359375 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01314130052924156188964844 + -0.2199115008115768432617188 + -0.269396722316741943359375 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.14986383914947509765625 + 0.1256636530160903930664062 + -0.62421190738677978515625 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.14986383914947509765625 + 0.1256636530160903930664062 + 0.62421190738677978515625 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.48496711254119873046875 + -0.40840709209442138671875 + -0.420521676540374755859375 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.48496711254119873046875 + -0.40840709209442138671875 + 0.420521676540374755859375 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.519081413745880126953125 + -0.2513274252414703369140625 + -0.1117010787129402160644531 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.519081413745880126953125 + -0.2513274252414703369140625 + 0.1117010787129402160644531 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3219619095325469970703125 + 0.188495576381683349609375 + 0.170836925506591796875 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3219619095325469970703125 + 0.188495576381683349609375 + -0.170836925506591796875 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971196010708808898925781 + 0.1256637126207351684570312 + -0.2036901861429214477539062 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971196010708808898925781 + 0.1256637126207351684570312 + 0.2036901861429214477539062 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.2891086041927337646484375 + -0.09424777328968048095703125 + -0.3219619095325469970703125 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.2891086041927337646484375 + -0.09424777328968048095703125 + 0.3219619095325469970703125 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Tight Grip.xml b/indra/newview/poses/hand_presets/Tight Grip.xml new file mode 100644 index 0000000000..3a8c39849e --- /dev/null +++ b/indra/newview/poses/hand_presets/Tight Grip.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.630782604217529296875 + 0.2199114859104156494140625 + 0.492798864841461181640625 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.630782604217529296875 + 0.2199114859104156494140625 + -0.492798864841461181640625 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.19585859775543212890625 + 0.534070789813995361328125 + 0.04599459096789360046386719 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.19585859775543212890625 + 0.534070789813995361328125 + -0.04599459096789360046386719 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.27470624446868896484375 + 0.785398185253143310546875 + 0.07227708399295806884765625 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.27470624446868896484375 + 0.785398185253143310546875 + -0.07227708399295806884765625 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.86075532436370849609375 + -0.1884955614805221557617188 + 0.06570651382207870483398438 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.86075532436370849609375 + -0.1884955614805221557617188 + -0.06570651382207870483398438 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.386407375335693359375 + 0.188495576381683349609375 + -0.01314130052924156188964844 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.386407375335693359375 + 0.188495576381683349609375 + 0.01314130052924156188964844 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.1104400157928466796875 + 0 + -0.0657065212726593017578125 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.1104400157928466796875 + 0 + 0.0657065212726593017578125 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.8081901073455810546875 + -0.50265491008758544921875 + -0.880467355251312255859375 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.8081901073455810546875 + -0.50265491008758544921875 + 0.880467355251312255859375 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.7543637752532958984375 + -1.09955751895904541015625 + -0.505940258502960205078125 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.7543637752532958984375 + -1.09955751895904541015625 + 0.505940258502960205078125 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.972456395626068115234375 + -0.53407084941864013671875 + -0.03942396119236946105957031 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.972456395626068115234375 + -0.53407084941864013671875 + 0.03942396119236946105957031 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.94617378711700439453125 + -0.094247758388519287109375 + -0.3613858520984649658203125 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.94617378711700439453125 + -0.094247758388519287109375 + 0.3613858520984649658203125 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.32727146148681640625 + -0.6283185482025146484375 + -0.275967419147491455078125 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 1.32727146148681640625 + -0.6283185482025146484375 + 0.275967419147491455078125 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.93960297107696533203125 + -0.2513274252414703369140625 + 1.538449367899374919943511e-08 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.93960297107696533203125 + -0.2513274252414703369140625 + -1.538449367899374919943511e-08 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.006570653989911079406738281 + 0.848230063915252685546875 + -0.03942391648888587951660156 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.006570653989911079406738281 + 0.848230063915252685546875 + 0.03942391648888587951660156 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.3416738212108612060546875 + 0.40840709209442138671875 + 0.440233647823333740234375 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.3416738212108612060546875 + 0.40840709209442138671875 + -0.440233647823333740234375 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.08541847765445709228515625 + -0.2199115008115768432617188 + -0.2496847659349441528320312 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.08541847765445709228515625 + -0.2199115008115768432617188 + 0.2496847659349441528320312 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/poses/hand_presets/Two Finger Salute.xml b/indra/newview/poses/hand_presets/Two Finger Salute.xml new file mode 100644 index 0000000000..049520006f --- /dev/null +++ b/indra/newview/poses/hand_presets/Two Finger Salute.xml @@ -0,0 +1,764 @@ + + + mHandIndex1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.07227716594934463500976562 + 0.2199114710092544555664062 + 0.2693966925144195556640625 + + scale + + 0 + 0 + 0 + + + mHandIndex1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.05256520584225654602050781 + 0.1256637275218963623046875 + -0.4665162861347198486328125 + + scale + + 0 + 0 + 0 + + + mHandIndex2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285326063632965087890625 + 1.455191696309032778344772e-11 + -0.01314130239188671112060547 + + scale + + 0 + 0 + 0 + + + mHandIndex2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285326063632965087890625 + 1.455191696309032778344772e-11 + 0.01314130239188671112060547 + + scale + + 0 + 0 + 0 + + + mHandIndex3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195824444293975830078 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandIndex3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195824444293975830078 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.04599455744028091430664062 + -4.65661342818890489070327e-10 + 0.06570650637149810791015625 + + scale + + 0 + 0 + 0 + + + mHandMiddle1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.09855977445840835571289062 + 0 + 0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285325691103935241699219 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285325691103935241699219 + 0 + 0 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01971195638179779052734375 + 2.910383392618065556689544e-11 + -0.04599456489086151123046875 + + scale + + 0 + 0 + 0 + + + mHandMiddle3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195638179779052734375 + 2.910383392618065556689544e-11 + 0.04599456489086151123046875 + + scale + + 0 + 0 + 0 + + + mHandPinky1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.749054372310638427734375 + -0.543495595455169677734375 + -0.913320600986480712890625 + + scale + + 0 + 0 + 0 + + + mHandPinky1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.42372357845306396484375 + -0.589437425136566162109375 + -0.1377763897180557250976562 + + scale + + 0 + 0 + 0 + + + mHandPinky2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -2.0171897411346435546875 + -1.099557399749755859375 + -0.64392375946044921875 + + scale + + 0 + 0 + 0 + + + mHandPinky2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03942390903830528259277344 + 0.03141593188047409057617188 + 0.03285326063632965087890625 + + scale + + 0 + 0 + 0 + + + mHandPinky3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.558505475521087646484375 + -0.56548678874969482421875 + -0.05256522819399833679199219 + + scale + + 0 + 0 + 0 + + + mHandPinky3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.0131413042545318603515625 + 5.820767479125521504101926e-11 + -0.1051304414868354797363281 + + scale + + 0 + 0 + 0 + + + mHandRing1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.987495481967926025390625 + 0.01987109147012233734130859 + -0.498646259307861328125 + + scale + + 0 + 0 + 0 + + + mHandRing1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.4442241191864013671875 + -0.281714916229248046875 + -0.3864487111568450927734375 + + scale + + 0 + 0 + 0 + + + mHandRing2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.96462452411651611328125 + -0.4084071218967437744140625 + -0.551934778690338134765625 + + scale + + 0 + 0 + 0 + + + mHandRing2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.03285326063632965087890625 + 2.910383392618065556689544e-11 + -0.01971195451915264129638672 + + scale + + 0 + 0 + 0 + + + mHandRing3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.2431140989065170288085938 + 0 + -0.0722771584987640380859375 + + scale + + 0 + 0 + 0 + + + mHandRing3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.01971195451915264129638672 + 7.27595848154516389172386e-12 + 0.006570650730282068252563477 + + scale + + 0 + 0 + 0 + + + mHandThumb1Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.1576956808567047119140625 + 1.07128322124481201171875 + 0.1379837095737457275390625 + + scale + + 0 + 0 + 0 + + + mHandThumb1Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.01314130239188671112060547 + 0 + 0.006570651195943355560302734 + + scale + + 0 + 0 + 0 + + + mHandThumb2Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -1.32070124149322509765625 + 1.22522127628326416015625 + 1.018451213836669921875 + + scale + + 0 + 0 + 0 + + + mHandThumb2Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03942390531301498413085938 + 5.82076609134674072265625e-11 + -0.01971195451915264129638672 + + scale + + 0 + 0 + 0 + + + mHandThumb3Left + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + -0.597929298877716064453125 + -0.251327455043792724609375 + -0.08541848510503768920898438 + + scale + + 0 + 0 + 0 + + + mHandThumb3Right + + enabled + 1 + jointBaseRotationIsZero + 1 + position + + 0 + 0 + 0 + + rotation + + 0.03285325691103935241699219 + 0 + -0 + + scale + + 0 + 0 + 0 + + + startFromTeePose + + value + 1 + + version + + value + 5 + + + diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 9fa11fd534..48ff438e4f 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -195,6 +195,10 @@ class ViewerManifest(LLManifest,FSViewerManifest): with self.prefix(src_dst="fs_resources"): self.path("*.lsltxt") self.path("*.dae") # FIRE-30963 - better physics defaults + + # Poser Presets + with self.prefix(src_dst="poses/hand_presets"): + self.path("*.xml") # skins with self.prefix(src_dst="skins"): From 26bfcd2e58ffc5a012e20e121ac98fc45d2c7d1f Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Tue, 26 Nov 2024 22:00:09 +0000 Subject: [PATCH 03/43] FIRE-34884: Fix position adjustments not working when mirror, sympathetic or delta --- indra/newview/fsposeranimator.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/indra/newview/fsposeranimator.cpp b/indra/newview/fsposeranimator.cpp index 13ee1990bb..b36000b000 100644 --- a/indra/newview/fsposeranimator.cpp +++ b/indra/newview/fsposeranimator.cpp @@ -377,18 +377,14 @@ void FSPoserAnimator::setJointPosition(LLVOAvatar* avatar, const FSPoserJoint* j if (!jointPose) return; - if (style == NONE) + FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName()); + if (style == NONE || !oppositeJointPose) { jointPose->setPositionDelta(position); return; } LLVector3 positionDelta = jointPose->getPositionDelta() - position; - - FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName()); - if (!oppositeJointPose) - return; - LLVector3 oppositeJointPosition = oppositeJointPose->getPositionDelta(); switch (style) { From 3bc2e86342739de86e67c4aa8582732a727a67c4 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 27 Nov 2024 19:48:57 +0000 Subject: [PATCH 04/43] FIRE-34884: Fix wheel not working in delta mode --- indra/newview/fsvirtualtrackpad.cpp | 59 ++++++++++++++++++++--------- indra/newview/fsvirtualtrackpad.h | 9 ++++- 2 files changed, 48 insertions(+), 20 deletions(-) diff --git a/indra/newview/fsvirtualtrackpad.cpp b/indra/newview/fsvirtualtrackpad.cpp index 772c2dc4c6..f065a0d1ac 100644 --- a/indra/newview/fsvirtualtrackpad.cpp +++ b/indra/newview/fsvirtualtrackpad.cpp @@ -306,26 +306,29 @@ bool FSVirtualTrackpad::handleHover(S32 x, S32 y, MASK mask) if (!hasMouseCapture()) return true; - S32 deltaX, deltaY; - getHoverMovementDeltas(x, y, mask, &deltaX, &deltaY); + S32 deltaX, deltaY, deltaZ; + getHoverMovementDeltas(x, y, mask, &deltaX, &deltaY, &deltaZ); applyHoverMovementDeltas(deltaX, deltaY, mask); applyDeltasToValues(deltaX, deltaY, mask); - applyDeltasToDeltaValues(deltaX, deltaY, mask); + applyDeltasToDeltaValues(deltaX, deltaY, deltaZ, mask); onCommit(); return true; } -void FSVirtualTrackpad::getHoverMovementDeltas(S32 x, S32 y, MASK mask, S32* deltaX, S32* deltaY) +void FSVirtualTrackpad::getHoverMovementDeltas(S32 x, S32 y, MASK mask, S32* deltaX, S32* deltaY, S32* deltaZ) { - if (!deltaX || !deltaY) + if (!deltaX || !deltaY || !deltaZ) return; S32 fromX, fromY; fromX = mDoingPinchMode ? mPinchCursorValueX : mCursorValueX; fromY = mDoingPinchMode ? mPinchCursorValueY : mCursorValueY; + *deltaZ = mWheelClicksSinceLastDelta; + mWheelClicksSinceLastDelta = 0; + if (mask & MASK_CONTROL) { if (!mHeldDownControlBefore) @@ -427,48 +430,48 @@ void FSVirtualTrackpad::applyDeltasToValues(S32 deltaX, S32 deltaY, MASK mask) } } -void FSVirtualTrackpad::applyDeltasToDeltaValues(S32 deltaX, S32 deltaY, MASK mask) +void FSVirtualTrackpad::applyDeltasToDeltaValues(S32 deltaX, S32 deltaY, S32 deltaZ, MASK mask) { if (mDoingPinchMode) { if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_ALT) { - mPinchValueDeltaX = 0; + mPinchValueDeltaX = deltaZ; mPinchValueDeltaY = deltaY; mPinchValueDeltaZ = deltaX; } else if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_SHIFT) { mPinchValueDeltaX = deltaX; - mPinchValueDeltaY = 0; + mPinchValueDeltaY = deltaZ; mPinchValueDeltaZ = deltaY; } else { mPinchValueDeltaX = deltaX; mPinchValueDeltaY = deltaY; - mPinchValueDeltaZ = 0; + mPinchValueDeltaZ = deltaZ; } } else { if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_ALT) { - mValueDeltaX = 0; + mValueDeltaX = deltaZ; mValueDeltaY = deltaY; mValueDeltaZ = deltaX; } else if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_SHIFT) { mValueDeltaX = deltaX; - mValueDeltaY = 0; + mValueDeltaY = deltaZ; mValueDeltaZ = deltaY; } else { mValueDeltaX = deltaX; mValueDeltaY = deltaY; - mValueDeltaZ = 0; + mValueDeltaZ = deltaZ; } } } @@ -602,23 +605,43 @@ bool FSVirtualTrackpad::handleScrollWheel(S32 x, S32 y, S32 clicks) if (mask & MASK_CONTROL) changeAmount /= 5; + mWheelClicksSinceLastDelta = -1 * clicks * changeAmount; + if (mDoingPinchMode) { if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_ALT) - mPinchValueX -= clicks * changeAmount; + { + mPinchValueX += mWheelClicksSinceLastDelta; + mPinchValueDeltaX = mWheelClicksSinceLastDelta; + } else if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_SHIFT) - mPinchValueY -= clicks * changeAmount; + { + mPinchValueY += mWheelClicksSinceLastDelta; + mPinchValueDeltaY = mWheelClicksSinceLastDelta; + } else - mPinchValueZ -= clicks * changeAmount; + { + mPinchValueZ += mWheelClicksSinceLastDelta; + mPinchValueDeltaZ = mWheelClicksSinceLastDelta; + } } else { if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_ALT) - mValueX -= clicks * changeAmount; + { + mValueX += mWheelClicksSinceLastDelta; + mValueDeltaX = mWheelClicksSinceLastDelta; + } else if ((mask & (MASK_SHIFT | MASK_ALT)) == MASK_SHIFT) - mValueY -= clicks * changeAmount; + { + mValueY += mWheelClicksSinceLastDelta; + mValueDeltaY = mWheelClicksSinceLastDelta; + } else - mValueZ -= clicks * changeAmount; + { + mValueZ += mWheelClicksSinceLastDelta; + mValueDeltaZ = mWheelClicksSinceLastDelta; + } } if (!hasMouseCapture()) diff --git a/indra/newview/fsvirtualtrackpad.h b/indra/newview/fsvirtualtrackpad.h index 79703a14db..6eb7bd782b 100644 --- a/indra/newview/fsvirtualtrackpad.h +++ b/indra/newview/fsvirtualtrackpad.h @@ -119,10 +119,10 @@ private: LLVector3 normalizePixelPos(S32 x, S32 y, S32 z) const; LLVector3 normalizeDelta(S32 x, S32 y, S32 z) const; - void getHoverMovementDeltas(S32 x, S32 y, MASK mask, S32* deltaX, S32* deltaY); + void getHoverMovementDeltas(S32 x, S32 y, MASK mask, S32* deltaX, S32* deltaY, S32* deltaZ); void applyHoverMovementDeltas(S32 deltaX, S32 deltaY, MASK mask); void applyDeltasToValues(S32 deltaX, S32 deltaY, MASK mask); - void applyDeltasToDeltaValues(S32 deltaX, S32 deltaY, MASK mask); + void applyDeltasToDeltaValues(S32 deltaX, S32 deltaY, S32 deltaZ, MASK mask); LLUIImage* mImgMoonBack{ nullptr }; LLUIImage* mImgMoonFront{ nullptr }; @@ -152,6 +152,11 @@ private: bool mHeldDownControlBefore{ false }; + /// + /// The values the owner will get and set. + /// + S32 mWheelClicksSinceLastDelta{ 0 }; + /// /// The values the owner will get and set. /// From 849bf248ed36c547ca7cbf2843f6295b397e936d Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 27 Nov 2024 19:49:56 +0000 Subject: [PATCH 05/43] FIRE-34884: Adjust control sizes and positions on floater --- .../newview/skins/default/xui/en/floater_fs_poser.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_fs_poser.xml b/indra/newview/skins/default/xui/en/floater_fs_poser.xml index a9314c8e1c..14612eff06 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_poser.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_poser.xml @@ -568,7 +568,7 @@ width="403"> top_delta="238" left_pad="1" left="2" - width="88" > + width="85" > @@ -579,9 +579,9 @@ width="403"> label="Set Right" name="button_loadHandPoseRight" tool_tip="Double click to set your right hand to the selected preset" - left_pad="1" + left_pad="2" top_delta="0" - width="88" > + width="85" > @@ -673,7 +673,7 @@ width="403"> width="317" /> name="refresh_avatars" tool_tip="Refresh the list of avatars and animeshes" width="20" - top="142" + top="232" left="3"> From 627b8dd48322ff21b4a7a02706ec2dd81780b4a5 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 27 Nov 2024 20:08:51 +0000 Subject: [PATCH 06/43] FIRE-34884: Adjust control axes for some joints Left hand digits, lips, nose --- .../skins/default/xui/en/floater_fs_poser.xml | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_fs_poser.xml b/indra/newview/skins/default/xui/en/floater_fs_poser.xml index 14612eff06..4d9e3311ca 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_poser.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_poser.xml @@ -39,8 +39,12 @@ width="403"> NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH NEGATE_PITCH NEGATE_PITCH NEGATE_PITCH @@ -57,35 +61,35 @@ width="403"> SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH - SWAP_ROLL_AND_PITCH NEGATE_PITCH + SWAP_ROLL_AND_PITCH SWAP_ROLL_AND_PITCH NEGATE_PITCH - SWAP_ROLL_AND_PITCH NEGATE_PITCH + SWAP_ROLL_AND_PITCH SWAP_ROLL_AND_PITCH NEGATE_PITCH - SWAP_ROLL_AND_PITCH NEGATE_PITCH + SWAP_ROLL_AND_PITCH SWAP_ROLL_AND_PITCH NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH - SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH + SWAP_X2Z_Y2X_Z2Y SWAP_X2Z_Y2X_Z2Y NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH @@ -105,6 +109,9 @@ width="403"> SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH + SWAP_YAW_AND_ROLL NEGATE_PITCH Body @@ -146,7 +153,7 @@ width="403"> Ear Upper Right Ear Lower Right Nose Left - Nose Center + Nose Middle Nose Right Cheek Lower Left Cheek Upper Left @@ -167,7 +174,7 @@ width="403"> Lip Upper Right Lip Corner Left Lip Corner Right - Lip Upper Center + Lip Upper Middle Eye corner Inner Left Eye corner Inner Right Nose Bridge From d64022b5230b96e007c33a39938025fe1dfde7b0 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 27 Nov 2024 20:57:14 +0000 Subject: [PATCH 07/43] FIRE-34884: Add load selective Loads a pose to only the joints that are switched off --- indra/newview/fsfloaterposer.cpp | 16 ++++++--- indra/newview/fsfloaterposer.h | 2 ++ .../skins/default/xui/en/floater_fs_poser.xml | 2 +- .../xui/en/menu_fs_poser_poses_btn.xml | 34 ++++++------------- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 321250bdc7..df22447565 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -599,6 +599,10 @@ void FSFloaterPoser::onPoseMenuAction(const LLSD& param) loadType = POSITIONS_AND_SCALES; else if (loadStyle == "all") loadType = ROT_POS_AND_SCALES; + else if (loadStyle == "selective") + loadType = SELECTIVE; + else if (loadStyle == "selective_rot") + loadType = SELECTIVE_ROT; LLVOAvatar* avatar = getUiSelectedAvatar(); if (!avatar) @@ -753,11 +757,12 @@ void FSFloaterPoser::loadPoseFromXml(LLVOAvatar* avatar, const std::string& pose gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY, poseFileName + POSE_INTERNAL_FORMAT_FILE_EXT); bool loadRotations = loadMethod == ROTATIONS || loadMethod == ROTATIONS_AND_POSITIONS || loadMethod == ROTATIONS_AND_SCALES || - loadMethod == ROT_POS_AND_SCALES; + loadMethod == ROT_POS_AND_SCALES || loadMethod == SELECTIVE || loadMethod == SELECTIVE_ROT; bool loadPositions = loadMethod == POSITIONS || loadMethod == ROTATIONS_AND_POSITIONS || loadMethod == POSITIONS_AND_SCALES || - loadMethod == ROT_POS_AND_SCALES; + loadMethod == ROT_POS_AND_SCALES || loadMethod == SELECTIVE; bool loadScales = loadMethod == SCALES || loadMethod == POSITIONS_AND_SCALES || loadMethod == ROTATIONS_AND_SCALES || - loadMethod == ROT_POS_AND_SCALES; + loadMethod == ROT_POS_AND_SCALES || loadMethod == SELECTIVE; + bool loadSelective = loadMethod == SELECTIVE || loadMethod == SELECTIVE_ROT; try { @@ -808,10 +813,13 @@ void FSFloaterPoser::loadPoseFromXml(LLVOAvatar* avatar, const std::string& pose if (!poserJoint) continue; + if (loadSelective && mPoserAnimator.isPosingAvatarJoint(avatar, *poserJoint)) + continue; + if (control_map.has("enabled")) { enabled = control_map["enabled"].asBoolean(); - mPoserAnimator.setPosingAvatarJoint(avatar, *poserJoint, enabled); + mPoserAnimator.setPosingAvatarJoint(avatar, *poserJoint, enabled || loadSelective); } if (control_map.has("jointBaseRotationIsZero")) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index 090419cf3e..b320d9fee6 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -54,6 +54,8 @@ typedef enum E_LoadPoseMethods HAND_RIGHT = 8, HAND_LEFT = 9, FACE_ONLY = 10, + SELECTIVE = 11, + SELECTIVE_ROT = 12, } E_LoadPoseMethods; /// diff --git a/indra/newview/skins/default/xui/en/floater_fs_poser.xml b/indra/newview/skins/default/xui/en/floater_fs_poser.xml index 4d9e3311ca..6006628827 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_poser.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_poser.xml @@ -1158,7 +1158,7 @@ width="403"> name="button_RecaptureParts" left_pad="1" top_delta="0" - tool_tip="If the selected body part(s) is/are OFF, this Recaptures what those body parts are doing right now. This button disables if you start from a T-Pose" + tool_tip="If the selected body part(s) is/are OFF, this Recaptures what those body parts are doing right now." width="45" > diff --git a/indra/newview/skins/default/xui/en/menu_fs_poser_poses_btn.xml b/indra/newview/skins/default/xui/en/menu_fs_poser_poses_btn.xml index f1662ff934..a44b02e9eb 100644 --- a/indra/newview/skins/default/xui/en/menu_fs_poser_poses_btn.xml +++ b/indra/newview/skins/default/xui/en/menu_fs_poser_poses_btn.xml @@ -3,48 +3,34 @@ layout="topleft" name="Settings"> - - - - - - - + - - - - + name="rotations_positions"> + From a965c4e7cf071c076a320e03390827ea60c6ddf1 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 27 Nov 2024 20:57:49 +0000 Subject: [PATCH 08/43] FIRE-34884: Zero everything for Tpose --- indra/newview/fsposingmotion.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/fsposingmotion.cpp b/indra/newview/fsposingmotion.cpp index d16e9f5374..6328715411 100644 --- a/indra/newview/fsposingmotion.cpp +++ b/indra/newview/fsposingmotion.cpp @@ -266,7 +266,10 @@ bool FSPosingMotion::allStartingRotationsAreZero() const void FSPosingMotion::setAllRotationsToZero() { for (auto poserJoint_iter = mJointPoses.begin(); poserJoint_iter != mJointPoses.end(); ++poserJoint_iter) + { poserJoint_iter->zeroBaseRotation(); + poserJoint_iter->setRotationDelta(LLQuaternion::DEFAULT); + } } constexpr size_t MaximumUndoQueueLength = 20; From 5d4839146eb74319403224b0db64fdc51a14c7c1 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Thu, 28 Nov 2024 21:49:50 +0000 Subject: [PATCH 09/43] FIRE-34884: Reduce the amount of CPU time spent posing by declaring near-enough. Increase undo wait, because sliders are slower --- indra/newview/fsjointpose.cpp | 5 ++++- indra/newview/fsposingmotion.cpp | 36 +++++++++++++++++++++++++------- indra/newview/fsposingmotion.h | 29 +++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/indra/newview/fsjointpose.cpp b/indra/newview/fsjointpose.cpp index ec3abb0b7f..7c86f9c6cf 100644 --- a/indra/newview/fsjointpose.cpp +++ b/indra/newview/fsjointpose.cpp @@ -29,12 +29,15 @@ #include "fsposingmotion.h" #include "llcharacter.h" +/// +/// The maximum length of any undo queue; adding new members preens older ones. +/// constexpr size_t MaximumUndoQueueLength = 20; /// /// The constant time interval, in seconds, specifying whether an 'undo' value should be added. /// -constexpr std::chrono::duration UndoUpdateInterval = std::chrono::duration(0.3); +constexpr std::chrono::duration UndoUpdateInterval = std::chrono::duration(0.8); FSJointPose::FSJointPose(LLJoint* joint, U32 usage, bool isCollisionVolume) { diff --git a/indra/newview/fsposingmotion.cpp b/indra/newview/fsposingmotion.cpp index 6328715411..dabc88bb4d 100644 --- a/indra/newview/fsposingmotion.cpp +++ b/indra/newview/fsposingmotion.cpp @@ -95,19 +95,19 @@ bool FSPosingMotion::onUpdate(F32 time, U8* joint_mask) targetPosition = jointPose.getTargetPosition(); targetScale = jointPose.getTargetScale(); - if (currentPosition != targetPosition) + if (vectorsNotQuiteEqual(currentPosition, targetPosition)) { currentPosition = lerp(currentPosition, targetPosition, mInterpolationTime); jointPose.getJointState()->setPosition(currentPosition); } - if (currentRotation != targetRotation) + if (quatsNotQuiteEqual(currentRotation, targetRotation)) { currentRotation = slerp(mInterpolationTime, currentRotation, targetRotation); jointPose.getJointState()->setRotation(currentRotation); } - if (currentScale != targetScale) + if (vectorsNotQuiteEqual(currentScale, targetScale)) { currentScale = lerp(currentScale, targetScale, mInterpolationTime); jointPose.getJointState()->setScale(currentScale); @@ -272,9 +272,29 @@ void FSPosingMotion::setAllRotationsToZero() } } -constexpr size_t MaximumUndoQueueLength = 20; +bool FSPosingMotion::vectorsNotQuiteEqual(LLVector3 v1, LLVector3 v2) const +{ + if (vectorAxesAlmostEqual(v1.mV[VX], v2.mV[VX]) && + vectorAxesAlmostEqual(v1.mV[VY], v2.mV[VY]) && + vectorAxesAlmostEqual(v1.mV[VZ], v2.mV[VZ])) + return false; -/// -/// The constant time interval, in seconds, specifying whether an 'undo' value should be added. -/// -constexpr std::chrono::duration UndoUpdateInterval = std::chrono::duration(0.3); + return true; +} + +bool FSPosingMotion::quatsNotQuiteEqual(LLQuaternion q1, LLQuaternion q2) const +{ + if (vectorAxesAlmostEqual(q1.mQ[VW], q2.mQ[VW]) && + vectorAxesAlmostEqual(q1.mQ[VX], q2.mQ[VX]) && + vectorAxesAlmostEqual(q1.mQ[VY], q2.mQ[VY]) && + vectorAxesAlmostEqual(q1.mQ[VZ], q2.mQ[VZ])) + return false; + + if (vectorAxesAlmostEqual(q1.mQ[VW], -q2.mQ[VW]) && + vectorAxesAlmostEqual(q1.mQ[VX], -q2.mQ[VX]) && + vectorAxesAlmostEqual(q1.mQ[VY], -q2.mQ[VY]) && + vectorAxesAlmostEqual(q1.mQ[VZ], -q2.mQ[VZ])) + return false; + + return true; +} diff --git a/indra/newview/fsposingmotion.h b/indra/newview/fsposingmotion.h index 438c7603b0..cbfbc6fb6a 100644 --- a/indra/newview/fsposingmotion.h +++ b/indra/newview/fsposingmotion.h @@ -124,6 +124,17 @@ public: void setAllRotationsToZero(); private: + /// + /// The axial difference considered close enough to be the same. + /// + /// + /// This is intended to minimize lerps and slerps, preventing wasted CPU time over fractionally small rotation/position/scale differences. + /// Too small and it's inefficient. Too large and there is noticeable error in the pose. + /// This takes advantage of how the actual vector migrates to equality with the target vector. + /// Certain physics settings (bouncing whatnots) account for some longer term work, but as this is applied per joint, it tends to reduce a lot of work. + /// + const F32 closeEnough = 1e-6; + /// /// The kind of joint state this animation is concerned with changing. /// @@ -181,6 +192,24 @@ private: /// /// The joint to stop animating. void removeJointFromState(LLJoint* joint); + + /// + /// Determines if two vectors are near enough to equal. + /// + /// The first vector to compare. + /// The sceond vector to compare. + /// true if the vectors are "close enough", otherwise false. + bool vectorsNotQuiteEqual(LLVector3 v1, LLVector3 v2) const; + + /// + /// Determines if two vectors are near enough to equal. + /// + /// The first vector to compare. + /// The sceond vector to compare. + /// true if the vectors are "close enough", otherwise false. + bool quatsNotQuiteEqual(LLQuaternion q1, LLQuaternion q2) const; + + bool vectorAxesAlmostEqual(F32 qA, F32 qB) const { return llabs(qA - qB) < closeEnough; } }; #endif // FS_POSINGMOTION_H From c01fe3379e415a492fe796a1acceb424d89ae1f9 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Sat, 30 Nov 2024 14:46:40 +0000 Subject: [PATCH 10/43] FIRE-34884: Rework delta mode to break gimbal lock for selected lock-prone joints --- indra/newview/fsfloaterposer.cpp | 231 +++++++++--------- indra/newview/fsfloaterposer.h | 18 +- indra/newview/fsposeranimator.cpp | 16 +- indra/newview/fsposeranimator.h | 10 +- .../skins/default/xui/en/floater_fs_poser.xml | 14 +- 5 files changed, 158 insertions(+), 131 deletions(-) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index df22447565..f2efc2fc46 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -52,6 +52,7 @@ constexpr std::string_view POSE_PRESETS_HANDS_SUBDIRECTORY = "hand_presets"; constexpr char XML_LIST_HEADER_STRING_PREFIX[] = "header_"; constexpr char XML_LIST_TITLE_STRING_PREFIX[] = "title_"; constexpr char XML_JOINT_TRANSFORM_STRING_PREFIX[] = "joint_transform_"; +constexpr char XML_JOINT_DELTAROT_STRING_PREFIX[] = "joint_delta_rotate_"; constexpr std::string_view POSER_ADVANCEDWINDOWSTATE_SAVE_KEY = "FSPoserAdvancedWindowState"; constexpr std::string_view POSER_TRACKPAD_SENSITIVITY_SAVE_KEY = "FSPoserTrackpadSensitivity"; constexpr std::string_view POSER_STOPPOSINGWHENCLOSED_SAVE_KEY = "FSPoserStopPosingWhenClosed"; @@ -76,7 +77,6 @@ FSFloaterPoser::FSFloaterPoser(const LLSD& key) : LLFloater(key) mCommitCallbackRegistrar.add("Poser.RedoLastRotation", [this](LLUICtrl*, const LLSD&) { onRedoLastRotation(); }); mCommitCallbackRegistrar.add("Poser.ToggleMirrorChanges", [this](LLUICtrl*, const LLSD&) { onToggleMirrorChange(); }); mCommitCallbackRegistrar.add("Poser.ToggleSympatheticChanges", [this](LLUICtrl*, const LLSD&) { onToggleSympatheticChange(); }); - mCommitCallbackRegistrar.add("Poser.ToggleDeltaModeChanges", [this](LLUICtrl*, const LLSD &) { onToggleDeltaModeChange(); }); mCommitCallbackRegistrar.add("Poser.AdjustTrackPadSensitivity", [this](LLUICtrl*, const LLSD&) { onAdjustTrackpadSensitivity(); }); mCommitCallbackRegistrar.add("Poser.PositionSet", [this](LLUICtrl*, const LLSD&) { onAvatarPositionSet(); }); @@ -110,20 +110,20 @@ bool FSFloaterPoser::postBuild() mAvatarTrackball->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLimbTrackballChanged(); }); mLimbYawSlider = getChild("limb_yaw"); - mLimbYawSlider->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLimbYawPitchRollChanged(); }); + mLimbYawSlider->setCommitCallback([this](LLUICtrl *, const LLSD &) { onYawPitchRollSliderChanged(); }); mLimbPitchSlider = getChild("limb_pitch"); - mLimbPitchSlider->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLimbYawPitchRollChanged(); }); + mLimbPitchSlider->setCommitCallback([this](LLUICtrl *, const LLSD &) { onYawPitchRollSliderChanged(); }); mLimbRollSlider = getChild("limb_roll"); - mLimbRollSlider->setCommitCallback([this](LLUICtrl *, const LLSD &) { onLimbYawPitchRollChanged(); }); + mLimbRollSlider->setCommitCallback([this](LLUICtrl *, const LLSD &) { onYawPitchRollSliderChanged(); }); mJointsTabs = getChild("joints_tabs"); mJointsTabs->setCommitCallback( [this](LLUICtrl*, const LLSD&) { onJointTabSelect(); - setRotationChangeButtons(false, false, false); + setRotationChangeButtons(false, false); }); mAvatarSelectionScrollList = getChild("avatarSelection_scroll"); @@ -1077,30 +1077,22 @@ void FSFloaterPoser::onToggleLoadSavePanel() void FSFloaterPoser::onToggleMirrorChange() { - setRotationChangeButtons(true, false, false); + setRotationChangeButtons(true, false); } void FSFloaterPoser::onToggleSympatheticChange() { - setRotationChangeButtons(false, true, false); + setRotationChangeButtons(false, true); } -void FSFloaterPoser::onToggleDeltaModeChange() +void FSFloaterPoser::setRotationChangeButtons(bool togglingMirror, bool togglingSympathetic) { - setRotationChangeButtons(false, false, true); -} - -void FSFloaterPoser::setRotationChangeButtons(bool togglingMirror, bool togglingSympathetic, bool togglingDelta) -{ - if (togglingSympathetic || togglingDelta) + if (togglingSympathetic) mToggleMirrorRotationBtn->setValue(false); - if (togglingMirror || togglingDelta) + if (togglingMirror) mToggleSympatheticRotationBtn->setValue(false); - if (togglingMirror || togglingSympathetic) - mToggleDeltaModeBtn->setValue(false); - refreshTrackpadCursor(); } @@ -1121,7 +1113,7 @@ void FSFloaterPoser::onUndoLastRotation() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.undoLastJointRotation(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.undoLastJointRotation(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } enableOrDisableRedoButton(); @@ -1146,7 +1138,7 @@ void FSFloaterPoser::onUndoLastPosition() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.undoLastJointPosition(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.undoLastJointPosition(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } refreshAdvancedPositionSliders(); @@ -1170,7 +1162,7 @@ void FSFloaterPoser::onUndoLastScale() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.undoLastJointScale(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.undoLastJointScale(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } refreshAdvancedScaleSliders(); @@ -1210,7 +1202,7 @@ void FSFloaterPoser::onResetPosition() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.resetJointPosition(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.resetJointPosition(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } refreshAdvancedPositionSliders(); @@ -1237,7 +1229,7 @@ void FSFloaterPoser::onResetScale() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.resetJointScale(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.resetJointScale(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } refreshAdvancedScaleSliders(); @@ -1260,7 +1252,7 @@ void FSFloaterPoser::onRedoLastRotation() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.redoLastJointRotation(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.redoLastJointRotation(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } enableOrDisableRedoButton(); @@ -1285,7 +1277,7 @@ void FSFloaterPoser::onRedoLastPosition() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.redoLastJointPosition(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.redoLastJointPosition(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } refreshAdvancedPositionSliders(); @@ -1309,7 +1301,7 @@ void FSFloaterPoser::onRedoLastScale() { bool currentlyPosing = mPoserAnimator.isPosingAvatarJoint(avatar, *item); if (currentlyPosing) - mPoserAnimator.redoLastJointScale(avatar, *item, getUiSelectedBoneDeflectionStyle()); + mPoserAnimator.redoLastJointScale(avatar, *item, getUiSelectedBoneDeflectionStyle(item->jointName())); } refreshAdvancedScaleSliders(); @@ -1383,6 +1375,7 @@ std::vector FSFloaterPoser::getUiSelectedPoserJo if (activeTab == mPositionRotationPnl) { + mEntireAvJointScroll->selectFirstItem(); scrollList = mEntireAvJointScroll; } else if (activeTab == mBodyJointsPnl) @@ -1432,18 +1425,47 @@ std::vector FSFloaterPoser::getUiSelectedPoserJo return joints; } -E_BoneDeflectionStyles FSFloaterPoser::getUiSelectedBoneDeflectionStyle() const +bool FSFloaterPoser::isAnyDeltaModeRotation(const E_BoneDeflectionStyles deflection) { + if (mToggleDeltaModeBtn->getValue().asBoolean()) + return true; + + switch (deflection) + { + case DELTAMODE: + case SYMPATHETIC_DELTA: + case MIRROR_DELTA: + return true; + + case NONE: + case SYMPATHETIC: + case MIRROR: + default: + return false; + } +} + +E_BoneDeflectionStyles FSFloaterPoser::getUiSelectedBoneDeflectionStyle(const std::string& jointName) const +{ + if (jointName.empty()) + return NONE; + + bool isDelta = mToggleDeltaModeBtn->getValue().asBoolean(); + bool hasRotationStylePreferenceParameter = hasString(XML_JOINT_DELTAROT_STRING_PREFIX + jointName); + if (hasRotationStylePreferenceParameter) + { + std::string paramValue = getString(XML_JOINT_DELTAROT_STRING_PREFIX + jointName); + if (strstr(paramValue.c_str(), "true")) + isDelta = true; + } + if (mToggleMirrorRotationBtn->getValue().asBoolean()) - return MIRROR; + return isDelta ? MIRROR_DELTA : MIRROR; if (mToggleSympatheticRotationBtn->getValue().asBoolean()) - return SYMPATHETIC; + return isDelta ? SYMPATHETIC_DELTA : SYMPATHETIC; - if (mToggleDeltaModeBtn->getValue().asBoolean()) - return DELTAMODE; - - return NONE; + return isDelta ? DELTAMODE : NONE; } LLVOAvatar* FSFloaterPoser::getUiSelectedAvatar() const @@ -1525,9 +1547,9 @@ LLVOAvatar* FSFloaterPoser::getAvatarByUuid(const LLUUID& avatarToFind) const void FSFloaterPoser::onAdvancedPositionSet() { - F32 posX = (F32)mAdvPosXSlider->getValue().asReal(); - F32 posY = (F32)mAdvPosYSlider->getValue().asReal(); - F32 posZ = (F32)mAdvPosZSlider->getValue().asReal(); + F32 posX = mAdvPosXSlider->getValueF32(); + F32 posY = mAdvPosYSlider->getValueF32(); + F32 posZ = mAdvPosZSlider->getValueF32(); setSelectedJointsPosition(posX, posY, posZ); refreshAvatarPositionSliders(); @@ -1535,18 +1557,18 @@ void FSFloaterPoser::onAdvancedPositionSet() void FSFloaterPoser::onAdvancedScaleSet() { - F32 scX = (F32)mAdvScaleXSlider->getValue().asReal(); - F32 scY = (F32)mAdvScaleYSlider->getValue().asReal(); - F32 scZ = (F32)mAdvScaleZSlider->getValue().asReal(); + F32 scX = mAdvScaleXSlider->getValueF32(); + F32 scY = mAdvScaleYSlider->getValueF32(); + F32 scZ = mAdvScaleZSlider->getValueF32(); setSelectedJointsScale(scX, scY, scZ); } void FSFloaterPoser::onAvatarPositionSet() { - F32 posX = (F32)mPosXSlider->getValue().asReal(); - F32 posY = (F32)mPosYSlider->getValue().asReal(); - F32 posZ = (F32)mPosZSlider->getValue().asReal(); + F32 posX = mPosXSlider->getValueF32(); + F32 posY = mPosYSlider->getValueF32(); + F32 posZ = mPosZSlider->getValueF32(); setSelectedJointsPosition(posX, posY, posZ); refreshAdvancedPositionSliders(); @@ -1554,55 +1576,40 @@ void FSFloaterPoser::onAvatarPositionSet() void FSFloaterPoser::onLimbTrackballChanged() { - LLVector3 trackPadPos; - LLSD position = mAvatarTrackball->getValue(); - if (position.isArray() && position.size() == 3) + LLVector3 trackPadPos, trackPadDeltaPos; + LLSD position = mAvatarTrackball->getValue(); + LLSD deltaPosition = mAvatarTrackball->getValueDelta(); + + if (position.isArray() && position.size() == 3 && deltaPosition.isArray() && deltaPosition.size() == 3) + { trackPadPos.setValue(position); + trackPadDeltaPos.setValue(deltaPosition); + } else return; - F32 yaw, pitch, roll; - yaw = trackPadPos.mV[VX]; - pitch = trackPadPos.mV[VY]; - roll = trackPadPos.mV[VZ]; - F32 trackPadSensitivity = llmax(gSavedSettings.getF32(POSER_TRACKPAD_SENSITIVITY_SAVE_KEY), 0.0001f); - yaw *= trackPadSensitivity; - pitch *= trackPadSensitivity; - yaw = unWrapScale(yaw) * NormalTrackpadRangeInRads; - pitch = unWrapScale(pitch) * NormalTrackpadRangeInRads; - roll = unWrapScale(roll) * NormalTrackpadRangeInRads; + trackPadPos.mV[VX] *= trackPadSensitivity; + trackPadPos.mV[VY] *= trackPadSensitivity; - if (mToggleDeltaModeBtn->getValue().asBoolean()) - { - F32 deltaYaw, deltaPitch, deltaRoll; - LLSD deltaPosition = mAvatarTrackball->getValueDelta(); - LLVector3 trackPadDeltaPos; - if (deltaPosition.isArray() && deltaPosition.size() == 3) - { - trackPadDeltaPos.setValue(deltaPosition); - deltaYaw = trackPadDeltaPos[VX] * NormalTrackpadRangeInRads; - deltaPitch = trackPadDeltaPos[VY] * NormalTrackpadRangeInRads; - deltaRoll = trackPadDeltaPos[VZ] * NormalTrackpadRangeInRads; - deltaYaw *= trackPadSensitivity; - deltaPitch *= trackPadSensitivity; - - setSelectedJointsRotation(deltaYaw, deltaPitch, deltaRoll); - } - } - else - { - setSelectedJointsRotation(yaw, pitch, roll); - } + trackPadPos.mV[VX] = unWrapScale(trackPadPos.mV[VX]) * NormalTrackpadRangeInRads; + trackPadPos.mV[VY] = unWrapScale(trackPadPos.mV[VY]) * NormalTrackpadRangeInRads; + trackPadPos.mV[VZ] = unWrapScale(trackPadPos.mV[VZ]) * NormalTrackpadRangeInRads; + + trackPadDeltaPos[VX] *= NormalTrackpadRangeInRads * trackPadSensitivity; + trackPadDeltaPos[VY] *= NormalTrackpadRangeInRads * trackPadSensitivity; + trackPadDeltaPos[VZ] *= NormalTrackpadRangeInRads; + + setSelectedJointsRotation(trackPadPos, trackPadDeltaPos); // WARNING! // as tempting as it is to refactor the following to refreshRotationSliders(), don't. // getRotationOfFirstSelectedJoint/setSelectedJointsRotation are // not necessarily symmetric functions (see their remarks). - mLimbYawSlider->setValue(yaw *= RAD_TO_DEG); - mLimbPitchSlider->setValue(pitch *= RAD_TO_DEG); - mLimbRollSlider->setValue(roll *= RAD_TO_DEG); + mLimbYawSlider->setValue(trackPadPos.mV[VX] *= RAD_TO_DEG); + mLimbPitchSlider->setValue(trackPadPos.mV[VY] *= RAD_TO_DEG); + mLimbRollSlider->setValue(trackPadPos.mV[VZ] *= RAD_TO_DEG); } F32 FSFloaterPoser::unWrapScale(F32 scale) @@ -1619,52 +1626,44 @@ F32 FSFloaterPoser::unWrapScale(F32 scale) return result; } -void FSFloaterPoser::onLimbYawPitchRollChanged() +void FSFloaterPoser::onYawPitchRollSliderChanged() { - F32 yaw = (F32)mLimbYawSlider->getValue().asReal(); - F32 pitch = (F32)mLimbPitchSlider->getValue().asReal(); - F32 roll = (F32)mLimbRollSlider->getValue().asReal(); + LLVector3 absoluteRotation, deltaRotation; + absoluteRotation.mV[VX] = mLimbYawSlider->getValueF32() * DEG_TO_RAD; + absoluteRotation.mV[VY] = mLimbPitchSlider->getValueF32() * DEG_TO_RAD; + absoluteRotation.mV[VZ] = mLimbRollSlider->getValueF32() * DEG_TO_RAD; - yaw *= DEG_TO_RAD; - pitch *= DEG_TO_RAD; - roll *= DEG_TO_RAD; + deltaRotation = absoluteRotation - mLastSliderRotation; + mLastSliderRotation = absoluteRotation; - setSelectedJointsRotation(yaw, pitch, roll); + setSelectedJointsRotation(absoluteRotation, deltaRotation); // WARNING! // as tempting as it is to refactor the following to refreshTrackpadCursor(), don't. // getRotationOfFirstSelectedJoint/setSelectedJointsRotation are // not necessarily symmetric functions (see their remarks). F32 trackPadSensitivity = llmax(gSavedSettings.getF32(POSER_TRACKPAD_SENSITIVITY_SAVE_KEY), 0.0001f); - yaw /= trackPadSensitivity; - pitch /= trackPadSensitivity; + absoluteRotation.mV[VX] /= trackPadSensitivity; + absoluteRotation.mV[VY] /= trackPadSensitivity; - yaw /= NormalTrackpadRangeInRads; - pitch /= NormalTrackpadRangeInRads; - roll /= NormalTrackpadRangeInRads; + absoluteRotation.mV[VX] /= NormalTrackpadRangeInRads; + absoluteRotation.mV[VY] /= NormalTrackpadRangeInRads; + absoluteRotation.mV[VZ] /= NormalTrackpadRangeInRads; - mAvatarTrackball->setValue(yaw, pitch, roll); + mAvatarTrackball->setValue(absoluteRotation.getValue()); } void FSFloaterPoser::onAdjustTrackpadSensitivity() { - gSavedSettings.setF32(POSER_TRACKPAD_SENSITIVITY_SAVE_KEY, (F32)mTrackpadSensitivitySlider->getValue().asReal()); + gSavedSettings.setF32(POSER_TRACKPAD_SENSITIVITY_SAVE_KEY, mTrackpadSensitivitySlider->getValueF32()); refreshTrackpadCursor(); } void FSFloaterPoser::refreshTrackpadCursor() { - F32 axis1 = (F32)mLimbYawSlider->getValue().asReal(); - F32 axis2 = (F32)mLimbPitchSlider->getValue().asReal(); - F32 axis3 = (F32)mLimbRollSlider->getValue().asReal(); - - axis1 *= DEG_TO_RAD; - axis2 *= DEG_TO_RAD; - axis3 *= DEG_TO_RAD; - - axis1 /= NormalTrackpadRangeInRads; - axis2 /= NormalTrackpadRangeInRads; - axis3 /= NormalTrackpadRangeInRads; + F32 axis1 = mLimbYawSlider->getValueF32() * DEG_TO_RAD / NormalTrackpadRangeInRads; + F32 axis2 = mLimbPitchSlider->getValueF32() * DEG_TO_RAD / NormalTrackpadRangeInRads; + F32 axis3 = mLimbRollSlider->getValueF32() * DEG_TO_RAD / NormalTrackpadRangeInRads; F32 trackPadSensitivity = llmax(gSavedSettings.getF32(POSER_TRACKPAD_SENSITIVITY_SAVE_KEY), 0.0001f); axis1 /= trackPadSensitivity; @@ -1695,6 +1694,7 @@ void FSFloaterPoser::refreshRotationSliders() { LLVector3 rotation = getRotationOfFirstSelectedJoint(); + mLastSliderRotation = rotation; mLimbYawSlider->setValue(rotation.mV[VX] *= RAD_TO_DEG); mLimbPitchSlider->setValue(rotation.mV[VY] *= RAD_TO_DEG); mLimbRollSlider->setValue(rotation.mV[VZ] *= RAD_TO_DEG); @@ -1727,8 +1727,7 @@ void FSFloaterPoser::setSelectedJointsPosition(F32 x, F32 y, F32 z) if (!mPoserAnimator.isPosingAvatar(avatar)) return; - E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); - LLVector3 vec3 = LLVector3(x, y, z); + LLVector3 vec3 = LLVector3(x, y, z); for (auto item : getUiSelectedPoserJoints()) { @@ -1736,11 +1735,12 @@ void FSFloaterPoser::setSelectedJointsPosition(F32 x, F32 y, F32 z) if (!currentlyPosingJoint) continue; + E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(item->jointName()); mPoserAnimator.setJointPosition(avatar, item, vec3, defl); } } -void FSFloaterPoser::setSelectedJointsRotation(F32 yawInRadians, F32 pitchInRadians, F32 rollInRadians) +void FSFloaterPoser::setSelectedJointsRotation(LLVector3 absoluteRot, LLVector3 deltaRot) { LLVOAvatar *avatar = getUiSelectedAvatar(); if (!avatar) @@ -1749,10 +1749,8 @@ void FSFloaterPoser::setSelectedJointsRotation(F32 yawInRadians, F32 pitchInRadi if (!mPoserAnimator.isPosingAvatar(avatar)) return; - E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); - LLVector3 vec3 = LLVector3(yawInRadians, pitchInRadians, rollInRadians); - auto selectedJoints = getUiSelectedPoserJoints(); - bool savingToExternal = getWhetherToResetBaseRotationOnEdit(); + auto selectedJoints = getUiSelectedPoserJoints(); + bool savingToExternal = getWhetherToResetBaseRotationOnEdit(); for (auto item : selectedJoints) { @@ -1770,8 +1768,9 @@ void FSFloaterPoser::setSelectedJointsRotation(F32 yawInRadians, F32 pitchInRadi continue; } - mPoserAnimator.setJointRotation(avatar, item, vec3, defl, getJointTranslation(item->jointName()), - getJointNegation(item->jointName()), savingToExternal); + E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(item->jointName()); + mPoserAnimator.setJointRotation(avatar, item, isAnyDeltaModeRotation(defl) ? deltaRot : absoluteRot, defl, + getJointTranslation(item->jointName()), getJointNegation(item->jointName()), savingToExternal); } if (savingToExternal) @@ -1787,8 +1786,7 @@ void FSFloaterPoser::setSelectedJointsScale(F32 x, F32 y, F32 z) if (!mPoserAnimator.isPosingAvatar(avatar)) return; - E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); - LLVector3 vec3 = LLVector3(x, y, z); + LLVector3 vec3 = LLVector3(x, y, z); for (auto item : getUiSelectedPoserJoints()) { @@ -1796,6 +1794,7 @@ void FSFloaterPoser::setSelectedJointsScale(F32 x, F32 y, F32 z) if (!currentlyPosingJoint) continue; + E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(item->jointName()); mPoserAnimator.setJointScale(avatar, item, vec3, defl); } } diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index b320d9fee6..e8aadb2985 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -147,8 +147,16 @@ class FSFloaterPoser : public LLFloater /// Gets the current bone-deflection style: encapsulates 'anything else you want to do' while you're manipulating a joint. /// Such as: fiddle the opposite joint too. /// + /// The well-known joint name of the joint to add the row for, eg: mChest. /// A E_BoneDeflectionStyles member. - E_BoneDeflectionStyles getUiSelectedBoneDeflectionStyle() const; + E_BoneDeflectionStyles getUiSelectedBoneDeflectionStyle(const std::string& jointName) const; + + /// + /// Gets whether the supplied joint name should be rotated using the delta method. + /// + /// The deflection to consider. + /// true if the joint should be rotated by delta for any reason, otherwise false. + bool isAnyDeltaModeRotation(const E_BoneDeflectionStyles deflection); /// /// Gets the collection of UUIDs for nearby avatars. @@ -178,7 +186,7 @@ class FSFloaterPoser : public LLFloater /// There may be +/- PI difference two axes, because harmonics. /// Thus keep your UI synced with less gets. /// - void setSelectedJointsRotation(F32 yawInRadians, F32 pitchInRadians, F32 rollInRadians); + void setSelectedJointsRotation(LLVector3 absoluteRot, LLVector3 deltaRot); void setSelectedJointsPosition(F32 x, F32 y, F32 z); void setSelectedJointsScale(F32 x, F32 y, F32 z); @@ -214,8 +222,7 @@ class FSFloaterPoser : public LLFloater void onToggleAdvancedPanel(); void onToggleMirrorChange(); void onToggleSympatheticChange(); - void onToggleDeltaModeChange(); - void setRotationChangeButtons(bool mirror, bool sympathetic, bool togglingDelta); + void setRotationChangeButtons(bool mirror, bool sympathetic); void onUndoLastRotation(); void onRedoLastRotation(); void onUndoLastPosition(); @@ -230,7 +237,7 @@ class FSFloaterPoser : public LLFloater void startPosingSelf(); void stopPosingSelf(); void onLimbTrackballChanged(); - void onLimbYawPitchRollChanged(); + void onYawPitchRollSliderChanged(); void onAvatarPositionSet(); void onAdvancedPositionSet(); void onAdvancedScaleSet(); @@ -369,6 +376,7 @@ class FSFloaterPoser : public LLFloater /// static F32 unWrapScale(F32 scale); + LLVector3 mLastSliderRotation; FSVirtualTrackpad* mAvatarTrackball{ nullptr }; LLSliderCtrl* mTrackpadSensitivitySlider{ nullptr }; diff --git a/indra/newview/fsposeranimator.cpp b/indra/newview/fsposeranimator.cpp index b36000b000..3a585311e6 100644 --- a/indra/newview/fsposeranimator.cpp +++ b/indra/newview/fsposeranimator.cpp @@ -508,10 +508,15 @@ void FSPoserAnimator::setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* j jointPose->setRotationDelta(rot_quat); break; - case DELTAMODE: + case SYMPATHETIC_DELTA: + case MIRROR_DELTA: jointPose->setRotationDelta(rot_quat * jointPose->getRotationDelta()); break; + case DELTAMODE: + jointPose->setRotationDelta(rot_quat * jointPose->getRotationDelta()); + return; + case NONE: default: jointPose->setRotationDelta(rot_quat); @@ -532,13 +537,18 @@ void FSPoserAnimator::setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* j oppositeJointPose->setRotationDelta(rot_quat); break; + case SYMPATHETIC_DELTA: + oppositeJointPose->setRotationDelta(rot_quat * oppositeJointPose->getRotationDelta()); + break; + case MIRROR: inv_quat = LLQuaternion(-rot_quat.mQ[VX], rot_quat.mQ[VY], -rot_quat.mQ[VZ], rot_quat.mQ[VW]); oppositeJointPose->setRotationDelta(inv_quat); break; - case DELTAMODE: - oppositeJointPose->setRotationDelta(rot_quat * oppositeJointPose->getRotationDelta()); + case MIRROR_DELTA: + inv_quat = LLQuaternion(-rot_quat.mQ[VX], rot_quat.mQ[VY], -rot_quat.mQ[VZ], rot_quat.mQ[VW]); + oppositeJointPose->setRotationDelta(inv_quat * oppositeJointPose->getRotationDelta()); break; default: diff --git a/indra/newview/fsposeranimator.h b/indra/newview/fsposeranimator.h index 6821e0aaa9..5237663ff3 100644 --- a/indra/newview/fsposeranimator.h +++ b/indra/newview/fsposeranimator.h @@ -50,10 +50,12 @@ typedef enum E_BoneTypes /// typedef enum E_BoneDeflectionStyles { - NONE = 0, // do nothing additional - MIRROR = 1, // change the other joint, like in a mirror, eg: one left one right - SYMPATHETIC = 2, // change the other joint, but opposite to a mirrored way, eg: both go right or both go left - DELTAMODE = 3, // each selected joint changes by the same supplied amount relative to their current + NONE = 0, // do nothing additional + MIRROR = 1, // change the other joint, like in a mirror, eg: one left one right + SYMPATHETIC = 2, // change the other joint, but opposite to a mirrored way, eg: both go right or both go left + DELTAMODE = 3, // each selected joint changes by the same supplied amount relative to their current + MIRROR_DELTA = 4, // As MIRROR, but applied as negated delta to opposite + SYMPATHETIC_DELTA = 5, // As SYMPATHETIC, but applied as delta } E_BoneDeflectionStyles; /// diff --git a/indra/newview/skins/default/xui/en/floater_fs_poser.xml b/indra/newview/skins/default/xui/en/floater_fs_poser.xml index 6006628827..4148854362 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_poser.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_poser.xml @@ -113,6 +113,16 @@ width="403"> SWAP_YAW_AND_ROLL NEGATE_PITCH SWAP_YAW_AND_ROLL NEGATE_PITCH + + true + true + true + true + true + true + true + true + Body Forehead/Brows @@ -913,12 +923,10 @@ width="403"> image_overlay="Inv_Mesh" image_unselected="Toolbar_Middle_Off" name="delta_mode_toggle" - tool_tip="If changing multiple joints each changes by the same amount, rather than all of them getting the same rotation." + tool_tip="If changing multiple joints each changes by the same amount, rather than all of them getting the same rotation. Also used for breaking Gimbal Lock." width="18" top_delta="0" left_pad="1"> - - /// The well-known joint name of the joint to add the row for, eg: mChest. /// A E_BoneDeflectionStyles member. - E_BoneDeflectionStyles getUiSelectedBoneDeflectionStyle(const std::string& jointName) const; + E_BoneDeflectionStyles getUiSelectedBoneDeflectionStyle() const; /// - /// Gets whether the supplied joint name should be rotated using the delta method. + /// Gets the means by which the rotation should be applied to the supplied joint name. + /// Such as: fiddle the opposite joint too. /// - /// The deflection to consider. - /// true if the joint should be rotated by delta for any reason, otherwise false. - bool isAnyDeltaModeRotation(const E_BoneDeflectionStyles deflection); + /// The well-known joint name of the joint to add the row for, eg: mChest. + /// A E_RotationStyle member. + E_RotationStyle getUiSelectedBoneRotationStyle(const std::string& jointName) const; /// /// Gets the collection of UUIDs for nearby avatars. diff --git a/indra/newview/fsjointpose.cpp b/indra/newview/fsjointpose.cpp index 7c86f9c6cf..aa605e9f55 100644 --- a/indra/newview/fsjointpose.cpp +++ b/indra/newview/fsjointpose.cpp @@ -169,13 +169,30 @@ void FSJointPose::swapRotationWith(FSJointPose* oppositeJoint) if (mIsCollisionVolume) return; - LLJoint* joint = mJointState->getJoint(); - if (!joint) + auto tempRot = FSJointRotation(mRotation); + mRotation = FSJointRotation(oppositeJoint->mRotation); + oppositeJoint->mRotation = tempRot; +} + +void FSJointPose::cloneRotationFrom(FSJointPose* fromJoint) +{ + if (!fromJoint) return; - auto tempRot = FSJointRotation(mRotation); - mRotation = FSJointRotation(oppositeJoint->mRotation); - oppositeJoint->mRotation = tempRot; + mRotation = FSJointRotation(fromJoint->mRotation); +} + +void FSJointPose::mirrorRotationFrom(FSJointPose* fromJoint) +{ + if (!fromJoint) + return; + + cloneRotationFrom(fromJoint); + + mRotation.baseRotation = LLQuaternion(-mRotation.baseRotation.mQ[VX], mRotation.baseRotation.mQ[VY], -mRotation.baseRotation.mQ[VZ], + mRotation.baseRotation.mQ[VW]); + mRotation.deltaRotation = LLQuaternion(-mRotation.deltaRotation.mQ[VX], mRotation.deltaRotation.mQ[VY], -mRotation.deltaRotation.mQ[VZ], + mRotation.deltaRotation.mQ[VW]); } void FSJointPose::revertJointScale() diff --git a/indra/newview/fsjointpose.h b/indra/newview/fsjointpose.h index 5249451207..3983eef773 100644 --- a/indra/newview/fsjointpose.h +++ b/indra/newview/fsjointpose.h @@ -147,6 +147,16 @@ class FSJointPose /// void swapRotationWith(FSJointPose* oppositeJoint); + /// + /// Clones the rotation to this from the supplied joint. + /// + void cloneRotationFrom(FSJointPose* fromJoint); + + /// + /// Mirrors the rotation to this from the supplied joint. + /// + void mirrorRotationFrom(FSJointPose* fromJoint); + /// /// Resets the beginning properties of the joint this represents. /// diff --git a/indra/newview/fsposeranimator.cpp b/indra/newview/fsposeranimator.cpp index 5309b9e92e..6845e8419c 100644 --- a/indra/newview/fsposeranimator.cpp +++ b/indra/newview/fsposeranimator.cpp @@ -496,8 +496,9 @@ LLVector3 FSPoserAnimator::getJointRotation(LLVOAvatar* avatar, const FSPoserJoi return translateRotationFromQuaternion(translation, negation, jointPose->getRotationDelta()); } -void FSPoserAnimator::setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* joint, const LLVector3& rotation, E_BoneDeflectionStyles style, E_BoneAxisTranslation translation, S32 negation, - bool resetBaseRotationToZero) +void FSPoserAnimator::setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* joint, const LLVector3& absRotation, + const LLVector3& deltaRotation, E_BoneDeflectionStyles deflectionStyle, + E_BoneAxisTranslation translation, S32 negation, bool resetBaseRotationToZero, E_RotationStyle rotationStyle) { if (!isAvatarSafeToUse(avatar)) return; @@ -515,26 +516,35 @@ void FSPoserAnimator::setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* j if (resetBaseRotationToZero) jointPose->zeroBaseRotation(); - LLQuaternion rot_quat = translateRotationToQuaternion(translation, negation, rotation); - switch (style) + LLQuaternion absRot = translateRotationToQuaternion(translation, negation, absRotation); + LLQuaternion deltaRot = translateRotationToQuaternion(translation, negation, deltaRotation); + switch (deflectionStyle) { case SYMPATHETIC: case MIRROR: - jointPose->setRotationDelta(rot_quat); + if (rotationStyle == DELTAIC_ROT) + jointPose->setRotationDelta(deltaRot * jointPose->getRotationDelta()); + else + jointPose->setRotationDelta(absRot); + break; case SYMPATHETIC_DELTA: case MIRROR_DELTA: - jointPose->setRotationDelta(rot_quat * jointPose->getRotationDelta()); + jointPose->setRotationDelta(deltaRot * jointPose->getRotationDelta()); break; case DELTAMODE: - jointPose->setRotationDelta(rot_quat * jointPose->getRotationDelta()); + jointPose->setRotationDelta(deltaRot * jointPose->getRotationDelta()); return; case NONE: default: - jointPose->setRotationDelta(rot_quat); + if (rotationStyle == DELTAIC_ROT) + jointPose->setRotationDelta(deltaRot * jointPose->getRotationDelta()); + else + jointPose->setRotationDelta(absRot); + return; } @@ -542,27 +552,23 @@ void FSPoserAnimator::setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* j if (!oppositeJointPose) return; - if (resetBaseRotationToZero) - oppositeJointPose->zeroBaseRotation(); - LLQuaternion inv_quat; - switch (style) + switch (deflectionStyle) { case SYMPATHETIC: - oppositeJointPose->setRotationDelta(rot_quat); + oppositeJointPose->cloneRotationFrom(jointPose); break; case SYMPATHETIC_DELTA: - oppositeJointPose->setRotationDelta(rot_quat * oppositeJointPose->getRotationDelta()); + oppositeJointPose->setRotationDelta(deltaRot * oppositeJointPose->getRotationDelta()); break; case MIRROR: - inv_quat = LLQuaternion(-rot_quat.mQ[VX], rot_quat.mQ[VY], -rot_quat.mQ[VZ], rot_quat.mQ[VW]); - oppositeJointPose->setRotationDelta(inv_quat); + oppositeJointPose->mirrorRotationFrom(jointPose); break; case MIRROR_DELTA: - inv_quat = LLQuaternion(-rot_quat.mQ[VX], rot_quat.mQ[VY], -rot_quat.mQ[VZ], rot_quat.mQ[VW]); + inv_quat = LLQuaternion(-deltaRot.mQ[VX], deltaRot.mQ[VY], -deltaRot.mQ[VZ], deltaRot.mQ[VW]); oppositeJointPose->setRotationDelta(inv_quat * oppositeJointPose->getRotationDelta()); break; diff --git a/indra/newview/fsposeranimator.h b/indra/newview/fsposeranimator.h index 5c92d4b68a..109044b58b 100644 --- a/indra/newview/fsposeranimator.h +++ b/indra/newview/fsposeranimator.h @@ -54,10 +54,24 @@ typedef enum E_BoneDeflectionStyles MIRROR = 1, // change the other joint, like in a mirror, eg: one left one right SYMPATHETIC = 2, // change the other joint, but opposite to a mirrored way, eg: both go right or both go left DELTAMODE = 3, // each selected joint changes by the same supplied amount relative to their current - MIRROR_DELTA = 4, // As MIRROR, but applied as negated delta to opposite - SYMPATHETIC_DELTA = 5, // As SYMPATHETIC, but applied as delta + MIRROR_DELTA = 4, // Applies a MIRROR delta, this limb and its opposite change by opposite amount + SYMPATHETIC_DELTA = 5, // Applies a SYMPATHETIC delta, this limb and the opposite change by the same amount } E_BoneDeflectionStyles; +/// +/// Joints may have rotations applied by applying an absolute value or a delta value. +/// When applying a rotation as absolutes, feedback via the UI can tend to Gimbal lock control of the quaternion. +/// For certain joints, particularly "down the centreline", absolute rotations provide the best feel. +/// For other joints, such as hips, knees, elbows and wrists, Gimbal lock readily occurs (sitting poses particularly), and +/// applying small angle changes directly to the quaternion (rather than going via the locked absolute) makes for +/// a more sensible user experience. +/// +typedef enum E_RotationStyle +{ + ABSOLUTE_ROT = 0, // The rotation should be applied as an absolute value because while it can Gimbal lock, it doesn't happen often. + DELTAIC_ROT = 1, // The rotation should be applied as a delta value because it is apt to Gimbal lock. +} E_RotationStyle; + /// /// When we're going from bone-rotation to the UI sliders, some of the axes need swapping so they make sense in UI-terms. /// eg: for one bone, the X-axis may mean up and down, but for another bone, the x-axis might be left-right. @@ -457,13 +471,15 @@ public: /// /// The avatar whose joint is to be set. /// The joint to set. - /// The rotation to set the joint to. + /// The absolute rotation to apply to the joint, if appropriate. + /// The delta of rotation to apply to the joint, if appropriate. /// Any ancilliary action to be taken with the change to be made. /// The axial translation form the supplied joint. /// The style of negation to apply to the set. /// Whether to set the base rotation to zero on setting the rotation. - void setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* joint, const LLVector3& rotation, E_BoneDeflectionStyles style, - E_BoneAxisTranslation translation, S32 negation, bool resetBaseRotationToZero); + /// Whether to apply the supplied rotation as a delta to the supplied joint. + void setJointRotation(LLVOAvatar* avatar, const FSPoserJoint* joint, const LLVector3& absRotation, const LLVector3& deltaRotation, E_BoneDeflectionStyles style, + E_BoneAxisTranslation translation, S32 negation, bool resetBaseRotationToZero, E_RotationStyle rotationStyle); /// /// Gets the scale of a joint for the supplied avatar. From 42873ea04cdc7e7c5b709118d9d77b3c81fc3ffa Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Mon, 2 Dec 2024 23:02:12 +0000 Subject: [PATCH 18/43] FIRE-34884: Refresh position sliders if reset position --- indra/newview/fsfloaterposer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 3349c16e3b..0a8988b68a 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -588,6 +588,7 @@ void FSFloaterPoser::onPoseJointsReset() refreshRotationSliders(); refreshTrackpadCursor(); + refreshAvatarPositionSliders(); } void FSFloaterPoser::onPoseMenuAction(const LLSD& param) From 40d852bf3fbcc02bd3528b12cd820aa2931c85eb Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Wed, 4 Dec 2024 19:48:50 +0000 Subject: [PATCH 19/43] FIRE-34884: Review changes 1 The const gardener. --- indra/newview/fsfloaterposer.cpp | 4 ++-- indra/newview/fsfloaterposer.h | 2 +- indra/newview/fsposingmotion.cpp | 2 +- indra/newview/fsposingmotion.h | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 0a8988b68a..b8ba07703a 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -1454,7 +1454,7 @@ E_RotationStyle FSFloaterPoser::getUiSelectedBoneRotationStyle(const std::string return ABSOLUTE_ROT; std::string paramValue = getString(XML_JOINT_DELTAROT_STRING_PREFIX + jointName); - if (strstr(paramValue.c_str(), "true")) + if (paramValue == "true") return DELTAIC_ROT; return ABSOLUTE_ROT; @@ -1745,7 +1745,7 @@ void FSFloaterPoser::setSelectedJointsPosition(F32 x, F32 y, F32 z) } } -void FSFloaterPoser::setSelectedJointsRotation(LLVector3 absoluteRot, LLVector3 deltaRot) +void FSFloaterPoser::setSelectedJointsRotation(const LLVector3& absoluteRot, const LLVector3& deltaRot) { LLVOAvatar *avatar = getUiSelectedAvatar(); if (!avatar) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index 07d4941497..f847fb587a 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -186,7 +186,7 @@ class FSFloaterPoser : public LLFloater /// There may be +/- PI difference two axes, because harmonics. /// Thus keep your UI synced with less gets. /// - void setSelectedJointsRotation(LLVector3 absoluteRot, LLVector3 deltaRot); + void setSelectedJointsRotation(const LLVector3& absoluteRot, const LLVector3& deltaRot); void setSelectedJointsPosition(F32 x, F32 y, F32 z); void setSelectedJointsScale(F32 x, F32 y, F32 z); diff --git a/indra/newview/fsposingmotion.cpp b/indra/newview/fsposingmotion.cpp index dabc88bb4d..e39c6569b0 100644 --- a/indra/newview/fsposingmotion.cpp +++ b/indra/newview/fsposingmotion.cpp @@ -282,7 +282,7 @@ bool FSPosingMotion::vectorsNotQuiteEqual(LLVector3 v1, LLVector3 v2) const return true; } -bool FSPosingMotion::quatsNotQuiteEqual(LLQuaternion q1, LLQuaternion q2) const +bool FSPosingMotion::quatsNotQuiteEqual(const LLQuaternion& q1, const LLQuaternion& q2) const { if (vectorAxesAlmostEqual(q1.mQ[VW], q2.mQ[VW]) && vectorAxesAlmostEqual(q1.mQ[VX], q2.mQ[VX]) && diff --git a/indra/newview/fsposingmotion.h b/indra/newview/fsposingmotion.h index cbfbc6fb6a..103e9bda6a 100644 --- a/indra/newview/fsposingmotion.h +++ b/indra/newview/fsposingmotion.h @@ -202,12 +202,12 @@ private: bool vectorsNotQuiteEqual(LLVector3 v1, LLVector3 v2) const; /// - /// Determines if two vectors are near enough to equal. + /// Determines if two quaternions are near enough to equal. /// - /// The first vector to compare. - /// The sceond vector to compare. - /// true if the vectors are "close enough", otherwise false. - bool quatsNotQuiteEqual(LLQuaternion q1, LLQuaternion q2) const; + /// The first quaternion to compare. + /// The sceond quaternion to compare. + /// true if the quaternion are "close enough", otherwise false. + bool quatsNotQuiteEqual(const LLQuaternion& q1, const LLQuaternion& q2) const; bool vectorAxesAlmostEqual(F32 qA, F32 qB) const { return llabs(qA - qB) < closeEnough; } }; From ed6cc6319dfe5e4868aab3a3ea57101d6e97298f Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Mon, 9 Dec 2024 23:36:29 +0000 Subject: [PATCH 20/43] FIRE-34884: Add undo to clone Mirror and Sympathetic were not undo-ing the opposite joint --- indra/newview/fsjointpose.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/fsjointpose.cpp b/indra/newview/fsjointpose.cpp index aa605e9f55..b6bb99bf95 100644 --- a/indra/newview/fsjointpose.cpp +++ b/indra/newview/fsjointpose.cpp @@ -179,6 +179,7 @@ void FSJointPose::cloneRotationFrom(FSJointPose* fromJoint) if (!fromJoint) return; + addToUndo(mRotation, &mUndoneRotationIndex, &mLastSetRotationDeltas, &mTimeLastUpdatedRotation); mRotation = FSJointRotation(fromJoint->mRotation); } From a3c2c72143d39233d6a34f52647f2595f9fb0b65 Mon Sep 17 00:00:00 2001 From: Angeldark Raymaker Date: Fri, 13 Dec 2024 23:11:46 +0000 Subject: [PATCH 21/43] FIRE-34884: All rotating mirror joints if selected both and not mirror/sym --- indra/newview/fsfloaterposer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index b8ba07703a..91b79d8e70 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -1770,7 +1770,8 @@ void FSFloaterPoser::setSelectedJointsRotation(const LLVector3& absoluteRot, con bool oppositeJointAlsoSelectedOnUi = std::find(selectedJoints.begin(), selectedJoints.end(), oppositeJoint) != selectedJoints.end(); - if (oppositeJointAlsoSelectedOnUi && item->dontFlipOnMirror()) + bool deflectionDoesOppositeLimbs = !(defl == NONE || defl == DELTAMODE); + if (oppositeJointAlsoSelectedOnUi && deflectionDoesOppositeLimbs && item->dontFlipOnMirror()) continue; } From 2fbac952c55deaa77428e1cc82a4222dc2121e52 Mon Sep 17 00:00:00 2001 From: minerjr Date: Mon, 30 Dec 2024 11:18:46 -0400 Subject: [PATCH 22/43] FIRE-35019 - Add LLHUBNameTag background to floating text and hover highlights Added background image based upon the LLHUBNameTag background to LLHUBText Added flag to highlight LLHUBText attached to prims that the user hovers the cursor over. Added new value to track if user wants backgrounds on all floating text, only the one that is currently highlighted or none. Added new Preferences->User Interface->3D World options to disable the Hover over prim to higlight floating text and Show floating text background options. Defaulted to off. Added new Floating Text tab to the Preferences->Colors panel to control the opacity of the LLHUBText background, independant of the LLHUBNameTag value Added three new persist values into the setting.xml file, FSHudTextShowBackground, FSHudTextBackgroundOpacity and FSHudTextUseHoverHighlight Fixed up code commit to better follow the standards for Firestorm Viewer as well as re-factor the code to be cleaner and removed some uncessecary code. --- indra/newview/app_settings/settings.xml | 35 ++++ indra/newview/llhudobject.cpp | 22 +++ indra/newview/llhudobject.h | 8 + indra/newview/llhudtext.cpp | 179 ++++++++++++++++-- indra/newview/llhudtext.h | 31 ++- indra/newview/lltoolpie.cpp | 31 +++ indra/newview/llviewerobject.cpp | 30 +++ indra/newview/llviewerobject.h | 4 + .../default/xui/en/panel_preferences_UI.xml | 63 +++++- .../xui/en/panel_preferences_colors.xml | 30 +++ 10 files changed, 417 insertions(+), 16 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e883c77adc..66c206a48d 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25106,6 +25106,41 @@ Change of this parameter will affect the layout of buttons in notification toast SanityComment This value needs to be greater than 0 for a fading effect. + + FSHudTextShowBackground + + Comment + Displays a black/white background behind the prim floating text to make the text more readable + Persist + 1 + Type + S32 + Value + 0 + + FSHudTextBackgroundOpacity + + Comment + Opacity of floating text background (0.0 = completely transparent, 1.0 = completely opaque) + Persist + 1 + Type + F32 + Value + 0.75 + + FSHudTextUseHoverHighlight + + Comment + When an object is being hovered over, highlight the HUD text by moving to the foreground and disable alpha + Persist + 1 + Type + Boolean + Value + 0 + + FSStartupClearBrowserCache Comment diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 1dd136f61f..e0d6f55c1c 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -52,6 +52,25 @@ struct hud_object_further_away bool hud_object_further_away::operator()(const LLPointer& lhs, const LLPointer& rhs) const { + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // This overrides distance comparision if either of the objects is highlighted. + // Get the FSHudTextUseHoverHighlight value from the saved settings and if it is enabled, then check if either object is highlighed + static LLCachedControl mbUseHoverHighlight(*LLControlGroup::getInstance("Global"), "FSHudTextUseHoverHighlight"); + if (mbUseHoverHighlight) + { + // If the left object is highlighted then return false to force it be closer to the screen. + if (lhs->getIsHighlighted()) + { + return false; + } + // Else if the right object is highlighted, then return true to force it to be closer to the screen. + else if (rhs->getIsHighlighted()) + { + return true; + } + } + // Otherwise, neither object is heighlighted, so fall back to the normal distance comparison. + // [FIRE-35019] return lhs->getDistance() > rhs->getDistance(); } @@ -64,6 +83,9 @@ LLHUDObject::LLHUDObject(const U8 type) : mVisible = true; mType = type; mDead = false; + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + mbIsHighlighted = false; // Default is off + // [FIRE-35019] } LLHUDObject::~LLHUDObject() diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 8c628e3f92..39cb115204 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -60,6 +60,11 @@ public: bool isVisible() const { return mVisible; } + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // Accessor methods for indicating if the HUB object is highlighted + void setIsHighlighted(bool isHighlighted) { mbIsHighlighted = isHighlighted; } + bool getIsHighlighted() const { return mbIsHighlighted; } + // [FIRE-35019] U8 getType() const { return mType; } LLVector3d getPositionGlobal() const { return mPositionGlobal; } @@ -111,6 +116,9 @@ protected: U8 mType; bool mDead; bool mVisible; + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + bool mbIsHighlighted; // Flag to determine if the object is currently highlighted by hover + // [FIRE-35019] LLVector3d mPositionGlobal; LLPointer mSourceObject; LLPointer mTargetObject; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 15a4c8a69e..b6c35a8889 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -55,6 +55,12 @@ const F32 HORIZONTAL_PADDING = 15.f; const F32 VERTICAL_PADDING = 12.f; const F32 BUFFER_SIZE = 2.f; const F32 HUD_TEXT_MAX_WIDTH = 190.f; +// [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights +const F32 LINE_PADDING = 3.f; // aka "leading" - Taken from LLHUBNameTag +const S32 SHOW_BACKGROUND_NONE = 0; // Default value and disables the LLHUBText background +const S32 SHOW_BACKGROUND_ONLY_HIGHLIGHTED = 1; // Only LLHUBText that is part of the highlighted prim will have a background +const S32 SHOW_BACKGROUND_ALL = 2; // All prims that have a LLHUBText will have a background, but the highlighted prim will have a non-transparent background. +// [FIRE-35019] const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f; const F32 MAX_DRAW_DISTANCE = 300.f; @@ -93,11 +99,20 @@ LLHUDText::LLHUDText(const U8 type) : mFadeDistance = gSavedSettings.getF32("FSHudTextFadeDistance"); mFadeRange = gSavedSettings.getF32("FSHudTextFadeRange"); // + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + mLastDistance = 0.0f; // Just to get rid of a compiler warning + // [FIRE-35019] mZCompare = true; mOffscreen = false; mRadius = 0.1f; LLPointer ptr(this); sTextObjects.insert(ptr); + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + mRoundedRectImgp = LLUI::getUIImage("Rounded_Rect"); // Taken from LLHUBNameTag, uses the existing art asset + mBackgroundHeight = 0.0f; // Default background height to 0.0 + mBackgroundOffsetY = 0.0f; // Default background Y offset to 0.0 + mLuminance = 1.0f; // Default luminance is 1.0 as the default color is white (1.0, 1.0, 1.0, 1.0) + // [FIRE-35019] } LLHUDText::~LLHUDText() @@ -108,7 +123,21 @@ void LLHUDText::render() { if (!mOnHUDAttachment && sDisplayText) { - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + // If the current text object is highighed and the use hover highlight feature is enabled, then + // disable writing to the depth buffer + static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); + if (mbUseHoverHighlight && mbIsHighlighted) + { + LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); + } + //Else, use the standard method of writing to the depth buffer for all other non-highlighted text objects + else + { + LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + } + // [FIRE-35019] //LLGLDisable gls_stencil(GL_STENCIL_TEST); renderText(); } @@ -128,7 +157,13 @@ void LLHUDText::renderText() LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; LLColor4 text_color = mColor; - if (mDoFade) + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //if (mDoFade) + static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); // Flag to indicate if hover highlight of prims is enabled + static LLCachedControl mShowBackground(gSavedSettings, "FSHudTextShowBackground"); // Show background values (0 - off, 1 - only highlighted prims, 2 - all prims) + // Support fading the text if the text is not highlighted and only if use hover highlight flag is set + if (mDoFade && (!mbUseHoverHighlight || (mbUseHoverHighlight && !mbIsHighlighted))) + // [FIRE-35019] { // FIRE-17393: Control HUD text fading by options //if (mLastDistance > mFadeDistance) @@ -143,16 +178,43 @@ void LLHUDText::renderText() { return; } + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //If there is only 1 string and it is blank, don't render as it could add a background on a prim with no text + if ((S32)mTextSegments.size() == 1 && mTextSegments[0].isBlank()) + { + return; + } + // [FIRE-35019] shadow_color.mV[3] = text_color.mV[3]; mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: make this a per-text setting - static LLCachedControl bubble_opacity(gSavedSettings, "ChatBubbleOpacity"); - static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor"); - LLColor4 bg_color = nametag_bg_color; - bg_color.setAlpha(bubble_opacity * alpha_factor); - + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // static LLCachedControl bubble_opacity(gSavedSettings, "ChatBubbleOpacity"); + // static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor"); + // LLColor4 bg_color = nametag_bg_color; + // bg_color.setAlpha(bubble_opacity * alpha_factor); + // Use new background opacity value, independant of the LLHUBNameTag value + static LLCachedControl background_opacity(gSavedSettings, "FSHudTextBackgroundOpacity"); // Can be modified under Preferences->Colors->Floating Text tab + LLColor4 bg_color = LLColor4::black; // Default the background to black color + bg_color.setAlpha(background_opacity * alpha_factor); + // If the show background flag is set, so change the background color depending on the luminance + if (mShowBackground) + { + // If the luminance is below 40%, then use white background color + if (mLuminance <= 0.4f) + { + bg_color.set(LLColor3::white); // Set background color keep the alpha + } + // If hover highlight is enabled and the text object is highlighted then, change the alpha value (Background Opacity if only highlighted objects + // have a background, otherwise, use the alpha value (which should be 1.0)) + if (mbUseHoverHighlight && mbIsHighlighted) + { + bg_color.setAlpha(mShowBackground == SHOW_BACKGROUND_ONLY_HIGHLIGHTED ? background_opacity : alpha_factor); + } + } + // [FIRE-35019] const S32 border_height = 16; const S32 border_width = 16; @@ -199,6 +261,21 @@ void LLHUDText::renderText() F32 y_offset = (F32)mOffsetY; // Render label + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // Render text window background + // Don't add if the parent object is attached (clothing on player avatar: as some cloths have blank text and render a background...) + // Also, only show the background if it is show all is checked, or if on highlight, only if use hover highlight is enabled. + if ((mShowBackground == SHOW_BACKGROUND_ALL || + mShowBackground == SHOW_BACKGROUND_ONLY_HIGHLIGHTED && mbIsHighlighted && mbUseHoverHighlight) && + mSourceObject->getAttachmentState() == 0) + { + LLRect screen_rect; + screen_rect.setCenterAndSize(0, static_cast(lltrunc(-mBackgroundHeight / 2 + mOffsetY + mBackgroundOffsetY)), + static_cast(lltrunc(mWidth)), + static_cast(lltrunc(mBackgroundHeight))); + mRoundedRectImgp->draw3D(render_position, x_pixel_vec, y_pixel_vec, screen_rect, bg_color); + } + // [FIRE-35019] // Render text { @@ -219,8 +296,11 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics - + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics + y_offset -= fontp->getLineHeight(); // Match the same positioning as LLHUBNameTag as the windows don't line up otherwise. + y_offset -= LINE_PADDING; + // [FIRE-35019] U8 style = segment_iter->mStyle; LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW; @@ -232,6 +312,10 @@ void LLHUDText::renderText() else // ALIGN_LEFT { x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f); + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // *HACK -> borrowed from LLHUBNameTag to match + x_offset += 1; + // [FIRE-35019] } text_color = segment_iter->mColor; @@ -240,6 +324,13 @@ void LLHUDText::renderText() text_color = linearColor4(text_color); } text_color.mV[VALPHA] *= alpha_factor; + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // If the text object is highlighted and use hover highlight is enabled, then reset the alpha factor (1.0f) + if (mbUseHoverHighlight && mbIsHighlighted) + { + text_color.mV[VALPHA] = alpha_factor; + } + // [FIRE-35019] hud_render_text(segment_iter->getText(), render_position, *fontp, style, shadow, x_offset, y_offset, text_color, mOnHUDAttachment); } @@ -336,6 +427,13 @@ void LLHUDText::setFont(const LLFontGL* font) void LLHUDText::setColor(const LLColor4 &color) { mColor = color; + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // Added luminance value for the text color to determine if the background should be white or black + // Based upon https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color + // used Digital ITU BT.601 (gives more weight to the R and B components): + // Y = 0.299 R + 0.587 G + 0.114 B + mLuminance = 0.299f * mColor.mV[0] + 0.587f * mColor.mV[1] + 0.114f * mColor.mV[2]; + // [FIRE-35019] for (std::vector::iterator segment_iter = mTextSegments.begin(); segment_iter != mTextSegments.end(); ++segment_iter ) { @@ -361,6 +459,15 @@ void LLHUDText::setDoFade(const bool do_fade) void LLHUDText::updateVisibility() { + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // Create local doFade flag based upon member doFade flag and overide it if the object is highlighted and hover highlight is enabled. + bool doFade = mDoFade; + static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); + if (mbUseHoverHighlight && mbIsHighlighted) + { + doFade = false; + } + // [FIRE-35019] if (mSourceObject) { mSourceObject->updateText(); @@ -421,7 +528,11 @@ void LLHUDText::updateVisibility() mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); - if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) + // Use local do fade check to allow highlighed objects to force text to be visible + if (!mTextSegments.size() || (doFade && (mLastDistance > mFadeDistance + mFadeRange))) + // [FIRE-35019] { mVisible = false; return; @@ -522,7 +633,14 @@ void LLHUDText::updateSize() { F32 height = 0.f; F32 width = 0.f; - + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // We want to create a background that fits just the visible text area only, otherwise a llsetstring('Hello, World\n\n\n') will have a text + // box that covers 4 lines, but only the top line is visible to the user. + // Another example is llsetstring('\n\n\nHello, World'), which would also have a 4 line high window, but the text be visible only on the last line. + F32 backgroundFirstNoneBlankPosition = 0.0f; // Stores the position just above the first non blank line + F32 backgroundLastNoneBlankPosition = 0.0f; // Stores the position just below the last none blank line + bool firstNoneBlank = true; // Flag to determine that if the first blank line has been reached and to store the first none black position + // [FIRE-35019] S32 max_lines = getMaxLines(); S32 start_segment; @@ -533,11 +651,41 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics - width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics + //width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); + + //If there is no blank on the current line, skip over it so that we don't make the window cover the empty space above or below a blank text box. + if (!iter->isBlank()) + { + //If this is the first line without a blank, get the height above current line (0.0 for line 1, previous height if not the first line + if (firstNoneBlank) + { + backgroundFirstNoneBlankPosition = height; + firstNoneBlank = false; + } + //Always get the position below the non-blank line + backgroundLastNoneBlankPosition = height + fontp->getLineHeight() + LINE_PADDING; + } + // + height += fontp->getLineHeight(); // Taken from LLHUBNameTa::UpdateSize + height += LINE_PADDING; // Taken from LLHUBNameTa::UpdateSize + // The max width of the text is set to HUD_TEXT_MAX_WIDTH_NO_BUBBLE and not HUD_TEXT_MAX_WIDTH, so the window would be limited but the text could spill over... + width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH_NO_BUBBLE)); + // [FIRE-35019] ++iter; } + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // Don't want line spacing under the last line (Taken from LLHUBNameTa::UpdateSize) + if (height > 0.f) + { + height -= LINE_PADDING; + // Also update the background last non blank position by the LINE_PADDING + backgroundLastNoneBlankPosition -= LINE_PADDING; + } + // [FIRE-35019] + if (width == 0.f) { return; @@ -550,6 +698,11 @@ void LLHUDText::updateSize() F32 u = 1.f; mWidth = llmax(width, lerp(mWidth, (F32)width, u)); mHeight = llmax(height, lerp(mHeight, (F32)height, u)); + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + backgroundLastNoneBlankPosition += VERTICAL_PADDING; // Add the vertical padding to the last non-blank position + mBackgroundOffsetY = backgroundFirstNoneBlankPosition; // Set the background Y offset to the top of the first blank + mBackgroundHeight = backgroundLastNoneBlankPosition - backgroundFirstNoneBlankPosition; // Set the background height to the difference between the top of the first non-blank, and bottom of the last non-blank line + // [FIRE-35019] } void LLHUDText::updateAll() diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 3130dbf271..4aa22c0d6e 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -59,11 +59,30 @@ protected: mStyle(style), mText(text), mFont(font) - {} + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + //{} + { + // Added a bool check to see if the current line is blank (empty, or has only a single space character stored. + // There are issues with users using "Hello World \n \n \n \n" as strings which would create a 4 text segments, but only 1 had actual text + // and the background would cover all 4, and would not look nice. So store a flag on each segment to see if it is blank, so we don't have to + // do the check every frame for every text segment. + if (text.length() == 0 || text.find_first_not_of(utf8str_to_wstring(" "), 0) == std::string::npos) + { + mbIsBlank = true; + } + else + { + mbIsBlank = false; + } + } + // [FIRE-35019] F32 getWidth(const LLFontGL* font); const LLWString& getText() const { return mText; } void clearFontWidthMap() { mFontWidthMap.clear(); } + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + bool isBlank() { return mbIsBlank; } // Accessor method for checking to see if the current Text Segment is blank + // [FIRE-35019] LLColor4 mColor; LLFontGL::StyleFlags mStyle; const LLFontGL* mFont; @@ -71,6 +90,9 @@ protected: private: LLWString mText; std::map mFontWidthMap; + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + bool mbIsBlank; // True if mText length is 0, or only contains " " characters, otherwise false + // [FIRE-35019] }; public: @@ -177,7 +199,12 @@ private: // [RLVa:KB] - Checked: RLVa-1.0.0 std::string mObjText; // [/RLVa:KB] - + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + LLPointer mRoundedRectImgp; // Added background rect image from LLHUBNameTag + F32 mBackgroundHeight; // Store the actual height of the background image (calculated from the visible text segments) + F32 mBackgroundOffsetY; // Store the offset of the top of the first visible text segment + F32 mLuminance; // Store the luminance of the text (used to determine if the background should be white or black for higher contrast) + // [FIRE-35019] static bool sDisplayText ; static std::set > sTextObjects; static std::vector > sVisibleTextObjects; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c5eb17e125..b06c190d4a 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -848,6 +848,26 @@ void LLToolPie::selectionPropertiesReceived() bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // We want to unhighlight the previous hover object's parent before we get the next hover pick and lose the reference + // (Possible optimization - check if the current object and previous ones are the same, and if so, don't set the text is highlighed flag to false) + LLViewerObject* oldObject = NULL; + LLViewerObject* oldParent = NULL; + // If the previous mHoverPick object is valid, then try to set the Text Is Highlighted flag to false to clear it. + if (mHoverPick.isValid()) + { + oldObject = mHoverPick.getObject(); + if (oldObject) + { + oldParent = oldObject->getRootEdit(); + if (oldParent) + { + // We want to set the parent object's flag to false, and it will recursively change until it finds a valid mText object. + oldParent->setTextIsHighlighted(false); + } + } + } + // [FIRE-35019] mHoverPick = gViewerWindow->pickImmediate(x, y, false, pick_rigged); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); @@ -940,6 +960,17 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { LLViewerMediaFocus::getInstance()->clearHover(); } + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // If there is an object that was hovered over, set the root of the object to have the text highlighted. + // This will work if the parent does not have a LLHUBText object, but a child does. + else + { + if (parent) + { + parent->setTextIsHighlighted(true); + } + } + // [FIRE-35019] return true; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9b28e39185..fff7cc561f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6141,6 +6141,36 @@ void LLViewerObject::updateText() } } +// [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights +// Method that sets the current viewer object's mText to be highlighted or the objects children if there is no mText. +void LLViewerObject::setTextIsHighlighted(bool is_highlighted) +{ + // If the object it not dead, try to set the highlight value + if (!isDead()) + { + // Check to see if the current LLHUBText object is not null, most of the time the root object contains the floating text. + if (mText.notNull()) + { + mText->setIsHighlighted(is_highlighted); + } + // But in case the current object does not, try to set all the children to use the flag + else + { + // Else, there may be children with the LLHUBText objects.. + for (child_list_t::const_iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) + { + LLViewerObject* child = *iter; + // If the child is not an avatar, then try to set it's text is highlighed flag, which should recussivly get to all sub children. (Kind of hope not a lot of prims with this setup) + if (!child->isAvatar()) + { + child->setTextIsHighlighted(is_highlighted); + } + } + } + } +} +// [FIRE-35019] + bool LLViewerObject::isOwnerInMuteList(LLUUID id) { LLUUID owner_id = id.isNull() ? mOwnerID : id; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index e5a62b080f..2db3b171bb 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -498,6 +498,10 @@ public: void updatePositionCaches() const; // Update the global and region position caches from the object (and parent's) xform. void updateText(); // update text label position + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // Method that sets the current viewer object's mText to be highlighted or the objects children if there is no mText. + void setTextIsHighlighted(bool is_highlighted); + // [FIRE-35019] virtual void updateDrawable(bool force_damped); // force updates on static objects bool isOwnerInMuteList(LLUUID item_id = LLUUID()); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 7019b57a72..81c123d84e 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -201,6 +201,21 @@ width="80"> seconds + + + + Floating Text Options: + + + + + + Show floating text background: + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml index 27bf9fb8a5..9af97743c7 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -1202,6 +1202,36 @@ + + + + + + + Date: Mon, 30 Dec 2024 14:22:50 -0400 Subject: [PATCH 23/43] [FIRE-35019] - fix memory access error Fixed crashing issue in LLHUDText::renderText() cause by using mSourceObject without first checking to see if it is not null as the source object could be unloaded when teleporting to different sim. Was testing going to https://maps.secondlife.com/secondlife/Blue%20Moon%20Bay/188/63/26 for hitching issue and issue was triggered. --- indra/newview/llhudtext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index b6c35a8889..cb05db5728 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -267,7 +267,7 @@ void LLHUDText::renderText() // Also, only show the background if it is show all is checked, or if on highlight, only if use hover highlight is enabled. if ((mShowBackground == SHOW_BACKGROUND_ALL || mShowBackground == SHOW_BACKGROUND_ONLY_HIGHLIGHTED && mbIsHighlighted && mbUseHoverHighlight) && - mSourceObject->getAttachmentState() == 0) + (mSourceObject.notNull() && mSourceObject->getAttachmentState() == 0)) { LLRect screen_rect; screen_rect.setCenterAndSize(0, static_cast(lltrunc(-mBackgroundHeight / 2 + mOffsetY + mBackgroundOffsetY)), From 5ce3ede62206dcbbcccd677cbd5a26f675cf7014 Mon Sep 17 00:00:00 2001 From: minerjr Date: Mon, 30 Dec 2024 19:28:06 -0400 Subject: [PATCH 24/43] [FIRE-35019] - fix up a couple of missing spaces to clean up the final pull Added a few missing spaces that accidently got removed when I inserted my code into commit. Just a little cosmetic changes before the final pull. --- indra/newview/llhudtext.cpp | 3 +++ indra/newview/llhudtext.h | 1 + 2 files changed, 4 insertions(+) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index cb05db5728..63ec66deb8 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -215,6 +215,7 @@ void LLHUDText::renderText() } } // [FIRE-35019] + const S32 border_height = 16; const S32 border_width = 16; @@ -301,6 +302,7 @@ void LLHUDText::renderText() y_offset -= fontp->getLineHeight(); // Match the same positioning as LLHUBNameTag as the windows don't line up otherwise. y_offset -= LINE_PADDING; // [FIRE-35019] + U8 style = segment_iter->mStyle; LLFontGL::ShadowType shadow = LLFontGL::DROP_SHADOW; @@ -633,6 +635,7 @@ void LLHUDText::updateSize() { F32 height = 0.f; F32 width = 0.f; + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights // We want to create a background that fits just the visible text area only, otherwise a llsetstring('Hello, World\n\n\n') will have a text // box that covers 4 lines, but only the top line is visible to the user. diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 4aa22c0d6e..bf22873e01 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -199,6 +199,7 @@ private: // [RLVa:KB] - Checked: RLVa-1.0.0 std::string mObjText; // [/RLVa:KB] + // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights LLPointer mRoundedRectImgp; // Added background rect image from LLHUBNameTag F32 mBackgroundHeight; // Store the actual height of the background image (calculated from the visible text segments) From 9e57397f4588de69f537b558f079f6961249a10e Mon Sep 17 00:00:00 2001 From: minerjr Date: Mon, 30 Dec 2024 19:32:31 -0400 Subject: [PATCH 25/43] [FIRE-35019] - Fix up another formatting issue Visual studio is adding a lot of odd spacing that seems to mess up GIT. --- indra/newview/llhudtext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 63ec66deb8..83d15f19b7 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -533,8 +533,8 @@ void LLHUDText::updateVisibility() // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights //if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) // Use local do fade check to allow highlighed objects to force text to be visible - if (!mTextSegments.size() || (doFade && (mLastDistance > mFadeDistance + mFadeRange))) - // [FIRE-35019] + if (!mTextSegments.size() || (doFade && (mLastDistance > mFadeDistance + mFadeRange))) + // [FIRE-35019] { mVisible = false; return; From ffbc1b4b53328540894377500d07f84d396993dd Mon Sep 17 00:00:00 2001 From: minerjr Date: Thu, 2 Jan 2025 10:45:41 -0400 Subject: [PATCH 26/43] [FIRE-35042] Inventory - Only Coalesced Filter - More accessible Added new button to panel_main_inventory.xml called only_coalesced_inv_btn and panel that can toggle on the Only Coalesced filter and added a tool_tip as well to explain the feature. "Only Combined (Clumps) - Enables filter that displays only Combined Objects (Clumps) which are made up of 2 or more prims" Added new combo box item filter_type_coalesced to Filter to allow setting the Only Coalesced flag and switching the filter to Objects as only objects can be coalesced. Added new checkbox with icon to the float_inventory_view_finder.xml that is linked to the Only Coalesced flag and can modify it. Changed label from "Only Coalesced" to "Only Combined (Clumps)" to make it more descriptive and match the UI verbiage that creates the Coalesced objects. Updated UI xml for all English skin variants. Added new texture coalesced_18.png for the new button. Gray Scaled version of the Inv_Object_Multi object - inv_item_object_multi_.tga with a size of 18x18 pixels. --- indra/newview/llpanelmaininventory.cpp | 68 ++++++++++++++++++ .../ansastorm/xui/en/panel_main_inventory.xml | 44 +++++++++++- .../textures/bottomtray/coalesced_18.png | Bin 0 -> 1188 bytes .../skins/default/textures/textures.xml | 5 +- .../xui/en/floater_inventory_view_finder.xml | 25 ++++++- .../xui/en/menu_inventory_gear_default.xml | 5 +- .../default/xui/en/panel_main_inventory.xml | 39 ++++++++++ .../starlight/xui/en/panel_main_inventory.xml | 39 ++++++++++ .../xui/en/panel_main_inventory.xml | 39 ++++++++++ 9 files changed, 260 insertions(+), 4 deletions(-) create mode 100644 indra/newview/skins/default/textures/bottomtray/coalesced_18.png diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 122afcc8e6..5639cbef34 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -98,6 +98,12 @@ public: void onCreatorSelfFilterCommit(); void onCreatorOtherFilterCommit(); + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Callback to check the value of the check box to sync with the main inventory Only Coalesced flag + bool isOnlyCoalescedFilterChecked(); + // Callback for new checkbox to modify the main inventory's Only Colesced filter (Combined (Clumps)) + void onOnlyCoalescedFilterCommit(); + // [FIRE-35042] void onPermissionsChanged(); // FIRE-1175 - Filter Permissions Menu @@ -115,6 +121,9 @@ private: LLCheckBoxCtrl* mCreatorSelf; LLCheckBoxCtrl* mCreatorOthers; LLInventoryFilter* mFilter; + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + LLCheckBoxCtrl* mOnlyCoalescedFilterCheck; // Store the pointer to the Only Coalesced filter checkbox + // [FIRE-35042] }; ///---------------------------------------------------------------------------- @@ -1074,6 +1083,17 @@ void LLPanelMainInventory::onFilterTypeSelected(const std::string& filter_type_n return; } + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Special treatment for "coalesced" filter + else if (filter_type_name == "filter_type_coalesced") + { + // Turn on Only Coalesced filter. This will also trigger the button "only_coalesced_inv_btn" + // and menu item check "inventory_filter_coalesced_objects_only" toggle states. + getActivePanel()->setFilterCoalescedObjects(true); + // As all Coalesced objects are only objects, then set the filter type to filter_type_objects + filterTypes = mFilterMap["filter_type_objects"]; + } + // [FIRE-35042] // invalid selection (broken XML?) else { @@ -1522,6 +1542,19 @@ bool LLFloaterInventoryFinder::postBuild() mCreatorSelf->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorSelfFilterCommit, this)); mCreatorOthers->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onCreatorOtherFilterCommit, this)); + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Get the Finder's Only Coalesced check box for use later on, instead of calling getChild everytime accessing it + mOnlyCoalescedFilterCheck = getChild("check_only_coalesced"); + // Add callbacks only if the checkbox is available + if (mOnlyCoalescedFilterCheck) + { + // Set a callback for when the check_only_coalesced checkbox is pressed to change the value of the main panel. + mOnlyCoalescedFilterCheck->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit, this)); + // Set a callback for syncing the check_only_coalesced check state to the Only Coalesced flag of the main inventory + mOnlyCoalescedFilterCheck->setCheckCallback(boost::bind(&LLFloaterInventoryFinder::isOnlyCoalescedFilterChecked, this)); + } + // [FIRE-35042] + childSetAction("Close", onCloseBtn, this); // FIRE-5160: Don't reset inventory filter when clearing search term @@ -1831,6 +1864,41 @@ void LLFloaterInventoryFinder::onCreatorOtherFilterCommit() } } +// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible +// Callback function that controls setting the actual Only Coalesced filter flag in the Main Inventory when the check_coalesced checkbox is changed by the user +void LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit() +{ + // If the Main Inventory Panel and the Finder's OnlyCoalescedFilterCheck are both valid (should be, but just in case) + if (mPanelMainInventory && mOnlyCoalescedFilterCheck) + { + // Make sure the main panel exists before trying to set the Filter Coalesced Objects value to the check_only_coalesced checkbox value + LLInventoryPanel* main_panel = mPanelMainInventory->getPanel(); + if (main_panel) + { + main_panel->setFilterCoalescedObjects(mOnlyCoalescedFilterCheck->getValue()); + } + } + +} +// Callback function that syncs the Finder's Only Coalesced checkbox to the main panel's FilterCoalescedObjects value +bool LLFloaterInventoryFinder::isOnlyCoalescedFilterChecked() +{ + // Check if the Main Inventory Panel exists (should be, but just in case) + if (mPanelMainInventory) + { + // Make sure the main panel exists before trying to get the Filter Coalesced Objects + LLInventoryPanel* main_panel = mPanelMainInventory->getPanel(); + if (main_panel) + { + //Return the Only Coalesced filter value from the main inventory + return main_panel->getFilterCoalescedObjects(); + } + } + //If the main panel cannot be accessed at this time, just return false + return false; +} +// [FIRE-35042] + // FIRE-1175 - Filter Permissions Menu void LLFloaterInventoryFinder::onPermissionsChanged() { diff --git a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 63596de5fa..0068fa8e78 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -565,9 +565,11 @@ parameter="only_transfer" /> + + + label="Only Combined (Clumps)"> @@ -575,6 +577,7 @@ function="Inventory.CoalescedObjects.Check" parameter="coalesced_objects_only" /> + @@ -738,6 +741,12 @@ + + + + + + @@ -994,6 +1003,39 @@ parameter="secondary_inventory" /> + + + + + + + + EX>4Tx04R}tkv&MmP!xqvQ$>*$2Q!E`WT-CMMMWG-6^me@v=v%)FnQ@8G-*gu zTpR`0f`dPcRRx##3oJ%eXJX18Y>3L$2SSod~(#5Q7YQ!_d5mnPEU&wi^ za^B*sRqL#MPJY8sL0`#moz^H4SV9shNKjBm1y$IH(qAXVLYnsDKK>EcpCXq+t_m1A z7Epr*+4Y0J!SC5x#px+8DHI2KUmWLS4CvbhS`EkfK6aee2@re+uJn$-)&%B0NpEzt z$PqBO4P0DzG-VIC+yRE44B3=jDM(8w7J>IOdZs)ubPEiud2?&;Y*083B)LJRJZ40-;GnK~y-)wUjYPBU==Pzw8DP zZ6ZvtN-`@bGXxTwX~rN)da+Y0nMP|15lmy&CY^6Bv~(IRB%F9WE)2skYqeVXw*_Qbc2-wc zMXS{kuIq|ou_$z17qTonrfC|TPABy9+^3%f%H^`Ds;XQnl_-@;+}+)AaBu)XKA)GH z&89g$J?$8VVLFZ@zf+TC+0k`fSe7MR*A=eoifXkgB9VvyL?jXs)oQi>=DM!f-`^Ly zu8VX!T?6#t6a|3m>uaLX=)XWnl0-I}rQ7YIY1+qO|5rUdJ>mQQFKK@Ucz%A)-{0R8 z4u^Srd&BcQJkMi$dz+b=8C=(;QmN4E^%xl$;pXOsv9U2OE-q*^8uWU-ul$oyE|(Lj zR7yyaB!-5DL_8jUN3qpviOtPT5s5^^z`%fzBuQkmS)pl~00{n=kD@5pwoS2Eq}^^~ z7zXq6^DHbZ0MPArX}8+|%+1XK^htl1k)kMUZEZ0-JInF$F_V*%OifL3dV0#@;v$kH z^?P4lUg$d-9UZL~3Wankl_DGt^O4I+rSguH@B5scoe_)0>U~G`dOdS=bo6C-c=+4y z?(U;)+jyS$A)VLPSA5^+>gwwI-rioOUax2V_v5D1>6)slVrgkf - + + + + diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml index 633ba579d9..d891330924 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml @@ -1,14 +1,17 @@ + + + + + + + + --> + + + label="Only Combined (Clumps)"> @@ -410,6 +412,7 @@ function="Inventory.CoalescedObjects.Check" parameter="coalesced_objects_only" /> + + + + + + + @@ -411,6 +417,39 @@ parameter="secondary_inventory" /> + + + + + + + + + + + + + + @@ -410,6 +416,39 @@ parameter="secondary_inventory" /> + + + + + + + + + + + + + + @@ -413,6 +419,39 @@ parameter="secondary_inventory" /> + + + + + + + + Date: Thu, 2 Jan 2025 10:55:43 -0400 Subject: [PATCH 27/43] [FIRE-35042] - Missed syncing tool_tip from default skin to the other skins. Changed tool tips to read: "Only Combined (Clumps) - Enables filter that displays only Combined Objects (Clumps) which are made up of 2 or more prims" --- indra/newview/skins/default/xui/en/panel_main_inventory.xml | 2 +- indra/newview/skins/starlight/xui/en/panel_main_inventory.xml | 2 +- .../newview/skins/starlightcui/xui/en/panel_main_inventory.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 71f7095fa6..63478ac817 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -438,7 +438,7 @@ layout="topleft" left="0" name="only_coalesced_inv_btn" - tool_tip="Only Combined (Clumps) - Enableds filter for only Combined Objects (Clumps) that are made up of 2 or more prims" + tool_tip="Only Combined (Clumps) - Enables filter that displays only Combined Objects (Clumps) which are made up of 2 or more prims" top="0" width="31"> Date: Sat, 11 Jan 2025 16:03:49 +0100 Subject: [PATCH 28/43] Update German translation --- .../skins/default/xui/de/menu_viewer.xml | 1 + .../default/xui/de/panel_preferences_chat.xml | 1 + .../skins/default/xui/en/menu_viewer.xml | 2 +- .../default/xui/en/panel_preferences_chat.xml | 29 +++++++++---------- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index 8510ec77d9..7c82d74512 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -109,6 +109,7 @@ + diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index b9a11d2c73..2fd9f646f6 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -31,6 +31,7 @@ + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 02cf8b3e44..e32363aa0a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -928,7 +928,7 @@ - - - - + Date: Sat, 11 Jan 2025 16:34:57 +0100 Subject: [PATCH 29/43] =?UTF-8?q?FIRE-35061=20Chinese=20(by=20=E5=B0=8F?= =?UTF-8?q?=E6=BB=A2=20Zi=20Ying)=20and=20Polish=20translation=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../skins/default/xui/pl/menu_viewer.xml | 1 + .../default/xui/pl/panel_preferences_chat.xml | 1 + .../xui/zh/floater_avatar_textures.xml | 2 +- .../default/xui/zh/floater_notification.xml | 2 +- .../xui/zh/floater_notifications_console.xml | 2 +- .../default/xui/zh/floater_rlv_console.xml | 2 +- .../skins/default/xui/zh/menu_login.xml | 2 +- .../skins/default/xui/zh/menu_viewer.xml | 21 ++++++++++--------- .../skins/default/xui/zh/notifications.xml | 2 +- .../default/xui/zh/panel_preferences_UI.xml | 2 +- .../xui/zh/panel_preferences_alerts.xml | 2 +- .../default/xui/zh/panel_preferences_chat.xml | 15 ++++++------- .../xui/zh/panel_preferences_colors.xml | 8 +++---- .../default/xui/zh/panel_region_debug.xml | 2 +- .../newview/skins/default/xui/zh/strings.xml | 2 +- 15 files changed, 35 insertions(+), 31 deletions(-) diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 6ccb8a57d7..29b3dc7665 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -96,6 +96,7 @@ + diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml b/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml index 2a6b7354c5..9ca107f5ab 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_chat.xml @@ -29,6 +29,7 @@ + diff --git a/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml b/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml index e4a771e157..12cf32ec05 100644 --- a/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/zh/floater_avatar_textures.xml @@ -11,7 +11,7 @@ 混合紋理 - - + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/zh/menu_viewer.xml b/indra/newview/skins/default/xui/zh/menu_viewer.xml index b5cbddafbb..171118af5a 100644 --- a/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/indra/newview/skins/default/xui/zh/menu_viewer.xml @@ -99,6 +99,7 @@ + @@ -299,7 +300,7 @@ - + @@ -393,18 +394,18 @@ - - - - + + + + - - - - + + + + @@ -636,7 +637,7 @@ - + diff --git a/indra/newview/skins/default/xui/zh/notifications.xml b/indra/newview/skins/default/xui/zh/notifications.xml index 4f46d92a63..9350e13300 100644 --- a/indra/newview/skins/default/xui/zh/notifications.xml +++ b/indra/newview/skins/default/xui/zh/notifications.xml @@ -4054,7 +4054,7 @@ https://wiki.firestormviewer.org/fs_voice 點擊「說話」按鈕來打開或關閉麥克風。 -點擊向上箭頭鍵,可顯示聲音控制檯。 +點擊向上箭頭鍵,可顯示聲音控制台。 隱藏「說話」按鈕將停用語音功能。 diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_UI.xml b/indra/newview/skins/default/xui/zh/panel_preferences_UI.xml index fdd634b3bf..ad81142015 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_UI.xml @@ -183,7 +183,7 @@ - 通知設定(彈出視窗,控制檯,提示框): + 通知設定(彈出視窗,控制台,提示框): diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/zh/panel_preferences_alerts.xml index 53495f41bf..5b7c0bbbf6 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_alerts.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_alerts.xml @@ -19,7 +19,7 @@ 當我的朋友登入和退出時以這種方式通知我: - + diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml index aa727daf89..eb3564aa54 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_chat.xml @@ -2,7 +2,7 @@ - 聊天控制檯的字型: + 聊天控制台的字型: @@ -17,7 +17,7 @@ - + @@ -25,8 +25,9 @@ - - + + + (秒) (行數) @@ -132,9 +133,9 @@ 接收新訊息時彈出聊天提示: - - - + + + 在記錄中顯示的群組名稱長度 diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml b/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml index dc74b01331..4dc3321dc1 100644 --- a/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_colors.xml @@ -20,7 +20,7 @@ 化身 物件 - + 私聊/群組聊天 @@ -96,9 +96,9 @@ - 控制檯透明度: - - + 控制台透明度: + + 突出顯示搜尋偏好設定: 區域搜尋標記顏色: diff --git a/indra/newview/skins/default/xui/zh/panel_region_debug.xml b/indra/newview/skins/default/xui/zh/panel_region_debug.xml index 1c253d8655..be4da68a9c 100644 --- a/indra/newview/skins/default/xui/zh/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/zh/panel_region_debug.xml @@ -35,5 +35,5 @@ @@ -744,8 +741,7 @@ - - + @@ -1004,40 +1000,39 @@ - - + EX>4Tx04R}tkv&MmP!xqvQ>CI62Rn#31gU~x7Zq_VRV;#q(pG5I!Q`cX(4-+r zad8w}3l9D)RvlcNb#-tR1i>E=cfm=~MM}IcDYS_3!sC6MchBLy`v9R)VXD~`1ys#4 zQt_CW&8>=oSNPC}046XhF;h>Z7c=mzuY2mIx{L5E@4i2)U&)&c@QK7xrW+RV2J!5s zrE}gV4zZG?5T6rI8gxP8N3P2*zi}=)Ebz>bkx9)Hhls^u2g@DIN`^{2LmXCAjq-)8 z%L?Z$&T6H`TKD8H4Cb|!G}md3AdV#@kc0>sHIz|-g$V5$DJD{M9`o=IJN_iOWO9|k z$gzMbR7j2={11N5)+|gI z*1|`?z&3Dk-PYti;Bp5TdeS9BawI=3p-=$c&*+zk+BWKAP_}A7Rnas+%biB zVF$}qlivx1OV@xn~gEu=By&Z5CTau#+XHt zh_LG8L}U|G4OzkB!drA0@(rtn=)KEf7!&~ZeP3+a6dj9-Bh`Y6ss*W%;qNaBCByF4 ffY0VC8=gon`f$rwTBPKu00000NkvXXu0mjfiP - - + + diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml index d891330924..7977c9b970 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml @@ -1,17 +1,17 @@ - + - + --> - + + - + width="16" /> + + + + + + + + --> - - + label="Only Coalesced"> - - + [FIRE-35042] Inventory - Only Coalesced Filter - More accessible --> - - + @@ -418,35 +417,34 @@ - - + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 7019b57a72..c05081b333 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -1211,7 +1211,6 @@ width="270" control_name="FSSplitInventorySearchOverTabs" tool_tip="If enabled, it is possible to enter a different search term for each tab in inventory."/> - diff --git a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml index 52d2d4fc4d..1dfee9b078 100644 --- a/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/starlight/xui/en/panel_main_inventory.xml @@ -184,8 +184,7 @@ - - + @@ -417,35 +416,34 @@ - - + diff --git a/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml b/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml index 576b6bb00f..158955867c 100644 --- a/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/starlightcui/xui/en/panel_main_inventory.xml @@ -186,8 +186,7 @@ - - + @@ -420,35 +419,34 @@ - - + From 9cf5276107c53dec535adf9829982fe81590c0a8 Mon Sep 17 00:00:00 2001 From: minerjr Date: Sat, 11 Jan 2025 21:59:53 -0400 Subject: [PATCH 31/43] [FIRE-35042] - Rolled back Visual Studio formatting changes Just to try to reduce the amount of flagged code changes that are just cause by Visual Studio adjusting code to be more readable. --- indra/newview/llpanelmaininventory.cpp | 46 ++++++++++++-------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 5d326d4ec8..c2e6ad344c 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1596,7 +1596,7 @@ bool LLFloaterInventoryFinder::postBuild() // FIRE-5160: Don't reset inventory filter when clearing search term getChild("btnReset")->setClickedCallback(boost::bind(&LLFloaterInventoryFinder::onResetBtn, this)); - + updateElementsFromFilter(); // FIRE-1175 - Filter Permissions Menu @@ -1661,16 +1661,14 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() return; // Get data needed for filter display - U32 filter_types = (U32)mFilter->getFilterObjectTypes(); - LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState(); - U32 hours = mFilter->getHoursAgo(); - U32 date_search_direction = mFilter->getDateSearchDirection(); + U32 filter_types = (U32)mFilter->getFilterObjectTypes(); + LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState(); + U32 hours = mFilter->getHoursAgo(); + U32 date_search_direction = mFilter->getDateSearchDirection(); LLInventoryFilter::EFilterCreatorType filter_creator = mFilter->getFilterCreatorType(); - bool show_created_by_me = - ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF)); - bool show_created_by_others = - ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS)); + bool show_created_by_me = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_SELF)); + bool show_created_by_others = ((filter_creator == LLInventoryFilter::FILTERCREATOR_ALL) || (filter_creator == LLInventoryFilter::FILTERCREATOR_OTHERS)); // update the ui elements // Make floater title translatable @@ -1678,19 +1676,19 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() setTitle(LLTrans::getString(mFilter->getName())); // - getChild("check_animation")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_ANIMATION)); + getChild("check_animation")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_ANIMATION)); - getChild("check_calling_card")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD)); - getChild("check_clothing")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_WEARABLE)); - getChild("check_gesture")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_GESTURE)); - getChild("check_landmark")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_LANDMARK)); - getChild("check_material")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_MATERIAL)); - getChild("check_notecard")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_NOTECARD)); - getChild("check_object")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_OBJECT)); - getChild("check_script")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_LSL)); - getChild("check_sound")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SOUND)); - getChild("check_texture")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_TEXTURE)); - getChild("check_snapshot")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT)); + getChild("check_calling_card")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_CALLINGCARD)); + getChild("check_clothing")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE)); + getChild("check_gesture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE)); + getChild("check_landmark")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK)); + getChild("check_material")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_MATERIAL)); + getChild("check_notecard")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD)); + getChild("check_object")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT)); + getChild("check_script")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LSL)); + getChild("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND)); + getChild("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE)); + getChild("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT)); getChild("check_settings")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS)); getChild("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS); @@ -1703,9 +1701,9 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() getChild("date_search_direction")->setSelectedIndex(date_search_direction); // FIRE-1175 - Filter Permissions Menu - getChild("check_modify")->setValue((bool)(mFilter->getFilterPermissions() & PERM_MODIFY)); - getChild("check_copy")->setValue((bool)(mFilter->getFilterPermissions() & PERM_COPY)); - getChild("check_transfer")->setValue((bool)(mFilter->getFilterPermissions() & PERM_TRANSFER)); + getChild("check_modify")->setValue((bool) (mFilter->getFilterPermissions() & PERM_MODIFY)); + getChild("check_copy")->setValue((bool) (mFilter->getFilterPermissions() & PERM_COPY)); + getChild("check_transfer")->setValue((bool) (mFilter->getFilterPermissions() & PERM_TRANSFER)); // // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible From 0f7139800b39990dd50cbfe1dfe28493d7520dec Mon Sep 17 00:00:00 2001 From: minerjr Date: Sat, 11 Jan 2025 22:15:30 -0400 Subject: [PATCH 32/43] FIRE-35042 - revert panel_preferences.UI.xml to previous version Another minor formatting issue to get ride of 1 more file from the pull request. --- indra/newview/skins/default/xui/en/panel_preferences_UI.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index c05081b333..7019b57a72 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -1211,6 +1211,7 @@ width="270" control_name="FSSplitInventorySearchOverTabs" tool_tip="If enabled, it is possible to enter a different search term for each tab in inventory."/> + From a7b1a277382705de2dbbb17da5be12c1277e3b19 Mon Sep 17 00:00:00 2001 From: minerjr Date: Sun, 12 Jan 2025 03:39:16 -0400 Subject: [PATCH 33/43] FIRE-35019-new fixed up the typo LLHUB->LLHUD Sometimes you cannot see the forest from the trees. :) Replaced the references of LLHUBText and LLHUBNameTag with LLHUDText and LLHUDNameTag --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llhudobject.cpp | 4 +- indra/newview/llhudobject.h | 4 +- indra/newview/llhudtext.cpp | 52 +++++++++---------- indra/newview/llhudtext.h | 10 ++-- indra/newview/lltoolpie.cpp | 6 +-- indra/newview/llviewerobject.cpp | 6 +-- indra/newview/llviewerobject.h | 2 +- .../default/xui/en/panel_preferences_UI.xml | 2 +- .../xui/en/panel_preferences_colors.xml | 4 +- 10 files changed, 46 insertions(+), 46 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 66c206a48d..c5c70b92d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -25106,7 +25106,7 @@ Change of this parameter will affect the layout of buttons in notification toast SanityComment This value needs to be greater than 0 for a fading effect. - + FSHudTextShowBackground Comment diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index e0d6f55c1c..1fbdc47ff1 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -52,7 +52,7 @@ struct hud_object_further_away bool hud_object_further_away::operator()(const LLPointer& lhs, const LLPointer& rhs) const { - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // This overrides distance comparision if either of the objects is highlighted. // Get the FSHudTextUseHoverHighlight value from the saved settings and if it is enabled, then check if either object is highlighed static LLCachedControl mbUseHoverHighlight(*LLControlGroup::getInstance("Global"), "FSHudTextUseHoverHighlight"); @@ -83,7 +83,7 @@ LLHUDObject::LLHUDObject(const U8 type) : mVisible = true; mType = type; mDead = false; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights mbIsHighlighted = false; // Default is off // [FIRE-35019] } diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 39cb115204..b823517313 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -60,7 +60,7 @@ public: bool isVisible() const { return mVisible; } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Accessor methods for indicating if the HUB object is highlighted void setIsHighlighted(bool isHighlighted) { mbIsHighlighted = isHighlighted; } bool getIsHighlighted() const { return mbIsHighlighted; } @@ -116,7 +116,7 @@ protected: U8 mType; bool mDead; bool mVisible; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights bool mbIsHighlighted; // Flag to determine if the object is currently highlighted by hover // [FIRE-35019] LLVector3d mPositionGlobal; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 83d15f19b7..b036d5fa67 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -55,11 +55,11 @@ const F32 HORIZONTAL_PADDING = 15.f; const F32 VERTICAL_PADDING = 12.f; const F32 BUFFER_SIZE = 2.f; const F32 HUD_TEXT_MAX_WIDTH = 190.f; -// [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights -const F32 LINE_PADDING = 3.f; // aka "leading" - Taken from LLHUBNameTag -const S32 SHOW_BACKGROUND_NONE = 0; // Default value and disables the LLHUBText background -const S32 SHOW_BACKGROUND_ONLY_HIGHLIGHTED = 1; // Only LLHUBText that is part of the highlighted prim will have a background -const S32 SHOW_BACKGROUND_ALL = 2; // All prims that have a LLHUBText will have a background, but the highlighted prim will have a non-transparent background. +// [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights +const F32 LINE_PADDING = 3.f; // aka "leading" - Taken from LLHUDNameTag +const S32 SHOW_BACKGROUND_NONE = 0; // Default value and disables the LLHUDText background +const S32 SHOW_BACKGROUND_ONLY_HIGHLIGHTED = 1; // Only LLHUDText that is part of the highlighted prim will have a background +const S32 SHOW_BACKGROUND_ALL = 2; // All prims that have a LLHUDText will have a background, but the highlighted prim will have a non-transparent background. // [FIRE-35019] const F32 HUD_TEXT_MAX_WIDTH_NO_BUBBLE = 1000.f; const F32 MAX_DRAW_DISTANCE = 300.f; @@ -99,7 +99,7 @@ LLHUDText::LLHUDText(const U8 type) : mFadeDistance = gSavedSettings.getF32("FSHudTextFadeDistance"); mFadeRange = gSavedSettings.getF32("FSHudTextFadeRange"); // - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights mLastDistance = 0.0f; // Just to get rid of a compiler warning // [FIRE-35019] mZCompare = true; @@ -107,8 +107,8 @@ LLHUDText::LLHUDText(const U8 type) : mRadius = 0.1f; LLPointer ptr(this); sTextObjects.insert(ptr); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights - mRoundedRectImgp = LLUI::getUIImage("Rounded_Rect"); // Taken from LLHUBNameTag, uses the existing art asset + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + mRoundedRectImgp = LLUI::getUIImage("Rounded_Rect"); // Taken from LLHUDNameTag, uses the existing art asset mBackgroundHeight = 0.0f; // Default background height to 0.0 mBackgroundOffsetY = 0.0f; // Default background Y offset to 0.0 mLuminance = 1.0f; // Default luminance is 1.0 as the default color is white (1.0, 1.0, 1.0, 1.0) @@ -123,7 +123,7 @@ void LLHUDText::render() { if (!mOnHUDAttachment && sDisplayText) { - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); // If the current text object is highighed and the use hover highlight feature is enabled, then // disable writing to the depth buffer @@ -157,7 +157,7 @@ void LLHUDText::renderText() LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f); F32 alpha_factor = 1.f; LLColor4 text_color = mColor; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //if (mDoFade) static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); // Flag to indicate if hover highlight of prims is enabled static LLCachedControl mShowBackground(gSavedSettings, "FSHudTextShowBackground"); // Show background values (0 - off, 1 - only highlighted prims, 2 - all prims) @@ -178,7 +178,7 @@ void LLHUDText::renderText() { return; } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //If there is only 1 string and it is blank, don't render as it could add a background on a prim with no text if ((S32)mTextSegments.size() == 1 && mTextSegments[0].isBlank()) { @@ -190,12 +190,12 @@ void LLHUDText::renderText() mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f)); // *TODO: make this a per-text setting - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // static LLCachedControl bubble_opacity(gSavedSettings, "ChatBubbleOpacity"); // static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor"); // LLColor4 bg_color = nametag_bg_color; // bg_color.setAlpha(bubble_opacity * alpha_factor); - // Use new background opacity value, independant of the LLHUBNameTag value + // Use new background opacity value, independant of the LLHUDNameTag value static LLCachedControl background_opacity(gSavedSettings, "FSHudTextBackgroundOpacity"); // Can be modified under Preferences->Colors->Floating Text tab LLColor4 bg_color = LLColor4::black; // Default the background to black color bg_color.setAlpha(background_opacity * alpha_factor); @@ -262,7 +262,7 @@ void LLHUDText::renderText() F32 y_offset = (F32)mOffsetY; // Render label - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Render text window background // Don't add if the parent object is attached (clothing on player avatar: as some cloths have blank text and render a background...) // Also, only show the background if it is show all is checked, or if on highlight, only if use hover highlight is enabled. @@ -297,9 +297,9 @@ void LLHUDText::renderText() segment_iter != mTextSegments.end(); ++segment_iter ) { const LLFontGL* fontp = segment_iter->mFont; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //y_offset -= fontp->getLineHeight() - 1; // correction factor to match legacy font metrics - y_offset -= fontp->getLineHeight(); // Match the same positioning as LLHUBNameTag as the windows don't line up otherwise. + y_offset -= fontp->getLineHeight(); // Match the same positioning as LLHUDNameTag as the windows don't line up otherwise. y_offset -= LINE_PADDING; // [FIRE-35019] @@ -314,8 +314,8 @@ void LLHUDText::renderText() else // ALIGN_LEFT { x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights - // *HACK -> borrowed from LLHUBNameTag to match + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // *HACK -> borrowed from LLHUDNameTag to match x_offset += 1; // [FIRE-35019] } @@ -326,7 +326,7 @@ void LLHUDText::renderText() text_color = linearColor4(text_color); } text_color.mV[VALPHA] *= alpha_factor; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // If the text object is highlighted and use hover highlight is enabled, then reset the alpha factor (1.0f) if (mbUseHoverHighlight && mbIsHighlighted) { @@ -429,7 +429,7 @@ void LLHUDText::setFont(const LLFontGL* font) void LLHUDText::setColor(const LLColor4 &color) { mColor = color; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Added luminance value for the text color to determine if the background should be white or black // Based upon https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color // used Digital ITU BT.601 (gives more weight to the R and B components): @@ -461,7 +461,7 @@ void LLHUDText::setDoFade(const bool do_fade) void LLHUDText::updateVisibility() { - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Create local doFade flag based upon member doFade flag and overide it if the object is highlighted and hover highlight is enabled. bool doFade = mDoFade; static LLCachedControl mbUseHoverHighlight(gSavedSettings, "FSHudTextUseHoverHighlight"); @@ -530,7 +530,7 @@ void LLHUDText::updateVisibility() mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) // Use local do fade check to allow highlighed objects to force text to be visible if (!mTextSegments.size() || (doFade && (mLastDistance > mFadeDistance + mFadeRange))) @@ -636,7 +636,7 @@ void LLHUDText::updateSize() F32 height = 0.f; F32 width = 0.f; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // We want to create a background that fits just the visible text area only, otherwise a llsetstring('Hello, World\n\n\n') will have a text // box that covers 4 lines, but only the top line is visible to the user. // Another example is llsetstring('\n\n\nHello, World'), which would also have a 4 line high window, but the text be visible only on the last line. @@ -654,7 +654,7 @@ void LLHUDText::updateSize() while (iter != mTextSegments.end()) { const LLFontGL* fontp = iter->mFont; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //height += fontp->getLineHeight() - 1; // correction factor to match legacy font metrics //width = llmax(width, llmin(iter->getWidth(fontp), HUD_TEXT_MAX_WIDTH)); @@ -679,7 +679,7 @@ void LLHUDText::updateSize() ++iter; } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Don't want line spacing under the last line (Taken from LLHUBNameTa::UpdateSize) if (height > 0.f) { @@ -701,7 +701,7 @@ void LLHUDText::updateSize() F32 u = 1.f; mWidth = llmax(width, lerp(mWidth, (F32)width, u)); mHeight = llmax(height, lerp(mHeight, (F32)height, u)); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights backgroundLastNoneBlankPosition += VERTICAL_PADDING; // Add the vertical padding to the last non-blank position mBackgroundOffsetY = backgroundFirstNoneBlankPosition; // Set the background Y offset to the top of the first blank mBackgroundHeight = backgroundLastNoneBlankPosition - backgroundFirstNoneBlankPosition; // Set the background height to the difference between the top of the first non-blank, and bottom of the last non-blank line diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index bf22873e01..f1327632f1 100644 --- a/indra/newview/llhudtext.h +++ b/indra/newview/llhudtext.h @@ -59,7 +59,7 @@ protected: mStyle(style), mText(text), mFont(font) - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights //{} { // Added a bool check to see if the current line is blank (empty, or has only a single space character stored. @@ -80,7 +80,7 @@ protected: const LLWString& getText() const { return mText; } void clearFontWidthMap() { mFontWidthMap.clear(); } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights bool isBlank() { return mbIsBlank; } // Accessor method for checking to see if the current Text Segment is blank // [FIRE-35019] LLColor4 mColor; @@ -90,7 +90,7 @@ protected: private: LLWString mText; std::map mFontWidthMap; - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights bool mbIsBlank; // True if mText length is 0, or only contains " " characters, otherwise false // [FIRE-35019] }; @@ -200,8 +200,8 @@ private: std::string mObjText; // [/RLVa:KB] - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights - LLPointer mRoundedRectImgp; // Added background rect image from LLHUBNameTag + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + LLPointer mRoundedRectImgp; // Added background rect image from LLHUDNameTag F32 mBackgroundHeight; // Store the actual height of the background image (calculated from the visible text segments) F32 mBackgroundOffsetY; // Store the offset of the top of the first visible text segment F32 mLuminance; // Store the luminance of the text (used to determine if the background should be white or black for higher contrast) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index b06c190d4a..ef7bf02882 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -848,7 +848,7 @@ void LLToolPie::selectionPropertiesReceived() bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { bool pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // We want to unhighlight the previous hover object's parent before we get the next hover pick and lose the reference // (Possible optimization - check if the current object and previous ones are the same, and if so, don't set the text is highlighed flag to false) LLViewerObject* oldObject = NULL; @@ -960,9 +960,9 @@ bool LLToolPie::handleHover(S32 x, S32 y, MASK mask) { LLViewerMediaFocus::getInstance()->clearHover(); } - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // If there is an object that was hovered over, set the root of the object to have the text highlighted. - // This will work if the parent does not have a LLHUBText object, but a child does. + // This will work if the parent does not have a LLHUDText object, but a child does. else { if (parent) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index fff7cc561f..38b3c5d31e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6141,14 +6141,14 @@ void LLViewerObject::updateText() } } -// [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights +// [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Method that sets the current viewer object's mText to be highlighted or the objects children if there is no mText. void LLViewerObject::setTextIsHighlighted(bool is_highlighted) { // If the object it not dead, try to set the highlight value if (!isDead()) { - // Check to see if the current LLHUBText object is not null, most of the time the root object contains the floating text. + // Check to see if the current LLHUDText object is not null, most of the time the root object contains the floating text. if (mText.notNull()) { mText->setIsHighlighted(is_highlighted); @@ -6156,7 +6156,7 @@ void LLViewerObject::setTextIsHighlighted(bool is_highlighted) // But in case the current object does not, try to set all the children to use the flag else { - // Else, there may be children with the LLHUBText objects.. + // Else, there may be children with the LLHUDText objects.. for (child_list_t::const_iterator iter = mChildList.begin(); iter != mChildList.end(); iter++) { LLViewerObject* child = *iter; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 2db3b171bb..75be338067 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -498,7 +498,7 @@ public: void updatePositionCaches() const; // Update the global and region position caches from the object (and parent's) xform. void updateText(); // update text label position - // [FIRE-35019] Add LLHUBNameTag background to floating text and hover highlights + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights // Method that sets the current viewer object's mText to be highlighted or the objects children if there is no mText. void setTextIsHighlighted(bool is_highlighted); // [FIRE-35019] diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 81c123d84e..bef797947b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -201,7 +201,7 @@ width="80"> seconds - + - + - + Date: Sun, 12 Jan 2025 16:43:41 +0100 Subject: [PATCH 34/43] FIRE-35064 French translation update, by Laurent Bechir --- indra/newview/skins/default/xui/fr/floater_preferences.xml | 4 ++-- indra/newview/skins/default/xui/fr/menu_viewer.xml | 1 + indra/newview/skins/default/xui/fr/panel_preferences_chat.xml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/floater_preferences.xml b/indra/newview/skins/default/xui/fr/floater_preferences.xml index 49c90ffe7d..366da746f0 100644 --- a/indra/newview/skins/default/xui/fr/floater_preferences.xml +++ b/indra/newview/skins/default/xui/fr/floater_preferences.xml @@ -1,5 +1,5 @@ - + diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml index 44cd4b210c..3bd22ded33 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_chat.xml @@ -25,6 +25,7 @@ + From 516748c7d1d484e8214d1319b513e85a8b305243 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 12 Jan 2025 23:17:00 +0000 Subject: [PATCH 35/43] rename xml so the installer finds them quick hack, id the spaces are important then the installer script needs updating to allow them --- indra/newview/poses/hand_presets/{Thumbs Up.xml => Thumbs_Up.xml} | 0 .../newview/poses/hand_presets/{Tight Grip.xml => Tight_Grip.xml} | 0 .../hand_presets/{Two Finger Salute.xml => Two_Finger_Salute.xml} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename indra/newview/poses/hand_presets/{Thumbs Up.xml => Thumbs_Up.xml} (100%) rename indra/newview/poses/hand_presets/{Tight Grip.xml => Tight_Grip.xml} (100%) rename indra/newview/poses/hand_presets/{Two Finger Salute.xml => Two_Finger_Salute.xml} (100%) diff --git a/indra/newview/poses/hand_presets/Thumbs Up.xml b/indra/newview/poses/hand_presets/Thumbs_Up.xml similarity index 100% rename from indra/newview/poses/hand_presets/Thumbs Up.xml rename to indra/newview/poses/hand_presets/Thumbs_Up.xml diff --git a/indra/newview/poses/hand_presets/Tight Grip.xml b/indra/newview/poses/hand_presets/Tight_Grip.xml similarity index 100% rename from indra/newview/poses/hand_presets/Tight Grip.xml rename to indra/newview/poses/hand_presets/Tight_Grip.xml diff --git a/indra/newview/poses/hand_presets/Two Finger Salute.xml b/indra/newview/poses/hand_presets/Two_Finger_Salute.xml similarity index 100% rename from indra/newview/poses/hand_presets/Two Finger Salute.xml rename to indra/newview/poses/hand_presets/Two_Finger_Salute.xml From 67bad0bd4b44cb1c6930422a00f363b5822182b7 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 12 Jan 2025 23:18:12 +0000 Subject: [PATCH 36/43] ignore checks.json created by clangtools --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 5e3377d62a..0a684b7ce5 100755 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,5 @@ firestorm.code-workspace *-compiled.glsl .github/release.yaml + +checks.json From 792ca8a54c61ea3da860e90aabe9b51c733e8538 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 12 Jan 2025 23:19:23 +0000 Subject: [PATCH 37/43] FIRE-29926 fix legacy noon transition properly --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 9bfcb73fe1..5baf8a5517 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -11767,7 +11767,7 @@ class LLWorldEnvSettings : public view_listener_t // Add legacy noon to the manually selected environments that can have a user defined transition time. // LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY, LLEnvironment::TRANSITION_INSTANT); // LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::TRANSITION_INSTANT); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY); + LLEnvironment::instance().setManualEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); // defocusEnvFloaters(); From 4992e90ba4a91202defed1af9e7d7bbef168d37d Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 12 Jan 2025 23:20:04 +0000 Subject: [PATCH 38/43] Add minerjr to the contributors --- indra/newview/skins/default/xui/en/floater_about.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 7045a42a11..c216a1fda1 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -165,7 +165,7 @@ Additional code generously contributed to Firestorm by: top_pad="4" width="450" wrap="true"> -Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Dragonborn Forzane, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, humbletim, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Tapple Gao, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, 小滢 Zi Ying, Zwagoth Klaar and others. +Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Dragonborn Forzane, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, humbletim, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, minerjr, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Tapple Gao, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, 小滢 Zi Ying, Zwagoth Klaar and others. Date: Mon, 13 Jan 2025 17:15:22 +0100 Subject: [PATCH 39/43] Fix inventory filter issues: * Ansastorm already has a button for the filter floater and doesn't need one in the bottom bar * Coalesced option missing in combobox for Vintage * Inventory links are not created in the tools floater --- .../ansastorm/xui/en/panel_main_inventory.xml | 35 ------------------- .../xui/en/floater_inventory_view_finder.xml | 2 +- .../default/xui/en/panel_main_inventory.xml | 9 +---- .../vintage/xui/en/panel_main_inventory.xml | 2 ++ 4 files changed, 4 insertions(+), 44 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 45a9723ad4..e6dbc0b3d5 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -738,11 +738,8 @@ - - - @@ -999,43 +996,11 @@ parameter="secondary_inventory" /> - - - - - - - - - - + parameter="show_filters" /> - + + From e8b1202aea034eb47d13d787aa4a53d1f9ba6e17 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 13 Jan 2025 17:15:56 +0100 Subject: [PATCH 40/43] Clean this up as well --- indra/newview/skins/default/textures/textures.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 64a6338ea0..0230309383 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -844,10 +844,7 @@ with the same filename but different name - - - From a3b305ee49a67119f20d5f0614a00a869bfec893 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 13 Jan 2025 17:17:48 +0100 Subject: [PATCH 41/43] Move opacity option for hover text background to Miscellaneous tab and disable combobox for hovertext background if option is disabled --- .../default/xui/en/panel_preferences_UI.xml | 15 ++--- .../xui/en/panel_preferences_colors.xml | 58 ++++++++----------- 2 files changed, 31 insertions(+), 42 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index bef797947b..73f4bd18ea 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -252,13 +252,13 @@ + width="350" /> + value="2"/> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml index 6eedafe3de..b0545f31a9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -1202,36 +1202,6 @@ - - - - - - - Selection Effects (Particle Beam): @@ -1724,7 +1694,7 @@ left="30" height="12" name="floater_opacity" - top_pad="15" + top_pad="10" width="220"> Floating Window Opacity: @@ -1788,7 +1758,7 @@ left="30" height="12" name="console_opacity" - top_pad="15" + top_pad="10" width="220"> Console Opacity: @@ -1828,13 +1798,31 @@ left_pad="10" width="378" /> + + Preferences Search Highlight Color: @@ -1892,7 +1880,7 @@ left="30" height="12" name="notecard_editor_color_label" - top_pad="15" + top_pad="10" width="400"> Notecard Colors: From 6be323832747adce04817be8731da2b0398643c5 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 13 Jan 2025 17:18:15 +0100 Subject: [PATCH 42/43] Update German translation --- .../skins/ansastorm/xui/de/panel_main_inventory.xml | 2 +- .../skins/default/xui/de/floater_fs_poser.xml | 5 +++-- .../default/xui/de/floater_inventory_view_finder.xml | 6 ++++++ .../skins/default/xui/de/menu_fs_poser_poses_btn.xml | 11 ++++------- .../skins/default/xui/de/panel_main_inventory.xml | 5 ++++- .../skins/default/xui/de/panel_preferences_UI.xml | 12 ++++++++++++ .../default/xui/de/panel_preferences_colors.xml | 1 + .../skins/default/xui/en/floater_fs_poser.xml | 2 +- .../skins/default/xui/en/menu_fs_poser_poses_btn.xml | 2 +- .../skins/vintage/xui/de/panel_main_inventory.xml | 2 +- 10 files changed, 34 insertions(+), 14 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml index 0daf2b5c6b..e4e2720ffa 100644 --- a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml @@ -112,7 +112,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/floater_fs_poser.xml b/indra/newview/skins/default/xui/de/floater_fs_poser.xml index 9ba304d0bc..2119dfb5a5 100644 --- a/indra/newview/skins/default/xui/de/floater_fs_poser.xml +++ b/indra/newview/skins/default/xui/de/floater_fs_poser.xml @@ -223,6 +223,7 @@ + @@ -235,7 +236,7 @@