From 656e910db88db8fd8d158c741327f48a88d48adb Mon Sep 17 00:00:00 2001 From: chanayane Date: Tue, 28 Jan 2025 01:24:26 +0100 Subject: [PATCH 1/7] Double click on animation in AO --- indra/newview/ao.cpp | 32 +++++++++++ indra/newview/ao.h | 4 ++ indra/newview/aoengine.cpp | 106 +++++++++++++++++++++++++++++++++++++ indra/newview/aoengine.h | 5 ++ 4 files changed, 147 insertions(+) diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 92c9c813e7..930c33dfef 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -282,6 +282,10 @@ bool FloaterAO::postBuild() mPreviousButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickPrevious, this)); mNextButtonSmall->setCommitCallback(boost::bind(&FloaterAO::onClickNext, this)); +// Double click on animation in AO + mAnimationList->setDoubleClickCallback(boost::bind(&FloaterAO::onDoubleClick, this)); +// + updateSmart(); AOEngine::instance().setReloadCallback(boost::bind(&FloaterAO::updateList, this)); @@ -780,6 +784,34 @@ void FloaterAO::onClickNext() AOEngine::instance().cycle(AOEngine::CycleNext); } +// Double click on animation in AO +void FloaterAO::onDoubleClick() +{ + LLScrollListItem* item = mAnimationList->getFirstSelected(); + if (!item) + { + return; + } + LLUUID* animUUID = (LLUUID*)item->getUserdata(); + if (!animUUID) + { + return; + } + + // activate AO set if necessary + if (AOEngine::instance().getCurrentSet() != mSelectedSet) + { + // sync small set selector with main set selector + mSetSelectorSmall->selectNthItem(mSetSelector->getCurrentIndex()); + + LL_DEBUGS("AOEngine") << "Set activated: " << mSetSelector->getSelectedItemLabel() << LL_ENDL; + AOEngine::instance().selectSet(mSelectedSet); + } + + AOEngine::instance().playAnimation(*animUUID); +} +// + void FloaterAO::onClickMore() { LLRect fullSize = gSavedPerAccountSettings.getRect("floater_rect_animation_overrider_full"); diff --git a/indra/newview/ao.h b/indra/newview/ao.h index 1ef283d9c0..cadde5088c 100644 --- a/indra/newview/ao.h +++ b/indra/newview/ao.h @@ -91,6 +91,10 @@ class FloaterAO void onClickMore(); void onClickLess(); +// Double click on animation in AO + void onDoubleClick(); +// + void onAnimationChanged(const LLUUID& animation); void reloading(bool reload); diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index 62141ef422..ef6550ba0e 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -960,6 +960,112 @@ void AOEngine::cycle(eCycleMode cycleMode) } } +// Double click on animation in AO +void AOEngine::playAnimation(const LLUUID& animation) +{ + if (!mEnabled) + { + return; + } + + if (!mCurrentSet) + { + LL_DEBUGS("AOEngine") << "cycle without set." << LL_ENDL; + return; + } + + // do not cycle if we're sitting and sit-override is off + if (mLastMotion == ANIM_AGENT_SIT && !mCurrentSet->getSitOverride()) + { + return; + } + // do not cycle if we're standing and mouselook stand override is disabled while being in mouselook + else if (mLastMotion == ANIM_AGENT_STAND && mCurrentSet->getMouselookStandDisable() && mInMouselook) + { + return; + } + + AOSet::AOState* state = mCurrentSet->getStateByRemapID(mLastMotion); + if (!state) + { + LL_DEBUGS("AOEngine") << "cycle without state." << LL_ENDL; + return; + } + + if (!state->mAnimations.size()) + { + LL_DEBUGS("AOEngine") << "cycle without animations in state." << LL_ENDL; + return; + } + + LLViewerInventoryItem* item = gInventory.getItem(animation); + AOSet::AOAnimation anim; + anim.mName = item->LLInventoryItem::getName(); + anim.mInventoryUUID = item->getUUID(); + anim.mOriginalUUID = item->getLinkedUUID(); + anim.mAssetUUID = LLUUID::null; + + // if we can find the original animation already right here, save its asset ID, otherwise this will + // be tried again in AOSet::getAnimationForState() and/or AOEngine::cycle() + if (item->getLinkedItem()) + { + anim.mAssetUUID = item->getAssetUUID(); + } + + LLUUID newAnimation = anim.mAssetUUID; + LLUUID oldAnimation = state->mCurrentAnimationID; + + // don't do anything if the animation didn't change + if (newAnimation == oldAnimation) + { + return; + } + + mAnimationChangedSignal(LLUUID::null); + + // Searches for the index of the animation + U32 idx = -1; + for (U32 i = 0; i < state->mAnimations.size(); i++) + { + LLUUID* id = &(state->mAnimations[i].mAssetUUID); + if (*id == newAnimation) + { + idx = i; + break; + } + } + if (idx < 0) + { + idx = 0; + } + + state->mCurrentAnimation = idx; + state->mCurrentAnimationID = newAnimation; + if (newAnimation.notNull()) + { + LL_DEBUGS("AOEngine") << "requesting animation start for motion " << gAnimLibrary.animationName(mLastMotion) << ": " << newAnimation << LL_ENDL; + gAgent.sendAnimationRequest(newAnimation, ANIM_REQUEST_START); + mAnimationChangedSignal(state->mAnimations[state->mCurrentAnimation].mInventoryUUID); + } + else + { + LL_DEBUGS("AOEngine") << "overrider came back with NULL animation for motion " << gAnimLibrary.animationName(mLastMotion) << "." << LL_ENDL; + } + + if (oldAnimation.notNull()) + { + LL_DEBUGS("AOEngine") << "Cycling state " << state->mName << " - stopping animation " << oldAnimation << LL_ENDL; + gAgent.sendAnimationRequest(oldAnimation, ANIM_REQUEST_STOP); + gAgentAvatarp->LLCharacter::stopMotion(oldAnimation); + } +} + +const AOSet* AOEngine::getCurrentSet() const +{ + return mCurrentSet; +} +// + void AOEngine::updateSortOrder(AOSet::AOState* state) { for (U32 index = 0; index < state->mAnimations.size(); ++index) diff --git a/indra/newview/aoengine.h b/indra/newview/aoengine.h index a381d00dd3..184cb6c25d 100644 --- a/indra/newview/aoengine.h +++ b/indra/newview/aoengine.h @@ -123,6 +123,11 @@ class AOEngine void cycleTimeout(const AOSet* set); void cycle(eCycleMode cycleMode); +// Double click on animation in AO + void playAnimation(const LLUUID& animation); + const AOSet* getCurrentSet() const; +// + void inMouselook(bool mouselook); void selectSet(AOSet* set); AOSet* selectSetByName(const std::string& name); From e40f670cb41ef23eeb318cfa1e53fcd148fb84cd Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Tue, 28 Jan 2025 10:52:37 +0900 Subject: [PATCH 2/7] enable ime on xwayland --- indra/newview/linux_tools/wrapper.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index eb3f7c3109..39e5ea7af3 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -103,6 +103,10 @@ echo "LIBGL_DRIVERS_PATH is ${LIBGL_DRIVERS_PATH}" if [ "$GTK_IM_MODULE" = "scim" ]; then export GTK_IM_MODULE=xim fi +if [ "$XMODIFIERS" = "" ]; then + ## IME is valid only for fcitx, not when using ibus + export XMODIFIERS="@im=fcitx" +fi ## - Automatically work around the ATI mouse cursor crash bug: ## (this workaround is disabled as most fglrx users do not see the bug) From f3ca2ccc7e235e3c7e1c9e73887343564ba7b17c Mon Sep 17 00:00:00 2001 From: minerjr Date: Tue, 28 Jan 2025 07:47:18 -0400 Subject: [PATCH 3/7] [FIRE-35102] - Hover text appearing through walls in Beta 7.1.12.7737 Issue was caused by miss understanding of how LLGLDepthTest works. While it is in scope it applies, but if you have it wrapped in an if statement, it only applies within the if statement. Change: LLHUDText::render() Changed to have inline ? statement instead of if/else block. --- indra/newview/llhudtext.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index ddd3893bc4..fa1f800952 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -129,16 +129,12 @@ void LLHUDText::render() // 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] + // [FIRE-35102] - Hover text appearing through walls in Beta 7.1.12.7737 + // So it turns out when the LLGLDepthTest object goes out of scope, it reverts back + // to the previous state. So by having the LLGLDepthTest in the if statements, they were + // never applied. + LLGLDepthTest gls_depth(mbUseHoverHighlight && mbIsHighlighted ? GL_FALSE : GL_TRUE, GL_FALSE); + // [FIRE-35019] [FIRE-35102] //LLGLDisable gls_stencil(GL_STENCIL_TEST); renderText(); } From 4a77953539dd6820ba61e710325359f225cc2dd2 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 29 Jan 2025 00:31:50 +0000 Subject: [PATCH 4/7] Add a simple retry loop to overcome slow Apple infrastructure --- .../installers/darwin/apple-notarize.sh | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/indra/newview/installers/darwin/apple-notarize.sh b/indra/newview/installers/darwin/apple-notarize.sh index c8ff10df5c..edaeb95896 100755 --- a/indra/newview/installers/darwin/apple-notarize.sh +++ b/indra/newview/installers/darwin/apple-notarize.sh @@ -28,11 +28,35 @@ if [[ -f "$CONFIG_FILE" ]]; then echo "Notarized with id: [$match]" else echo "No match found" + exit 1 fi - # if [[ ! $match -eq 0 ]]; then - echo "Running Stapler" - xcrun stapler staple "$app_file" + # --- WAIT / RETRY LOGIC FOR STAPLER --- + # Try stapler up to 5 times with a 5-second delay in between attempts + max_attempts=5 + sleep_seconds=5 + attempt=1 + + while [[ $attempt -le $max_attempts ]]; do + echo "Running stapler (attempt $attempt of $max_attempts)..." + xcrun stapler staple "$app_file" + ret=$? + + if [[ $ret -eq 0 ]]; then + echo "Stapling succeeded on attempt $attempt" + break + else + if [[ $attempt -lt $max_attempts ]]; then + echo "Stapling failed (Error $ret). Waiting $sleep_seconds seconds before retry..." + sleep $sleep_seconds + else + echo "Stapling failed after $max_attempts attempts, giving up." + exit 65 + fi + fi + attempt=$((attempt + 1)) + done + # Delete the zip file to stop it being packed in the dmg rm -f "$zip_file" if [[ $? -eq 0 ]]; then From c5521b404a909bccbbad511b5f7db71a3b294404 Mon Sep 17 00:00:00 2001 From: chanayane Date: Wed, 29 Jan 2025 22:00:45 +0100 Subject: [PATCH 5/7] aoengine.cpp: fix useless use of pointer --- indra/newview/aoengine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index ef6550ba0e..f30383d483 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -1027,8 +1027,7 @@ void AOEngine::playAnimation(const LLUUID& animation) U32 idx = -1; for (U32 i = 0; i < state->mAnimations.size(); i++) { - LLUUID* id = &(state->mAnimations[i].mAssetUUID); - if (*id == newAnimation) + if (state->mAnimations[i].mAssetUUID == newAnimation) { idx = i; break; From 664f8178ac6fb627497d9f4a2becea4b63a47ec5 Mon Sep 17 00:00:00 2001 From: chanayane Date: Thu, 30 Jan 2025 00:08:03 +0100 Subject: [PATCH 6/7] fix crash when double-clicking animation in a different state than active state --- indra/newview/ao.cpp | 6 ++++++ indra/newview/aoengine.cpp | 4 ++++ indra/newview/aoengine.h | 1 + 3 files changed, 11 insertions(+) diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 930c33dfef..f0fb99875f 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -798,6 +798,12 @@ void FloaterAO::onDoubleClick() return; } + // do nothing if animation is for a different state than the active state + if (mSelectedState != AOEngine::instance().getCurrentState()) + { + return; + } + // activate AO set if necessary if (AOEngine::instance().getCurrentSet() != mSelectedSet) { diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index f30383d483..33f91d556a 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -1063,6 +1063,10 @@ const AOSet* AOEngine::getCurrentSet() const { return mCurrentSet; } +const AOSet::AOState* AOEngine::getCurrentState() const +{ + return mCurrentSet->getStateByRemapID(mLastMotion); +} // void AOEngine::updateSortOrder(AOSet::AOState* state) diff --git a/indra/newview/aoengine.h b/indra/newview/aoengine.h index 184cb6c25d..438fe217b9 100644 --- a/indra/newview/aoengine.h +++ b/indra/newview/aoengine.h @@ -126,6 +126,7 @@ class AOEngine // Double click on animation in AO void playAnimation(const LLUUID& animation); const AOSet* getCurrentSet() const; + const AOSet::AOState* getCurrentState() const; // void inMouselook(bool mouselook); From ed6409fa7e5b7545e2bf265f1ac47318f4799c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ol=C3=ADvia?= Date: Thu, 30 Jan 2025 14:22:30 -0300 Subject: [PATCH 7/7] pt --- indra/newview/skins/ansastorm/xui/pt | 1 + 1 file changed, 1 insertion(+) create mode 100644 indra/newview/skins/ansastorm/xui/pt diff --git a/indra/newview/skins/ansastorm/xui/pt b/indra/newview/skins/ansastorm/xui/pt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/indra/newview/skins/ansastorm/xui/pt @@ -0,0 +1 @@ +