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 diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0256c7c78d..31b17807e2 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2132,6 +2132,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/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 764de1e2b9..f23ae785a2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8067,6 +8067,17 @@ Value 0 + FSPoserSaveExternalFileAlso + + Comment + Whether to save to an external format (like BVH or ANIM) file as well when saving a pose. + Persist + 1 + Type + Boolean + Value + 0 + FSPoserResetBaseRotationOnEdit Comment @@ -25119,6 +25130,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/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index 1077d3e0f0..634630092e 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -41,20 +41,25 @@ #include "llviewerwindow.h" #include "llwindow.h" #include "llvoavatarself.h" +#include "llinventoryfunctions.h" namespace { constexpr char POSE_INTERNAL_FORMAT_FILE_MASK[] = "*.xml"; constexpr char POSE_INTERNAL_FORMAT_FILE_EXT[] = ".xml"; +constexpr char POSE_EXTERNAL_FORMAT_FILE_EXT[] = ".bvh"; constexpr char POSE_SAVE_SUBDIRECTORY[] = "poses"; 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 char BVH_JOINT_TRANSFORM_STRING_PREFIX[] = "bvh_joint_transform_"; 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"; constexpr std::string_view POSER_RESETBASEROTONEDIT_SAVE_KEY = "FSPoserResetBaseRotationOnEdit"; +constexpr std::string_view POSER_SAVEEXTERNALFORMAT_SAVE_KEY = "FSPoserSaveExternalFileAlso"; } // namespace /// @@ -75,7 +80,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(); }); @@ -109,20 +113,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"); @@ -208,11 +212,16 @@ bool FSFloaterPoser::postBuild() mMiscJointsPnl = getChild("misc_joints_panel"); mCollisionVolumesPnl = getChild("collision_volumes_panel"); + mAlsoSaveBvhCbx = getChild("also_save_bvh_checkbox"); + mResetBaseRotCbx = getChild("reset_base_rotation_on_edit_checkbox"); + mResetBaseRotCbx->setCommitCallback([this](LLUICtrl*, const LLSD&) { onClickSetBaseRotZero(); }); + return true; } void FSFloaterPoser::onOpen(const LLSD& key) { + createUserPoseDirectoryIfNeeded(); onAvatarsRefresh(); refreshJointScrollListMembers(); onJointTabSelect(); @@ -319,10 +328,56 @@ void FSFloaterPoser::onClickPoseSave() { refreshPoseScroll(mPosesScrollList); setUiSelectedAvatarSaveFileName(filename); + + if (getSavingToBvh()) + savePoseToBvh(avatar, filename); + // TODO: provide feedback for save } } +void FSFloaterPoser::createUserPoseDirectoryIfNeeded() +{ + std::string userPath = + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, POSE_SAVE_SUBDIRECTORY); + + userPath = userPath + gDirUtilp->getDirDelimiter() + std::string(POSE_PRESETS_HANDS_SUBDIRECTORY); + if (gDirUtilp->fileExists(userPath)) + return; + + try + { + if (!gDirUtilp->fileExists(userPath)) + { + LL_WARNS("Poser") << "Couldn't find folder: " << userPath << " - creating one." << LL_ENDL; + LLFile::mkdir(userPath); + } + + 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; + } + } + catch (const std::exception& e) + { + LL_WARNS("Posing") << "Exception caught trying to create: " << userPath << e.what() << LL_ENDL; + } +} + bool FSFloaterPoser::savePoseToXml(LLVOAvatar* avatar, const std::string& poseFileName) { if (poseFileName.empty()) @@ -331,20 +386,11 @@ bool FSFloaterPoser::savePoseToXml(LLVOAvatar* avatar, const std::string& poseFi if (!mPoserAnimator.isPosingAvatar(avatar)) return false; + createUserPoseDirectoryIfNeeded(); + 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); - bool savingDiff = !mPoserAnimator.allBaseRotationsAreZero(avatar); - LLSD record; record["version"]["value"] = (S32)5; record["startFromTeePose"]["value"] = !savingDiff; @@ -376,6 +422,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()) @@ -508,10 +557,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); } @@ -540,6 +588,7 @@ void FSFloaterPoser::onPoseJointsReset() refreshRotationSliders(); refreshTrackpadCursor(); + refreshAvatarPositionSliders(); } void FSFloaterPoser::onPoseMenuAction(const LLSD& param) @@ -569,6 +618,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) @@ -666,7 +719,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) @@ -724,11 +776,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 { @@ -779,10 +832,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")) @@ -1046,30 +1102,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(); } @@ -1352,6 +1400,7 @@ std::vector FSFloaterPoser::getUiSelectedPoserJo if (activeTab == mPositionRotationPnl) { + mEntireAvJointScroll->selectFirstItem(); scrollList = mEntireAvJointScroll; } else if (activeTab == mBodyJointsPnl) @@ -1401,18 +1450,33 @@ std::vector FSFloaterPoser::getUiSelectedPoserJo return joints; } +E_RotationStyle FSFloaterPoser::getUiSelectedBoneRotationStyle(const std::string& jointName) const +{ + if (jointName.empty()) + return ABSOLUTE_ROT; + + bool hasRotationStylePreferenceParameter = hasString(XML_JOINT_DELTAROT_STRING_PREFIX + jointName); + if (!hasRotationStylePreferenceParameter) + return ABSOLUTE_ROT; + + std::string paramValue = getString(XML_JOINT_DELTAROT_STRING_PREFIX + jointName); + if (paramValue == "true") + return DELTAIC_ROT; + + return ABSOLUTE_ROT; +} + E_BoneDeflectionStyles FSFloaterPoser::getUiSelectedBoneDeflectionStyle() const { + bool isDelta = mToggleDeltaModeBtn->getValue().asBoolean(); + 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 @@ -1494,9 +1558,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(); @@ -1504,18 +1568,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(); @@ -1523,55 +1587,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) @@ -1588,52 +1637,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; @@ -1664,6 +1705,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); @@ -1696,8 +1738,8 @@ void FSFloaterPoser::setSelectedJointsPosition(F32 x, F32 y, F32 z) if (!mPoserAnimator.isPosingAvatar(avatar)) return; + LLVector3 vec3 = LLVector3(x, y, z); E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); - LLVector3 vec3 = LLVector3(x, y, z); for (auto item : getUiSelectedPoserJoints()) { @@ -1709,7 +1751,7 @@ void FSFloaterPoser::setSelectedJointsPosition(F32 x, F32 y, F32 z) } } -void FSFloaterPoser::setSelectedJointsRotation(F32 yawInRadians, F32 pitchInRadians, F32 rollInRadians) +void FSFloaterPoser::setSelectedJointsRotation(const LLVector3& absoluteRot, const LLVector3& deltaRot) { LLVOAvatar *avatar = getUiSelectedAvatar(); if (!avatar) @@ -1718,10 +1760,9 @@ 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(); + E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); for (auto item : selectedJoints) { @@ -1735,12 +1776,14 @@ void FSFloaterPoser::setSelectedJointsRotation(F32 yawInRadians, F32 pitchInRadi 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; } - mPoserAnimator.setJointRotation(avatar, item, vec3, defl, getJointTranslation(item->jointName()), - getJointNegation(item->jointName()), savingToExternal); + mPoserAnimator.setJointRotation(avatar, item, absoluteRot, deltaRot, defl, + getJointTranslation(item->jointName()), getJointNegation(item->jointName()), savingToExternal, + getUiSelectedBoneRotationStyle(item->jointName())); } if (savingToExternal) @@ -1756,8 +1799,8 @@ void FSFloaterPoser::setSelectedJointsScale(F32 x, F32 y, F32 z) if (!mPoserAnimator.isPosingAvatar(avatar)) return; - E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); LLVector3 vec3 = LLVector3(x, y, z); + E_BoneDeflectionStyles defl = getUiSelectedBoneDeflectionStyle(); for (auto item : getUiSelectedPoserJoints()) { @@ -1831,6 +1874,7 @@ void FSFloaterPoser::onJointTabSelect() refreshRotationSliders(); refreshTrackpadCursor(); enableOrDisableRedoButton(); + onClickSetBaseRotZero(); if (mToggleAdvancedPanelBtn->getValue().asBoolean()) { @@ -2024,12 +2068,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"; @@ -2041,6 +2090,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()) @@ -2128,4 +2196,256 @@ void FSFloaterPoser::addBoldToScrollList(LLScrollListCtrl* list, LLVOAvatar* ava } } +bool FSFloaterPoser::savePoseToBvh(LLVOAvatar* avatar, const std::string& poseFileName) +{ + if (poseFileName.empty()) + return false; + + if (!mPoserAnimator.isPosingAvatar(avatar)) + return false; + + bool writeSuccess = false; + + 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_EXTERNAL_FORMAT_FILE_EXT); + + llofstream file; + file.open(fullSavePath.c_str()); + if (!file.is_open()) + { + LL_WARNS("Poser") << "Unable to save pose!" << LL_ENDL; + return false; + } + + writeSuccess = writePoseAsBvh(&file, avatar); + + file.close(); + } + catch (const std::exception& e) + { + LL_WARNS("Posing") << "Exception caught in SaveToBVH: " << e.what() << LL_ENDL; + return false; + } + + return true; +} + +bool FSFloaterPoser::writePoseAsBvh(llofstream* fileStream, LLVOAvatar* avatar) +{ + if (!fileStream || !avatar) + return false; + + *fileStream << "HIERARCHY" << std::endl; + auto startingJoint = mPoserAnimator.getPoserJointByName("mPelvis"); + writeBvhFragment(fileStream, avatar, startingJoint, 0); + *fileStream << "MOTION" << std::endl; + *fileStream << "Frames: 2" << std::endl; + *fileStream << "Frame Time: 1" << std::endl; + *fileStream << "0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0" << std::endl; + writeBvhMotion(fileStream, avatar, startingJoint); + *fileStream << std::endl; + + return true; +} + +bool FSFloaterPoser::writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint, S32 tabStops) +{ + if (!joint) + return false; + + auto position = mPoserAnimator.getJointPosition(avatar, *joint); + auto saveAxis = getBvhJointTranslation(joint->jointName()); + + switch (joint->boneType()) + { + case WHOLEAVATAR: + *fileStream << "ROOT " + joint->jointName() << std::endl; + *fileStream << "{" << std::endl; + *fileStream << getTabs(tabStops + 1) + "OFFSET " + joint->bvhOffset() << std::endl; + *fileStream << getTabs(tabStops + 1) + "CHANNELS 6 Xposition Yposition Zposition Xrotation Zrotation Yrotation" << std::endl; + break; + + default: + *fileStream << getTabs(tabStops) + "JOINT " + joint->jointName() << std::endl; + *fileStream << getTabs(tabStops) + "{" << std::endl; + *fileStream << getTabs(tabStops + 1) + "OFFSET " + joint->bvhOffset() << std::endl; + + switch (saveAxis) + { + default: + case SWAP_NOTHING: + *fileStream << getTabs(tabStops + 1) + "CHANNELS 3 Xrotation Yrotation Zrotation" << std::endl; + break; + + case SWAP_YAW_AND_ROLL: + *fileStream << getTabs(tabStops + 1) + "CHANNELS 3 Zrotation Yrotation Xrotation" << std::endl; + break; + + case SWAP_ROLL_AND_PITCH: + *fileStream << getTabs(tabStops + 1) + "CHANNELS 3 Xrotation Zrotation Yrotation" << std::endl; + break; + + case SWAP_X2Z_Y2X_Z2Y: + *fileStream << getTabs(tabStops + 1) + "CHANNELS 3 Yrotation Zrotation Xrotation" << std::endl; + break; + + case SWAP_X2Y_Y2Z_Z2X: + *fileStream << getTabs(tabStops + 1) + "CHANNELS 3 Zrotation Xrotation Yrotation" << std::endl; + break; + + case SWAP_YAW_AND_PITCH: + *fileStream << getTabs(tabStops + 1) + "CHANNELS 3 Yrotation Xrotation Zrotation" << std::endl; + break; + } + break; + } + + size_t numberOfBvhChildNodes = joint->bvhChildren().size(); + if (numberOfBvhChildNodes > 0) + { + for (size_t index = 0; index != numberOfBvhChildNodes; ++index) + { + auto nextJoint = mPoserAnimator.getPoserJointByName(joint->bvhChildren()[index]); + writeBvhFragment(fileStream, avatar, nextJoint, tabStops + 1); + } + } + else + { + *fileStream << getTabs(tabStops + 1) + "End Site" << std::endl; + *fileStream << getTabs(tabStops + 1) + "{" << std::endl; + + // append the 'end knot' magic number + if (strstr(joint->jointName().c_str(), "mHead")) + *fileStream << getTabs(tabStops + 2) + "OFFSET 0.000000 3.148289 0.000000" << std::endl; + if (strstr(joint->jointName().c_str(), "mWristLeft")) + *fileStream << getTabs(tabStops + 2) + "OFFSET 4.106464 0.000000 0.000000" << std::endl; + if (strstr(joint->jointName().c_str(), "mWristRight")) + *fileStream << getTabs(tabStops + 2) + "OFFSET -4.106464 0.000000 0.000000" << std::endl; + if (strstr(joint->jointName().c_str(), "mAnkleLeft")) + *fileStream << getTabs(tabStops + 2) + "OFFSET 0.000000 -2.463878 4.653993" << std::endl; + if (strstr(joint->jointName().c_str(), "mAnkleRight")) + *fileStream << getTabs(tabStops + 2) + "OFFSET 0.000000 -2.463878 4.653993" << std::endl; + + *fileStream << getTabs(tabStops + 1) + "}" << std::endl; + } + + *fileStream << getTabs(tabStops) + "}" << std::endl; + return true; +} + +bool FSFloaterPoser::writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint) +{ + if (!joint) + return false; + + auto rotation = mPoserAnimator.getJointRotation(avatar, *joint, SWAP_NOTHING, NEGATE_NOTHING); + auto position = mPoserAnimator.getJointPosition(avatar, *joint); + + switch (joint->boneType()) + { + case WHOLEAVATAR: + *fileStream << vec3ToXYZString(position) + " " + rotationToString(rotation); + break; + + default: + *fileStream << " " + rotationToString(rotation); + break; + } + + size_t numberOfBvhChildNodes = joint->bvhChildren().size(); + for (size_t index = 0; index != numberOfBvhChildNodes; ++index) + { + auto nextJoint = mPoserAnimator.getPoserJointByName(joint->bvhChildren()[index]); + writeBvhMotion(fileStream, avatar, nextJoint); + } + + return true; +} + +std::string FSFloaterPoser::vec3ToXYZString(const LLVector3& val) +{ + return std::to_string(val[VX]) + " " + std::to_string(val[VY]) + " " + std::to_string(val[VZ]); +} + +std::string FSFloaterPoser::rotationToString(const LLVector3& val) +{ + return std::to_string(val[VX] * RAD_TO_DEG) + " " + std::to_string(val[VY] * RAD_TO_DEG) + " " + std::to_string(val[VZ] * RAD_TO_DEG); +} + +std::string FSFloaterPoser::getTabs(S32 numOfTabstops) +{ + std::string tabSpaces; + for (S32 i = 0; i < numOfTabstops; i++) + tabSpaces += "\t"; + + return tabSpaces; +} + +E_BoneAxisTranslation FSFloaterPoser::getBvhJointTranslation(const std::string& jointName) const +{ + if (jointName.empty()) + return SWAP_X2Y_Y2Z_Z2X; + + bool hasTransformParameter = hasString(BVH_JOINT_TRANSFORM_STRING_PREFIX + jointName); + if (!hasTransformParameter) + return SWAP_X2Y_Y2Z_Z2X; + + std::string paramValue = getString(BVH_JOINT_TRANSFORM_STRING_PREFIX + jointName); + + if (strstr(paramValue.c_str(), "SWAP_YAW_AND_ROLL")) + return SWAP_YAW_AND_ROLL; + else if (strstr(paramValue.c_str(), "SWAP_YAW_AND_PITCH")) + return SWAP_YAW_AND_PITCH; + else if (strstr(paramValue.c_str(), "SWAP_ROLL_AND_PITCH")) + return SWAP_ROLL_AND_PITCH; + else if (strstr(paramValue.c_str(), "SWAP_X2Y_Y2Z_Z2X")) + return SWAP_X2Y_Y2Z_Z2X; + else if (strstr(paramValue.c_str(), "SWAP_X2Z_Y2X_Z2Y")) + return SWAP_X2Z_Y2X_Z2Y; + else + return SWAP_NOTHING; +} + +S32 FSFloaterPoser::getBvhJointNegation(const std::string& jointName) const +{ + S32 result = NEGATE_NOTHING; + + if (jointName.empty()) + return result; + + bool hasTransformParameter = hasString(BVH_JOINT_TRANSFORM_STRING_PREFIX + jointName); + if (!hasTransformParameter) + return result; + + std::string paramValue = getString(BVH_JOINT_TRANSFORM_STRING_PREFIX + jointName); + + if (strstr(paramValue.c_str(), "NEGATE_YAW")) + result |= NEGATE_YAW; + if (strstr(paramValue.c_str(), "NEGATE_PITCH")) + result |= NEGATE_PITCH; + if (strstr(paramValue.c_str(), "NEGATE_ROLL")) + result |= NEGATE_ROLL; + if (strstr(paramValue.c_str(), "NEGATE_ALL")) + return NEGATE_ALL; + + return result; +} + + bool FSFloaterPoser::getWhetherToResetBaseRotationOnEdit() { return gSavedSettings.getBOOL(POSER_RESETBASEROTONEDIT_SAVE_KEY); } +void FSFloaterPoser::onClickSetBaseRotZero() { mAlsoSaveBvhCbx->setEnabled(getWhetherToResetBaseRotationOnEdit()); } + +bool FSFloaterPoser::getSavingToBvh() +{ + return getWhetherToResetBaseRotationOnEdit() && gSavedSettings.getBOOL(POSER_RESETBASEROTONEDIT_SAVE_KEY); +} + diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index ab20071128..f847fb587a 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; /// @@ -148,6 +150,14 @@ class FSFloaterPoser : public LLFloater /// A E_BoneDeflectionStyles member. E_BoneDeflectionStyles getUiSelectedBoneDeflectionStyle() const; + /// + /// Gets the means by which the rotation should be applied to the supplied joint name. + /// Such as: fiddle the opposite joint too. + /// + /// 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. /// @@ -176,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(const LLVector3& absoluteRot, const LLVector3& deltaRot); void setSelectedJointsPosition(F32 x, F32 y, F32 z); void setSelectedJointsScale(F32 x, F32 y, F32 z); @@ -193,10 +203,12 @@ class FSFloaterPoser : public LLFloater LLVector3 getScaleOfFirstSelectedJoint() const; // Pose load/save + void createUserPoseDirectoryIfNeeded(); void onToggleLoadSavePanel(); void onClickPoseSave(); void onPoseFileSelect(); bool savePoseToXml(LLVOAvatar* avatar, const std::string& posePath); + bool savePoseToBvh(LLVOAvatar* avatar, const std::string& posePath); void onClickBrowsePoseCache(); void onPoseMenuAction(const LLSD& param); void loadPoseFromXml(LLVOAvatar* avatar, const std::string& poseFileName, E_LoadPoseMethods loadMethod); @@ -211,8 +223,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(); @@ -227,7 +238,7 @@ class FSFloaterPoser : public LLFloater void startPosingSelf(); void stopPosingSelf(); void onLimbTrackballChanged(); - void onLimbYawPitchRollChanged(); + void onYawPitchRollSliderChanged(); void onAvatarPositionSet(); void onAdvancedPositionSet(); void onAdvancedScaleSet(); @@ -241,6 +252,7 @@ class FSFloaterPoser : public LLFloater void onClickLoadLeftHandPose(); void onClickLoadRightHandPose(); void onClickLoadHandPose(bool isRightHand); + void onClickSetBaseRotZero(); // UI Refreshments void refreshRotationSliders(); @@ -291,6 +303,15 @@ class FSFloaterPoser : public LLFloater /// The kind of axis transformation to perform. S32 getJointNegation(const std::string& jointName) const; + /// + /// Gets the axial translation required for joints when saving to BVH. + /// + /// The name of the joint to get the transformation for. + /// The axial translation required. + E_BoneAxisTranslation getBvhJointTranslation(const std::string& jointName) const; + + S32 getBvhJointNegation(const std::string& jointName) const; + /// /// Refreshes the text on the avatars scroll list based on their state. /// @@ -333,6 +354,70 @@ 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); + + /// Gets whether the pose should also write a BVH file when saved. + /// + /// True if the user wants to additionally save a BVH file, otherwise false. + bool getSavingToBvh(); + + /// + /// Writes the current pose in BVH-format to the supplied stream. + /// + /// The stream to write the pose to. + /// The avatar whose pose should be saved. + /// True if the pose saved successfully as a BVH, otherwise false. + /// + /// Only joints with a zero base-rotation should export to BVH. + /// + bool writePoseAsBvh(llofstream* fileStream, LLVOAvatar* avatar); + + /// + /// Recursively writes a fragment of a BVH file format representation of the supplied joint, then that joints BVH child(ren). + /// None of what is written here matters a jot; it's just here so it parses on read. + /// + /// The stream to write the fragment to. + /// The avatar owning the supplied joint. + /// The joint whose fragment should be written, and whose child(ren) will also be written. + /// The number of tab-stops to include for formatting purpose. + /// True if the fragment wrote successfully, otherwise false. + bool writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint, S32 tabStops); + + /// + /// Writes a fragment of the 'single line' representing an animation frame within the BVH file respresenting the positions and/or + /// rotations. + /// + /// The stream to write the position and/or rotation to. + /// The avatar owning the supplied joint. + /// The joint whose position and/or rotation should be written. + /// + bool writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint); + + /// + /// Generates a string with the supplied number of tab-chars. + /// + std::string static getTabs(S32 numOfTabstops); + + /// + /// Transforms a rotation such that llbvhloader.cpp can resolve it to something vaguely approximating the supplied angle. + /// When I say vague, I mean, it's numbers, buuuuut. + /// + std::string static rotationToString(const LLVector3& val); + + /// + /// Transforms the supplied vector into a string of three numbers, format suiting to writing into a BVH file. + /// + std::string static vec3ToXYZString(const LLVector3& val); + /// /// The time when the last click of a button was made. /// Utilized for controls needing a 'double click do' function. @@ -355,6 +440,7 @@ class FSFloaterPoser : public LLFloater /// static F32 unWrapScale(F32 scale); + LLVector3 mLastSliderRotation; FSVirtualTrackpad* mAvatarTrackball{ nullptr }; LLSliderCtrl* mTrackpadSensitivitySlider{ nullptr }; @@ -412,6 +498,9 @@ class FSFloaterPoser : public LLFloater LLPanel* mMiscJointsPnl{ nullptr }; LLPanel* mCollisionVolumesPnl{ nullptr }; LLPanel* mPosesLoadSavePnl{ nullptr }; + + LLCheckBoxCtrl* mResetBaseRotCbx{ nullptr }; + LLCheckBoxCtrl* mAlsoSaveBvhCbx{ nullptr }; }; #endif diff --git a/indra/newview/fsjointpose.cpp b/indra/newview/fsjointpose.cpp index ec3abb0b7f..b6bb99bf95 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) { @@ -166,13 +169,31 @@ 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; + addToUndo(mRotation, &mUndoneRotationIndex, &mLastSetRotationDeltas, &mTimeLastUpdatedRotation); + 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 13ee1990bb..6845e8419c 100644 --- a/indra/newview/fsposeranimator.cpp +++ b/indra/newview/fsposeranimator.cpp @@ -116,7 +116,7 @@ void FSPoserAnimator::undoLastJointRotation(LLVOAvatar* avatar, const FSPoserJoi jointPose->undoLastRotationChange(); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -144,7 +144,7 @@ void FSPoserAnimator::undoLastJointPosition(LLVOAvatar* avatar, const FSPoserJoi jointPose->undoLastPositionChange(); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -172,7 +172,7 @@ void FSPoserAnimator::undoLastJointScale(LLVOAvatar* avatar, const FSPoserJoint& jointPose->undoLastScaleChange(); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -200,7 +200,7 @@ void FSPoserAnimator::resetJointPosition(LLVOAvatar* avatar, const FSPoserJoint& jointPose->setPositionDelta(LLVector3()); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -228,7 +228,7 @@ void FSPoserAnimator::resetJointScale(LLVOAvatar* avatar, const FSPoserJoint& jo jointPose->setScaleDelta(LLVector3()); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -275,7 +275,7 @@ void FSPoserAnimator::redoLastJointRotation(LLVOAvatar* avatar, const FSPoserJoi jointPose->redoLastRotationChange(); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -303,7 +303,7 @@ void FSPoserAnimator::redoLastJointPosition(LLVOAvatar* avatar, const FSPoserJoi jointPose->redoLastPositionChange(); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -331,7 +331,7 @@ void FSPoserAnimator::redoLastJointScale(LLVOAvatar* avatar, const FSPoserJoint& jointPose->redoLastScaleChange(); - if (style == NONE) + if (style == NONE || style == DELTAMODE) return; FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint.mirrorJointName()); @@ -377,29 +377,40 @@ void FSPoserAnimator::setJointPosition(LLVOAvatar* avatar, const FSPoserJoint* j if (!jointPose) return; - if (style == NONE) - { - jointPose->setPositionDelta(position); - return; - } - LLVector3 positionDelta = jointPose->getPositionDelta() - position; + switch (style) + { + case MIRROR: + case MIRROR_DELTA: + case SYMPATHETIC_DELTA: + case SYMPATHETIC: + jointPose->setPositionDelta(position); + break; + + case DELTAMODE: + case NONE: + default: + jointPose->setPositionDelta(position); + return; + } + FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName()); if (!oppositeJointPose) return; LLVector3 oppositeJointPosition = oppositeJointPose->getPositionDelta(); + switch (style) { - case SYMPATHETIC: - jointPose->setPositionDelta(position); - oppositeJointPose->setPositionDelta(oppositeJointPosition - positionDelta); + case MIRROR: + case MIRROR_DELTA: + oppositeJointPose->setPositionDelta(oppositeJointPosition + positionDelta); break; - case MIRROR: - jointPose->setPositionDelta(position); - oppositeJointPose->setPositionDelta(oppositeJointPosition + positionDelta); + case SYMPATHETIC_DELTA: + case SYMPATHETIC: + oppositeJointPose->setPositionDelta(oppositeJointPosition - positionDelta); break; default: @@ -485,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; @@ -504,21 +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(deltaRot * jointPose->getRotationDelta()); break; case DELTAMODE: - jointPose->setRotationDelta(rot_quat * jointPose->getRotationDelta()); - break; + 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; } @@ -526,23 +552,24 @@ 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(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 DELTAMODE: - oppositeJointPose->setRotationDelta(rot_quat * oppositeJointPose->getRotationDelta()); + case MIRROR_DELTA: + inv_quat = LLQuaternion(-deltaRot.mQ[VX], deltaRot.mQ[VY], -deltaRot.mQ[VZ], deltaRot.mQ[VW]); + oppositeJointPose->setRotationDelta(inv_quat * oppositeJointPose->getRotationDelta()); break; default: @@ -652,6 +679,7 @@ LLQuaternion FSPoserAnimator::translateRotationToQuaternion(E_BoneAxisTranslatio LLQuaternion rot_quat; rot_quat = LLQuaternion(rot_mat) * rot_quat; + rot_quat.normalize(); return rot_quat; } @@ -745,15 +773,24 @@ void FSPoserAnimator::setJointScale(LLVOAvatar* avatar, const FSPoserJoint* join return; jointPose->setScaleDelta(scale); - - if (style == NONE) - return; - FSJointPose* oppositeJointPose = posingMotion->getJointPoseByJointName(joint->mirrorJointName()); if (!oppositeJointPose) return; - oppositeJointPose->setScaleDelta(scale); + switch (style) + { + case SYMPATHETIC: + case MIRROR: + case SYMPATHETIC_DELTA: + case MIRROR_DELTA: + oppositeJointPose->setScaleDelta(scale); + break; + + case DELTAMODE: + case NONE: + default: + return; + } } bool FSPoserAnimator::tryGetJointSaveVectors(LLVOAvatar* avatar, const FSPoserJoint& joint, LLVector3* rot, LLVector3* pos, diff --git a/indra/newview/fsposeranimator.h b/indra/newview/fsposeranimator.h index 6821e0aaa9..109044b58b 100644 --- a/indra/newview/fsposeranimator.h +++ b/indra/newview/fsposeranimator.h @@ -50,12 +50,28 @@ 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, // 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. @@ -98,11 +114,12 @@ public: /// class FSPoserJoint { - std::string mJointName; // expected to be a match to LLJoint.getName() for a joint implementation. - std::string mMirrorJointName; - E_BoneTypes mBoneList; + std::string mJointName; // expected to be a match to LLJoint.getName() for a joint implementation. + std::string mMirrorJointName; + E_BoneTypes mBoneList; std::vector mBvhChildren; - bool mDontFlipOnMirror = false; + std::string bvhOffsetMagicNumber; + bool mDontFlipOnMirror = false; public: /// @@ -130,6 +147,11 @@ public: /// std::vector bvhChildren() const { return mBvhChildren; } + /// + /// Gets the bvh offset magic number for this joint. + /// + std::string bvhOffset() const { return bvhOffsetMagicNumber; } + /// /// Creates a new instance of a PoserJoint. /// @@ -142,13 +164,15 @@ public: /// The type of bone, often determining with which other bones the new instance would appear with. /// The optional array of joints, needed for BVH saving, which are the direct decendent(s) of this joint. /// The option for whether this joint should rotation-flip it counterpart when mirroring the pose of the entire body. - FSPoserJoint(std::string joint_name, std::string mirror_joint_name, E_BoneTypes bone_list, std::vector bhv_children = {}, bool dont_flip_on_mirror = false) + FSPoserJoint(std::string joint_name, std::string mirror_joint_name, E_BoneTypes bone_list, + std::vector bhv_children = {}, std::string bvhOffset = "", bool dont_flip_on_mirror = false) { - mJointName = joint_name; - mMirrorJointName = mirror_joint_name; - mBoneList = bone_list; - mBvhChildren = bhv_children; - mDontFlipOnMirror = dont_flip_on_mirror; + mJointName = joint_name; + mMirrorJointName = mirror_joint_name; + mBoneList = bone_list; + mBvhChildren = bhv_children; + bvhOffsetMagicNumber = bvhOffset; + mDontFlipOnMirror = dont_flip_on_mirror; } }; @@ -162,66 +186,66 @@ public: /// const std::vector PoserJoints{ // head, torso, legs - { "mHead", "", BODY }, - { "mNeck", "", BODY, { "mHead" } }, - { "mPelvis", "", WHOLEAVATAR, { "mTorso", "mHipLeft", "mHipRight" } }, - { "mChest", "", BODY, { "mNeck", "mCollarLeft", "mCollarRight", "mWingsRoot" } }, - { "mTorso", "", BODY, { "mChest" } }, - { "mCollarLeft", "mCollarRight", BODY, { "mShoulderLeft" } }, - { "mShoulderLeft", "mShoulderRight", BODY, { "mElbowLeft" } }, - { "mElbowLeft", "mElbowRight", BODY, { "mWristLeft" } }, - { "mWristLeft", "mWristRight", BODY }, - { "mCollarRight", "mCollarLeft", BODY, { "mShoulderRight" }, true }, - { "mShoulderRight", "mShoulderLeft", BODY, { "mElbowRight" }, true }, - { "mElbowRight", "mElbowLeft", BODY, { "mWristRight" }, true }, - { "mWristRight", "mWristLeft", BODY, {}, true }, - { "mHipLeft", "mHipRight", BODY, { "mKneeLeft" } }, - { "mKneeLeft", "mKneeRight", BODY, { "mAnkleLeft" } }, - { "mAnkleLeft", "mAnkleRight", BODY }, - { "mHipRight", "mHipLeft", BODY, { "mKneeRight" }, true }, - { "mKneeRight", "mKneeLeft", BODY, { "mAnkleRight" }, true }, - { "mAnkleRight", "mAnkleLeft", BODY, {}, true }, + { "mHead", "", BODY, {}, "0.000000 3.148285 0.000000" }, + { "mNeck", "", BODY, { "mHead" }, "0.000000 10.266162 -0.273764" }, + { "mPelvis", "", WHOLEAVATAR, { "mTorso", "mHipLeft", "mHipRight" }, "0.000000 0.000000 0.000000" }, + { "mChest", "", BODY, { "mNeck", "mCollarLeft", "mCollarRight" }, "0.000000 8.486693 -0.684411" }, + { "mTorso", "", BODY, { "mChest" }, "0.000000 3.422050 0.000000" }, + { "mCollarLeft", "mCollarRight", BODY, { "mShoulderLeft" }, "3.422053 6.707223 -0.821293" }, + { "mShoulderLeft", "mShoulderRight", BODY, { "mElbowLeft" }, "3.285171 0.000000 0.000000" }, + { "mElbowLeft", "mElbowRight", BODY, { "mWristLeft" }, "10.129278 0.000000 0.000000" }, + { "mWristLeft", "mWristRight", BODY, {}, "8.486692 0.000000 0.000000" }, + { "mCollarRight", "mCollarLeft", BODY, { "mShoulderRight" }, "-3.558935 6.707223 -0.821293", true }, + { "mShoulderRight", "mShoulderLeft", BODY, { "mElbowRight" }, "-3.148289 0.000000 0.000000", true }, + { "mElbowRight", "mElbowLeft", BODY, { "mWristRight" }, "-10.266159 0.000000 0.000000", true }, + { "mWristRight", "mWristLeft", BODY, {}, "-8.349810 0.000000 0.000000", true }, + { "mHipLeft", "mHipRight", BODY, { "mKneeLeft" }, "5.338403 -1.642589 1.368821" }, + { "mKneeLeft", "mKneeRight", BODY, { "mAnkleLeft" }, "-2.053232 -20.121670 0.000000" }, + { "mAnkleLeft", "mAnkleRight", BODY, {}, "0.000000 -19.300380 -1.231939" }, + { "mHipRight", "mHipLeft", BODY, { "mKneeRight" }, "-5.338403 -1.642589 1.368821", true }, + { "mKneeRight", "mKneeLeft", BODY, { "mAnkleRight" }, "2.053232 -20.121670 0.000000", true }, + { "mAnkleRight", "mAnkleLeft", BODY, {}, "0.000000 -19.300380 -1.231939", true }, // face { "mFaceForeheadLeft", "mFaceForeheadRight", FACE }, { "mFaceForeheadCenter", "", FACE }, - { "mFaceForeheadRight", "mFaceForeheadLeft", FACE, {}, true }, + { "mFaceForeheadRight", "mFaceForeheadLeft", FACE, {}, "", true }, { "mFaceEyebrowOuterLeft", "mFaceEyebrowOuterRight", FACE }, { "mFaceEyebrowCenterLeft", "mFaceEyebrowCenterRight", FACE }, { "mFaceEyebrowInnerLeft", "mFaceEyebrowInnerRight", FACE }, - { "mFaceEyebrowOuterRight", "mFaceEyebrowOuterLeft", FACE, {}, true }, - { "mFaceEyebrowCenterRight", "mFaceEyebrowCenterLeft", FACE, {}, true }, - { "mFaceEyebrowInnerRight", "mFaceEyebrowInnerLeft", FACE, {}, true }, + { "mFaceEyebrowOuterRight", "mFaceEyebrowOuterLeft", FACE, {}, "", true }, + { "mFaceEyebrowCenterRight", "mFaceEyebrowCenterLeft", FACE, {}, "", true }, + { "mFaceEyebrowInnerRight", "mFaceEyebrowInnerLeft", FACE, {}, "", true }, { "mEyeLeft", "mEyeRight", FACE }, - { "mEyeRight", "mEyeLeft", FACE, {}, true }, + { "mEyeRight", "mEyeLeft", FACE, {}, "", true }, { "mFaceEyeLidUpperLeft", "mFaceEyeLidUpperRight", FACE }, { "mFaceEyeLidLowerLeft", "mFaceEyeLidLowerRight", FACE }, - { "mFaceEyeLidUpperRight", "mFaceEyeLidUpperLeft", FACE, {}, true }, - { "mFaceEyeLidLowerRight", "mFaceEyeLidLowerLeft", FACE, {}, true }, + { "mFaceEyeLidUpperRight", "mFaceEyeLidUpperLeft", FACE, {}, "", true }, + { "mFaceEyeLidLowerRight", "mFaceEyeLidLowerLeft", FACE, {}, "", true }, { "mFaceEar1Left", "mFaceEar1Right", FACE }, { "mFaceEar2Left", "mFaceEar2Right", FACE }, - { "mFaceEar1Right", "mFaceEar1Left", FACE, {}, true }, - { "mFaceEar2Right", "mFaceEar2Left", FACE, {}, true }, + { "mFaceEar1Right", "mFaceEar1Left", FACE, {}, "", true }, + { "mFaceEar2Right", "mFaceEar2Left", FACE, {}, "", true }, { "mFaceNoseLeft", "mFaceNoseRight", FACE }, { "mFaceNoseCenter", "", FACE }, - { "mFaceNoseRight", "mFaceNoseLeft", FACE, {}, true }, + { "mFaceNoseRight", "mFaceNoseLeft", FACE, {}, "", true }, { "mFaceCheekUpperLeft", "mFaceCheekUpperRight", FACE }, { "mFaceCheekLowerLeft", "mFaceCheekLowerRight", FACE }, - { "mFaceCheekUpperRight", "mFaceCheekUpperLeft", FACE, {}, true }, - { "mFaceCheekLowerRight", "mFaceCheekLowerLeft", FACE, {}, true }, + { "mFaceCheekUpperRight", "mFaceCheekUpperLeft", FACE, {}, "", true }, + { "mFaceCheekLowerRight", "mFaceCheekLowerLeft", FACE, {}, "", true }, { "mFaceLipUpperLeft", "mFaceLipUpperRight", FACE }, { "mFaceLipUpperCenter", "", FACE }, - { "mFaceLipUpperRight", "mFaceLipUpperLeft", FACE, {}, true }, + { "mFaceLipUpperRight", "mFaceLipUpperLeft", FACE, {}, "", true }, { "mFaceLipCornerLeft", "mFaceLipCornerRight", FACE }, - { "mFaceLipCornerRight", "mFaceLipCornerLeft", FACE, {}, true }, + { "mFaceLipCornerRight", "mFaceLipCornerLeft", FACE, {}, "", true }, { "mFaceTongueBase", "", FACE }, - { "mFaceTongueTip", "", FACE, {}, true }, + { "mFaceTongueTip", "", FACE, {}, "", true }, { "mFaceLipLowerLeft", "mFaceLipLowerRight", FACE }, { "mFaceLipLowerCenter", "", FACE }, - { "mFaceLipLowerRight", "mFaceLipLowerLeft", FACE, {}, true }, + { "mFaceLipLowerRight", "mFaceLipLowerLeft", FACE, {}, "", true }, { "mFaceJaw", "", FACE }, // left hand @@ -242,21 +266,21 @@ public: { "mHandPinky3Left", "mHandPinky3Right", HANDS }, // right hand - { "mHandThumb1Right", "mHandThumb1Left", HANDS, {}, true }, - { "mHandThumb2Right", "mHandThumb2Left", HANDS, {}, true }, - { "mHandThumb3Right", "mHandThumb3Left", HANDS, {}, true }, - { "mHandIndex1Right", "mHandIndex1Left", HANDS, {}, true }, - { "mHandIndex2Right", "mHandIndex2Left", HANDS, {}, true }, - { "mHandIndex3Right", "mHandIndex3Left", HANDS, {}, true }, - { "mHandMiddle1Right", "mHandMiddle1Left", HANDS, {}, true }, - { "mHandMiddle2Right", "mHandMiddle2Left", HANDS, {}, true }, - { "mHandMiddle3Right", "mHandMiddle3Left", HANDS, {}, true }, - { "mHandRing1Right", "mHandRing1Left", HANDS, {}, true }, - { "mHandRing2Right", "mHandRing2Left", HANDS, {}, true }, - { "mHandRing3Right", "mHandRing3Left", HANDS, {}, true }, - { "mHandPinky1Right", "mHandPinky1Left", HANDS, {}, true }, - { "mHandPinky2Right", "mHandPinky2Left", HANDS, {}, true }, - { "mHandPinky3Right", "mHandPinky3Left", HANDS, {}, true }, + { "mHandThumb1Right", "mHandThumb1Left", HANDS, {}, "", true }, + { "mHandThumb2Right", "mHandThumb2Left", HANDS, {}, "", true }, + { "mHandThumb3Right", "mHandThumb3Left", HANDS, {}, "", true }, + { "mHandIndex1Right", "mHandIndex1Left", HANDS, {}, "", true }, + { "mHandIndex2Right", "mHandIndex2Left", HANDS, {}, "", true }, + { "mHandIndex3Right", "mHandIndex3Left", HANDS, {}, "", true }, + { "mHandMiddle1Right", "mHandMiddle1Left", HANDS, {}, "", true }, + { "mHandMiddle2Right", "mHandMiddle2Left", HANDS, {}, "", true }, + { "mHandMiddle3Right", "mHandMiddle3Left", HANDS, {}, "", true }, + { "mHandRing1Right", "mHandRing1Left", HANDS, {}, "", true }, + { "mHandRing2Right", "mHandRing2Left", HANDS, {}, "", true }, + { "mHandRing3Right", "mHandRing3Left", HANDS, {}, "", true }, + { "mHandPinky1Right", "mHandPinky1Left", HANDS, {}, "", true }, + { "mHandPinky2Right", "mHandPinky2Left", HANDS, {}, "", true }, + { "mHandPinky3Right", "mHandPinky3Left", HANDS, {}, "", true }, // tail and hind limbs { "mTail1", "", MISC }, @@ -271,10 +295,10 @@ public: { "mHindLimb2Left", "mHindLimb2Right", MISC }, { "mHindLimb3Left", "mHindLimb3Right", MISC }, { "mHindLimb4Left", "mHindLimb4Right", MISC }, - { "mHindLimb1Right", "mHindLimb1Left", MISC, {}, true }, - { "mHindLimb2Right", "mHindLimb2Left", MISC, {}, true }, - { "mHindLimb3Right", "mHindLimb3Left", MISC, {}, true }, - { "mHindLimb4Right", "mHindLimb4Left", MISC, {}, true }, + { "mHindLimb1Right", "mHindLimb1Left", MISC, {}, "", true }, + { "mHindLimb2Right", "mHindLimb2Left", MISC, {}, "", true }, + { "mHindLimb3Right", "mHindLimb3Left", MISC, {}, "", true }, + { "mHindLimb4Right", "mHindLimb4Left", MISC, {}, "", true }, // wings { "mWingsRoot", "", MISC }, @@ -283,15 +307,15 @@ public: { "mWing3Left", "mWing3Right", MISC }, { "mWing4Left", "mWing4Right", MISC }, { "mWing4FanLeft", "mWing4FanRight", MISC }, - { "mWing1Right", "mWing1Left", MISC, {}, true }, - { "mWing2Right", "mWing2Left", MISC, {}, true }, - { "mWing3Right", "mWing3Left", MISC, {}, true }, - { "mWing4Right", "mWing4Left", MISC, {}, true }, - { "mWing4FanRight", "mWing4FanLeft", MISC, {}, true }, + { "mWing1Right", "mWing1Left", MISC, {}, "", true }, + { "mWing2Right", "mWing2Left", MISC, {}, "", true }, + { "mWing3Right", "mWing3Left", MISC, {}, "", true }, + { "mWing4Right", "mWing4Left", MISC, {}, "", true }, + { "mWing4FanRight", "mWing4FanLeft", MISC, {}, "", true }, // Collision Volumes { "LEFT_PEC", "RIGHT_PEC", COL_VOLUMES }, - { "RIGHT_PEC", "LEFT_PEC", COL_VOLUMES, {}, true }, + { "RIGHT_PEC", "LEFT_PEC", COL_VOLUMES, {}, "", true }, { "BELLY", "", COL_VOLUMES }, { "BUTT", "", COL_VOLUMES }, }; @@ -447,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. diff --git a/indra/newview/fsposingmotion.cpp b/indra/newview/fsposingmotion.cpp index d16e9f5374..e39c6569b0 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); @@ -266,12 +266,35 @@ 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; +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(const LLQuaternion& q1, const 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..103e9bda6a 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 quaternions are near enough to equal. + /// + /// 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; } }; #endif // FS_POSINGMOTION_H 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. /// diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 1dd136f61f..1fbdc47ff1 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 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"); + 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 LLHUDNameTag 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..b823517313 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -60,6 +60,11 @@ public: bool isVisible() const { return mVisible; } + // [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; } + // [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 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; LLPointer mSourceObject; LLPointer mTargetObject; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 15a4c8a69e..b036d5fa67 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 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; @@ -93,11 +99,20 @@ LLHUDText::LLHUDText(const U8 type) : mFadeDistance = gSavedSettings.getF32("FSHudTextFadeDistance"); mFadeRange = gSavedSettings.getF32("FSHudTextFadeRange"); // + // [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; mOffscreen = false; mRadius = 0.1f; LLPointer ptr(this); sTextObjects.insert(ptr); + // [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) + // [FIRE-35019] } LLHUDText::~LLHUDText() @@ -108,7 +123,21 @@ void LLHUDText::render() { if (!mOnHUDAttachment && sDisplayText) { - LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); + // [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 + 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 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) + // 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,15 +178,43 @@ void LLHUDText::renderText() { return; } + // [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()) + { + 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 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 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); + // 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 +262,21 @@ void LLHUDText::renderText() F32 y_offset = (F32)mOffsetY; // Render label + // [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. + if ((mShowBackground == SHOW_BACKGROUND_ALL || + mShowBackground == SHOW_BACKGROUND_ONLY_HIGHLIGHTED && mbIsHighlighted && mbUseHoverHighlight) && + (mSourceObject.notNull() && 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,7 +297,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 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 LLHUDNameTag 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 +314,10 @@ void LLHUDText::renderText() else // ALIGN_LEFT { x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f); + // [FIRE-35019] Add LLHUDNameTag background to floating text and hover highlights + // *HACK -> borrowed from LLHUDNameTag to match + x_offset += 1; + // [FIRE-35019] } text_color = segment_iter->mColor; @@ -240,6 +326,13 @@ void LLHUDText::renderText() text_color = linearColor4(text_color); } text_color.mV[VALPHA] *= alpha_factor; + // [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) + { + 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 +429,13 @@ void LLHUDText::setFont(const LLFontGL* font) void LLHUDText::setColor(const LLColor4 &color) { mColor = color; + // [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): + // 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 +461,15 @@ void LLHUDText::setDoFade(const bool do_fade) void LLHUDText::updateVisibility() { + // [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"); + if (mbUseHoverHighlight && mbIsHighlighted) + { + doFade = false; + } + // [FIRE-35019] if (mSourceObject) { mSourceObject->updateText(); @@ -421,7 +530,11 @@ void LLHUDText::updateVisibility() mLastDistance = (mPositionAgent - LLViewerCamera::getInstance()->getOrigin()).magVec(); - if (!mTextSegments.size() || (mDoFade && (mLastDistance > mFadeDistance + mFadeRange))) + // [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))) + // [FIRE-35019] { mVisible = false; return; @@ -523,6 +636,14 @@ void LLHUDText::updateSize() F32 height = 0.f; F32 width = 0.f; + // [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. + 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 +654,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 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)); + + //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 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) + { + 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 +701,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 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 + // [FIRE-35019] } void LLHUDText::updateAll() diff --git a/indra/newview/llhudtext.h b/indra/newview/llhudtext.h index 3130dbf271..f1327632f1 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 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. + // 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 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; LLFontGL::StyleFlags mStyle; const LLFontGL* mFont; @@ -71,6 +90,9 @@ protected: private: LLWString mText; std::map mFontWidthMap; + // [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] }; public: @@ -178,6 +200,12 @@ private: std::string mObjText; // [/RLVa:KB] + // [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) + // [FIRE-35019] static bool sDisplayText ; static std::set > sTextObjects; static std::vector > sVisibleTextObjects; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 122afcc8e6..c2e6ad344c 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -99,6 +99,11 @@ public: void onCreatorSelfFilterCommit(); void onCreatorOtherFilterCommit(); + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + void onOnlyCoalescedFilterCommit(); // Commit method for the Only Coalesced Filter checkbox + void onShowLinksFilterCommit(); // Commit method for the Show Links Filter combo box + // [FIRE-35042] + void onPermissionsChanged(); // FIRE-1175 - Filter Permissions Menu static void onTimeAgo(LLUICtrl*, void *); @@ -115,6 +120,10 @@ private: LLCheckBoxCtrl* mCreatorSelf; LLCheckBoxCtrl* mCreatorOthers; LLInventoryFilter* mFilter; + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + LLCheckBoxCtrl* mOnlyCoalescedFilterCheck; // Stores the pointer to the Only Coalesced filter checkbox + LLComboBox* mShowLinksFilterCombo; // Stores the pointer to the Show Links filter combo box + // [FIRE-35042] }; ///---------------------------------------------------------------------------- @@ -191,6 +200,12 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mEnableCallbackRegistrar.add("Inventory.GearDefault.Visible", boost::bind(&LLPanelMainInventory::isActionVisible, this, _2)); // + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Added new button to show all filters, not just Only Coalesced Filter + // Add a call back on the existing Inventory ShowFilters Check on the show_filters_inv_btn + mEnableCallbackRegistrar.add("Inventory.ShowFilters.Check", boost::bind(&LLPanelMainInventory::isAnyFilterChecked, this, _2)); + // [FIRE-35042] + mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(false); @@ -908,6 +923,31 @@ bool LLPanelMainInventory::isSortByChecked(const LLSD& userdata) } // Sort By menu handlers +// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible +// Callback method used to update the Show Filter button on the inventory bottom UI +bool LLPanelMainInventory::isAnyFilterChecked(const LLSD& userdata) +{ + // Validate that the command came from the right check box (Show Filters Modified) + const std::string command_name = userdata.asString(); + if (command_name == "show_filters_modified") + { + // Only use thte active panel if it is valid + if (mActivePanel) + { + // Get the current filter object + LLInventoryFilter& filter = getCurrentFilter(); + // If either of the three filter checks are true, Is Not Default, Filter Creator Type is not set to all creators, + // and Show Folder State is set to show folder state then we need to turn on the Show Filter Button check higlight, + // so return true if any of these are true. + return filter.isNotDefault() || filter.getFilterCreatorType() != LLInventoryFilter::FILTERCREATOR_ALL || + filter.getShowFolderState() == LLInventoryFilter::SHOW_ALL_FOLDERS; + } + } + + return false; +} +// [FIRE-35042] + // static bool LLPanelMainInventory::filtersVisible(void* user_data) { @@ -1074,6 +1114,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 +1573,25 @@ 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"); + // If the checkbox could be found, then set the commit callback to onOnlyCoalescedFilterCommit to update the mFilter object + // with the value in the checkbox. + if (mOnlyCoalescedFilterCheck) + { + mOnlyCoalescedFilterCheck->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit, this)); + } + // Get the Finder's Show Links Filter combobox for use later as well to also prevent having to call get child everytime accessing it. + mShowLinksFilterCombo = getChild("inventory_filter_show_links_combo"); + // If the combobox could be found, then set the commit callback to onShowLinksFilterCommit to update the mFilter object + // with the value in the checkbox. + if (mShowLinksFilterCombo) + { + mShowLinksFilterCombo->setCommitCallback(boost::bind(&LLFloaterInventoryFinder::onShowLinksFilterCommit, this)); + } + // [FIRE-35042] + childSetAction("Close", onCloseBtn, this); // FIRE-5160: Don't reset inventory filter when clearing search term @@ -1635,6 +1705,26 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() 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 + // Sync the Only Coalesced Filter Checkbox with the value from the mFilter + // Make sure the Only Coalseced Filter checkbox and the filter are valid before accessing them. + if (mOnlyCoalescedFilterCheck && mFilter) + { + // Set the check value to the value of the UI to the Only Coalesced Objects of the mFilter + mOnlyCoalescedFilterCheck->set(mFilter->getFilterCoalescedObjects()); + } + // Sync the Show Links Filter combo box with the value from the mFilter + // Make sure the Show Links Filter combo box and filter are both valid + if (mShowLinksFilterCombo && mFilter) + { + // Set the combo box value to the value of the FitlerLinks of the mFilter + // In the UI, the choices match the same values as the filter values + // 0 - Show Links, 2 Show Links Only, 1 = Hide Links + // So we convert from the filters from U64 to LLSD (integer) as the SelectByValue takes a LLSD object as an input + mShowLinksFilterCombo->selectByValue(LLSD(mFilter->getFilterLinks())); + } + // [FIRE-35042] } void LLFloaterInventoryFinder::draw() @@ -1855,6 +1945,30 @@ void LLFloaterInventoryFinder::onPermissionsChanged() } // +// [FIRE-35042] Inventory - Only Coalesced Filter - More accessible +// Callback method used to update the mFilter's Only Coalesced filter and syncs with the main inventory filter +void LLFloaterInventoryFinder::onOnlyCoalescedFilterCommit() +{ + // This will sync the Filter panels value with the value of the mFilter object + if (mOnlyCoalescedFilterCheck && mFilter) + { + // Set the mFilter's Filter Coalesced Objects value to the Only Coalesced Filter Checkbox value + mFilter->setFilterCoalescedObjects(mOnlyCoalescedFilterCheck->getValue()); + } +} +// Callback method used to update the mFilter's Show Links filter and syncs with the main inventory filter +void LLFloaterInventoryFinder::onShowLinksFilterCommit() +{ + // This will sync the Show Links combo box with the value of the main inventory filter + if (mShowLinksFilterCombo) + { + // Set the mFilter's Filter Links value to the selected value of the Show Links Filter Combo. + // The values match up to the bit values that are used by the filter (0 = Show Links, 1 = Show Links Only, 2 = Hide Links) + mFilter->setFilterLinks((U64)mShowLinksFilterCombo->getSelectedValue().asInteger()); + } +} +// [FIRE-35042] + bool LLFloaterInventoryFinder::getCheckShowEmpty() { return getChild("check_show_empty")->getValue(); @@ -2741,6 +2855,14 @@ void LLPanelMainInventory::onCoalescedObjectsToggled(const LLSD& userdata) { getActivePanel()->setFilterCoalescedObjects(!getActivePanel()->getFilterCoalescedObjects()); } + + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Update the Filter Finder window with the change to the filters, so they can sync + if (getFinder()) + { + getFinder()->updateElementsFromFilter(); + } + // [FIRE-35042] } bool LLPanelMainInventory::isCoalescedObjectsChecked(const LLSD& userdata) @@ -2773,6 +2895,13 @@ void LLPanelMainInventory::onFilterLinksChecked(const LLSD& userdata) { getActivePanel()->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS); } + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Update the Filter Finder window with the change to the filters, so they can sync + if (getFinder()) + { + getFinder()->updateElementsFromFilter(); + } + // [FIRE-35042] } bool LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata) diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index 91e08e485f..1589909b79 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -189,6 +189,12 @@ protected: bool isSortByChecked(const LLSD& userdata); // Sort By menu handlers + // [FIRE-35042] Inventory - Only Coalesced Filter - More accessible + // Callback method for the new Show Filter button on the bottom button panel of the main inventory. + // Stays highlighted if any filter is enabled. + bool isAnyFilterChecked(const LLSD& userdata); + // [FIRE-35042] + void saveTexture(const LLSD& userdata); bool isSaveTextureEnabled(const LLSD& userdata); void updateItemcountText(); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c5eb17e125..ef7bf02882 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 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; + 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 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 LLHUDText object, but a child does. + else + { + if (parent) + { + parent->setTextIsHighlighted(true); + } + } + // [FIRE-35019] return true; } 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(); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 9b28e39185..38b3c5d31e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6141,6 +6141,36 @@ void LLViewerObject::updateText() } } +// [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 LLHUDText 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 LLHUDText 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..75be338067 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 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] virtual void updateDrawable(bool force_damped); // force updates on static objects bool isOwnerInMuteList(LLUUID item_id = LLUUID()); 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/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/ansastorm/xui/en/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml index 63596de5fa..e6dbc0b3d5 100644 --- a/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/en/panel_main_inventory.xml @@ -739,6 +739,8 @@ + + diff --git a/indra/newview/skins/default/textures/bottomtray/coalesced_18.png b/indra/newview/skins/default/textures/bottomtray/coalesced_18.png new file mode 100644 index 0000000000..34f18ed98c Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/coalesced_18.png differ diff --git a/indra/newview/skins/default/textures/bottomtray/show_filters_18.png b/indra/newview/skins/default/textures/bottomtray/show_filters_18.png new file mode 100644 index 0000000000..71bac6ce87 Binary files /dev/null and b/indra/newview/skins/default/textures/bottomtray/show_filters_18.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 2f1b409f96..0230309383 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -844,7 +844,7 @@ with the same filename but different name - + 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 @@ @@ -579,9 +601,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 +695,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"> @@ -810,6 +832,17 @@ width="403"> tool_tip="When you first edit a rotation, reset it to zero. This means your work can save a pose (and not a diff see load/save). A green tick appears next each joint you have zero-ed export." top_pad="5" width="134" /> + @@ -906,12 +939,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"> - + + + seconds + + + + Floating Text Options: + + + + + + Show floating text background: + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 078e26add0..34a8702b61 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -88,19 +88,6 @@ width="60" /> - - - - + Selection Effects (Particle Beam): @@ -1694,7 +1694,7 @@ left="30" height="12" name="floater_opacity" - top_pad="15" + top_pad="10" width="220"> Floating Window Opacity: @@ -1758,7 +1758,7 @@ left="30" height="12" name="console_opacity" - top_pad="15" + top_pad="10" width="220"> Console Opacity: @@ -1798,13 +1798,31 @@ left_pad="10" width="378" /> + + Preferences Search Highlight Color: @@ -1862,7 +1880,7 @@ left="30" height="12" name="notecard_editor_color_label" - top_pad="15" + top_pad="10" width="400"> Notecard Colors: 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 @@ - + + + + + + + + + + + + + @@ -413,6 +418,38 @@ parameter="secondary_inventory" /> + + + + + + + - + diff --git a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml index f6bb61f384..40d9d044f9 100644 --- a/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/vintage/xui/en/panel_main_inventory.xml @@ -787,6 +787,8 @@ + + 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"):