From 58338af8c269d84576e5216c1d508ca6c2d49f2f Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Sun, 10 Dec 2023 02:14:09 +0100 Subject: [PATCH] FIRE-33492 - FS AO does not allow to delete single animations --- indra/newview/aoengine.cpp | 8 +++++--- indra/newview/aoset.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index f128cabe7d..bdecf3e7b6 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -918,14 +918,14 @@ void AOEngine::cycle(eCycleMode cycleMode) { LL_DEBUGS("AOEngine") << "Asset UUID for cycled animation " << anim.mName << " not yet known, try to find it." << LL_ENDL; - if(LLViewerInventoryItem* item = gInventory.getItem(anim.mInventoryUUID) ; item) + if(LLViewerInventoryItem* item = gInventory.getItem(anim.mOriginalUUID) ; item) { LL_DEBUGS("AOEngine") << "Found asset UUID for cycled animation: " << item->getAssetUUID() << " - Updating AOAnimation.mAssetUUID" << LL_ENDL; anim.mAssetUUID = item->getAssetUUID(); } else { - LL_DEBUGS("AOEngine") << "Inventory UUID " << anim.mInventoryUUID << " for cycled animation " << anim.mName << " still returns no asset." << LL_ENDL; + LL_DEBUGS("AOEngine") << "Inventory UUID " << anim.mOriginalUUID << " for cycled animation " << anim.mName << " still returns no asset." << LL_ENDL; } } @@ -1042,6 +1042,7 @@ void AOEngine::addAnimation(const AOSet* set, AOSet::AOState* state, const LLInv AOSet::AOAnimation anim; anim.mAssetUUID = item->getAssetUUID(); anim.mInventoryUUID = item->getUUID(); + anim.mOriginalUUID = item->getLinkedUUID(); anim.mName = item->getName(); anim.mSortOrder = state->mAnimations.size() + 1; state->mAnimations.emplace_back(std::move(anim)); @@ -1327,7 +1328,8 @@ void AOEngine::reloadStateAnimations(AOSet::AOState* state) AOSet::AOAnimation anim; anim.mName = item->LLInventoryItem::getName(); - anim.mInventoryUUID = item->getLinkedUUID(); + anim.mInventoryUUID = item->getUUID(); + anim.mOriginalUUID = item->getLinkedUUID(); anim.mAssetUUID = LLUUID::null; diff --git a/indra/newview/aoset.h b/indra/newview/aoset.h index e40890cf55..878b36cedd 100644 --- a/indra/newview/aoset.h +++ b/indra/newview/aoset.h @@ -73,6 +73,7 @@ class AOSet std::string mName; LLUUID mAssetUUID; LLUUID mInventoryUUID; + LLUUID mOriginalUUID; S32 mSortOrder; };