diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 44f32c1c5d..4785273b78 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,7 +5,7 @@ on: pull_request: push: branches: ["main", "release/*", "project/*"] - tags: ["Second_Life_*"] + tags: ["Second_Life*"] jobs: build: @@ -176,16 +176,22 @@ jobs: # seen before, so numerous tests don't know about it. [[ "$arch" == "MINGW6" ]] && arch=CYGWIN export AUTOBUILD="$(which autobuild)" - # Build with a tag like "Second_Life_Project_Shiny#abcdef0" to get a - # viewer channel "Second Life Project Shiny" (ignoring "#hash", - # needed to disambiguate tags). - if [[ "$GITHUB_REF_TYPE" == "tag" && "${GITHUB_REF_NAME:0:12}" == "Second_Life_" ]] - then viewer_channel="${GITHUB_REF_NAME%#*}" - export viewer_channel="${viewer_channel//_/ }" - else export viewer_channel="Second Life Test" + + # determine the viewer channel from the branch name + branch=$AUTOBUILD_VCS_BRANCH + IFS='/' read -ra ba <<< $branch + prefix=${ba[0]} + if [ "$prefix" == "project" ]; then + IFS='_' read -ra prj <<< "${ba[1]}" + # uppercase first letter of each word + export viewer_channel="Second Life Project ${prj[*]^}" + elif [[ "$prefix" == "release" || "$prefix" == "main" ]]; + then + export viewer_channel="Second Life Release" + else + export viewer_channel="Second Life Test" fi echo "viewer_channel=$viewer_channel" >> "$GITHUB_OUTPUT" - # On windows we need to point the build to the correct python # as neither CMake's FindPython nor our custom Python.cmake module # will resolve the correct interpreter location. @@ -354,7 +360,8 @@ jobs: release: needs: [build, sign-and-package-windows, sign-and-package-mac] runs-on: ubuntu-latest - if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') + # Build with a tag like "Second_Life#abcdef0" to generate a release page (used for builds we are planning to deploy). + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life') steps: - uses: actions/download-artifact@v4 with: diff --git a/build.sh b/build.sh index 05f6e038e3..b40a86e9e5 100755 --- a/build.sh +++ b/build.sh @@ -178,6 +178,7 @@ pre_build() "$autobuild" configure --quiet -c $variant \ ${eval_autobuild_configure_parameters:---} \ + -DLL_TESTS:BOOL=ON \ -DPACKAGE:BOOL=ON \ -DHAVOK:BOOL="$HAVOK" \ -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 0a97b739b0..ffcd7d257f 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -98,7 +98,7 @@ namespace tut done = res; *done = false; } - virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux) + virtual void completed(bool success, LLImageRaw* raw, LLImageRaw* aux, U32) { *done = true; } diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index d14ae6970b..93fc26dbd7 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -122,13 +122,20 @@ public: F32 mRoughnessFactor = 1.f; F32 mAlphaCutoff = 0.5f; - bool mDoubleSided = false; AlphaMode mAlphaMode = ALPHA_MODE_OPAQUE; + bool mDoubleSided = false; + // override specific flags for state that can't use off-by-epsilon or UUID hack bool mOverrideDoubleSided = false; bool mOverrideAlphaMode = false; + // These fields are local to viewer and are a part of local bitmap support + typedef std::map local_tex_map_t; + local_tex_map_t mTrackingIdToLocalTexture; + +public: + // *TODO: If/when we implement additional GLTF extensions, they may not be // compatible with our GLTF terrain implementation. We may want to disallow // materials with some features from being set on terrain, if their @@ -240,10 +247,6 @@ public: virtual bool replaceLocalTexture(const LLUUID& tracking_id, const LLUUID &old_id, const LLUUID& new_id); virtual void updateTextureTracking(); - // These fields are local to viewer and are a part of local bitmap support - typedef std::map local_tex_map_t; - local_tex_map_t mTrackingIdToLocalTexture; - protected: static LLVector2 vec2FromJson(const std::map& object, const char* key, const LLVector2& default_value); static F32 floatFromJson(const std::map& object, const char* key, const F32 default_value); diff --git a/indra/llprimitive/tests/llgltfmaterial_test.cpp b/indra/llprimitive/tests/llgltfmaterial_test.cpp index 88b6fae3a7..b56c9ab4f5 100644 --- a/indra/llprimitive/tests/llgltfmaterial_test.cpp +++ b/indra/llprimitive/tests/llgltfmaterial_test.cpp @@ -143,7 +143,7 @@ namespace tut #if LL_WINDOWS // If any fields are added/changed, these tests should be updated (consider also updating ASSET_VERSION in LLGLTFMaterial) // This test result will vary between compilers, so only test a single platform - ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 216); + ensure_equals("fields supported for GLTF (sizeof check)", sizeof(LLGLTFMaterial), 224); #endif #endif ensure_equals("LLGLTFMaterial texture info count", (U32)LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT, 4); diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index 16a73b1eba..4811f96862 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -1149,7 +1149,6 @@ struct FSPanelFaceSetTEFunctor : public LLSelectedTEFunctor bool align_planar = mPanel->mCheckPlanarAlign->get(); - llassert(comboTexGen); llassert(object); if (ctrlTexScaleS) diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index f11026d595..383c838a02 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -957,122 +957,68 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht if (callback && !callback.empty()) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - uuid_list_t ids; + bool needs_callback = true; + LLUUID id(LLUUID::null); + switch (type) { - case COPYLIBRARYCATEGORY: - case FETCHCATEGORYCATEGORIES: - case FETCHCATEGORYCHILDREN: - case FETCHCATEGORYSUBSET: - case FETCHCATEGORYLINKS: - case FETCHCOF: - if (result.has("category_id")) + case COPYLIBRARYCATEGORY: + case FETCHCATEGORYCATEGORIES: + case FETCHCATEGORYCHILDREN: + case FETCHCATEGORYSUBSET: + case FETCHCATEGORYLINKS: + case FETCHCOF: + if (result.has("category_id")) + { + id = result["category_id"]; + } + break; + case FETCHITEM: + if (result.has("item_id")) + { + // Error message might contain an item_id!!! + id = result["item_id"]; + } + if (result.has("linked_id")) + { + id = result["linked_id"]; + } + break; + case CREATEINVENTORY: + // CREATEINVENTORY can have multiple callbacks + if (result.has("_created_categories")) + { + LLSD& cats = result["_created_categories"]; + LLSD::array_const_iterator cat_iter; + for (cat_iter = cats.beginArray(); cat_iter != cats.endArray(); ++cat_iter) { - ids.emplace(result["category_id"]); + LLUUID cat_id = *cat_iter; + callback(cat_id); + needs_callback = false; } - break; - case FETCHITEM: - if (result.has("linked_id")) + } + if (result.has("_created_items")) + { + LLSD& items = result["_created_items"]; + LLSD::array_const_iterator item_iter; + for (item_iter = items.beginArray(); item_iter != items.endArray(); ++item_iter) { - ids.emplace(result["linked_id"]); + LLUUID item_id = *item_iter; + callback(item_id); + needs_callback = false; } - else if (result.has("item_id")) - { - // Error message might contain an item_id!!! - ids.emplace(result["item_id"]); - } - break; - case COPYINVENTORY: - case CREATEINVENTORY: - { - AISUpdate::parseUUIDArray(result, "_created_categories", ids); - AISUpdate::parseUUIDArray(result, "_created_items", ids); - } - break; - case UPDATECATEGORY: - { - AISUpdate::parseUUIDArray(result, "_updated_categories", ids); - } - break; - default: - break; + } + break; + default: + break; } - // Call callback at least once regardless of failure. - if (ids.empty()) - { - ids.emplace(LLUUID::null); - } - - for (const auto& id : ids) + if (needs_callback) { + // Call callback at least once regardless of failure. + // UPDATEITEM doesn't expect an id callback(id); } - -// [/SL:KB] - //bool needs_callback = true; - //LLUUID id(LLUUID::null); - - //switch (type) - //{ - //case COPYLIBRARYCATEGORY: - //case FETCHCATEGORYCATEGORIES: - //case FETCHCATEGORYCHILDREN: - //case FETCHCATEGORYSUBSET: - //case FETCHCATEGORYLINKS: - //case FETCHCOF: - // if (result.has("category_id")) - // { - // id = result["category_id"]; - // } - // break; - //case FETCHITEM: - // if (result.has("item_id")) - // { - // // Error message might contain an item_id!!! - // id = result["item_id"]; - // } - // if (result.has("linked_id")) - // { - // id = result["linked_id"]; - // } - // break; - //case CREATEINVENTORY: - // // CREATEINVENTORY can have multiple callbacks - // if (result.has("_created_categories")) - // { - // LLSD& cats = result["_created_categories"]; - // LLSD::array_const_iterator cat_iter; - // for (cat_iter = cats.beginArray(); cat_iter != cats.endArray(); ++cat_iter) - // { - // LLUUID cat_id = *cat_iter; - // callback(cat_id); - // needs_callback = false; - // } - // } - // if (result.has("_created_items")) - // { - // LLSD& items = result["_created_items"]; - // LLSD::array_const_iterator item_iter; - // for (item_iter = items.beginArray(); item_iter != items.endArray(); ++item_iter) - // { - // LLUUID item_id = *item_iter; - // callback(item_id); - // needs_callback = false; - // } - // } - // break; - //default: - // break; - //} - - //if (needs_callback) - //{ - // // Call callback at least once regardless of failure. - // // UPDATEITEM doesn't expect an id - // callback(id); - //} } } diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index d15a66ff4d..f254f21e42 100644 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -114,10 +114,7 @@ public: void parseUpdate(const LLSD& update); void parseMeta(const LLSD& update); void parseContent(const LLSD& update); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - static void parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids); -// [/SL:KB] -// void parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids); + void parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids); void parseLink(const LLSD& link_map, S32 depth); void parseItem(const LLSD& link_map); void parseCategory(const LLSD& link_map, S32 depth); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 54ef81b21e..1df71b1d39 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -714,20 +714,16 @@ public: bool pollMissingWearables(); bool isMissingCompleted(); void recoverMissingWearable(LLWearableType::EType type); -// void clearCOFLinksForMissingWearables(); + void clearCOFLinksForMissingWearables(); void onWearableAssetFetch(LLViewerWearable *wearable); void onAllComplete(); -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - bool pollStopped(); -// [/SL:KB] - typedef std::list found_list_t; found_list_t& getFoundList(); void eraseTypeToLink(LLWearableType::EType type); void eraseTypeToRecover(LLWearableType::EType type); -// void setObjItems(const LLInventoryModel::item_array_t& items); + void setObjItems(const LLInventoryModel::item_array_t& items); void setGestItems(const LLInventoryModel::item_array_t& items); bool isMostRecent(); void handleLateArrivals(); @@ -737,7 +733,7 @@ public: private: found_list_t mFoundList; -// LLInventoryModel::item_array_t mObjItems; + LLInventoryModel::item_array_t mObjItems; LLInventoryModel::item_array_t mGestItems; typedef std::set type_set_t; type_set_t mTypesToRecover; @@ -814,11 +810,10 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type) mTypesToRecover.erase(type); } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.1 -//void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) -//{ -// mObjItems = items; -//} +void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items) +{ + mObjItems = items; +} void LLWearableHoldingPattern::setGestItems(const LLInventoryModel::item_array_t& items) { @@ -925,56 +920,55 @@ void LLWearableHoldingPattern::onAllComplete() if (isAgentAvatarValid()) { -// LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; -// LLAgentWearables::llvo_vec_t objects_to_remove; -// LLAgentWearables::llvo_vec_t objects_to_retain; -// LLInventoryModel::item_array_t items_to_add; -// -// LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems, -// objects_to_remove, -// objects_to_retain, -// items_to_add); -// -// LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() -// << " attachments" << LL_ENDL; -// -// // Here we remove the attachment pos overrides for *all* -// // attachments, even those that are not being removed. This is -// // needed to get joint positions all slammed down to their -// // pre-attachment states. -// gAgentAvatarp->clearAttachmentOverrides(); -// -// if (objects_to_remove.size() || items_to_add.size()) -// { -// LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size() -// << " and add " << items_to_add.size() << " items" << LL_ENDL; -// } -// -// // Take off the attachments that will no longer be in the outfit. -// LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); - + LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.size() << " attachments" << LL_ENDL; + LLAgentWearables::llvo_vec_t objects_to_remove; + LLAgentWearables::llvo_vec_t objects_to_retain; + LLInventoryModel::item_array_t items_to_add; + + LLAgentWearables::findAttachmentsAddRemoveInfo(mObjItems, + objects_to_remove, + objects_to_retain, + items_to_add); + + LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() + << " attachments" << LL_ENDL; + + // Here we remove the attachment pos overrides for *all* + // attachments, even those that are not being removed. This is + // needed to get joint positions all slammed down to their + // pre-attachment states. + gAgentAvatarp->clearAttachmentOverrides(); + + if (objects_to_remove.size() || items_to_add.size()) + { + LL_DEBUGS("Avatar") << "ATT will remove " << objects_to_remove.size() + << " and add " << items_to_add.size() << " items" << LL_ENDL; + } + + // Take off the attachments that will no longer be in the outfit. + LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); + // Update wearables. LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " updating agent wearables with " << mResolved << " wearable items " << LL_ENDL; LLAppearanceMgr::instance().updateAgentWearables(this); -// Merge; Changed in FS but not tagged with any FS: comment explaining by whom and the purpose -// // Restore attachment pos overrides for the attachments that -// // are remaining in the outfit. -// for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); -// it != objects_to_retain.end(); -// ++it) -// { -// LLViewerObject *objectp = *it; -// if (!objectp->isAnimatedObject()) -// { -// gAgentAvatarp->addAttachmentOverridesForObject(objectp); -// } -// } -// -// // Add new attachments to match those requested. -// LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; -// LLAgentWearables::userAttachMultipleAttachments(items_to_add); + // Restore attachment pos overrides for the attachments that + // are remaining in the outfit. + for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); + it != objects_to_retain.end(); + ++it) + { + LLViewerObject *objectp = *it; + if (!objectp->isAnimatedObject()) + { + gAgentAvatarp->addAttachmentOverridesForObject(objectp); + } + } + + // Add new attachments to match those requested. + LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; + LLAgentWearables::userAttachMultipleAttachments(items_to_add); } if (isFetchCompleted() && isMissingCompleted()) @@ -1012,12 +1006,6 @@ bool LLWearableHoldingPattern::pollFetchCompletion() { // runway skip here? LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); - return true; -// [/SL:KB] } bool completed = isFetchCompleted(); @@ -1088,11 +1076,6 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView { // runway skip here? LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - return; -// [/SL:KB] } LL_DEBUGS("Avatar") << self_av_string() << "Recovered item for type " << type << LL_ENDL; @@ -1143,32 +1126,19 @@ bool LLWearableHoldingPattern::isMissingCompleted() return mTypesToLink.size()==0 && mTypesToRecover.size()==0; } -//void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() -//{ -// for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) -// { -// LLFoundData &data = *it; -// if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) -// { -// // Wearable link that was never resolved; remove links to it from COF -// LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " removing link for unresolved item " << data.mItemID.asString() << LL_ENDL; -// LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); -// } -// } -//} - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) -bool LLWearableHoldingPattern::pollStopped() +void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() { - // We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash - if ( (isFetchCompleted()) && (isMissingCompleted()) ) + for (found_list_t::iterator it = getFoundList().begin(); it != getFoundList().end(); ++it) { - delete this; - return true; + LLFoundData &data = *it; + if ((data.mWearableType < LLWearableType::WT_COUNT) && (!data.mWearable)) + { + // Wearable link that was never resolved; remove links to it from COF + LL_INFOS("Avatar") << self_av_string() << "HP " << index() << " removing link for unresolved item " << data.mItemID.asString() << LL_ENDL; + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID); + } } - return false; } -// [/SL:KB] bool LLWearableHoldingPattern::pollMissingWearables() { @@ -1176,12 +1146,6 @@ bool LLWearableHoldingPattern::pollMissingWearables() { // runway skip here? LL_WARNS() << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << LL_ENDL; - -// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0) - // If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves - doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this)); - return true; -// [/SL:KB] } bool timed_out = isTimedOut(); @@ -2889,72 +2853,6 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, << " descendent_count " << cof->getDescendentCount() << " viewer desc count " << cof->getViewerDescendentCount() << LL_ENDL; } - -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 - // Update attachments to match those requested. - if (isAgentAvatarValid()) - { - // Include attachments which should be in COF but don't have their link created yet - std::set pendingAttachments; - if (LLAttachmentsMgr::instance().getPendingAttachments(pendingAttachments)) - { - for (const LLUUID& idAttachItem : pendingAttachments) - { - if ( (!gAgentAvatarp->isWearingAttachment(idAttachItem)) || (isLinkedInCOF(idAttachItem)) ) - { - LLAttachmentsMgr::instance().clearPendingAttachmentLink(idAttachItem); - continue; - } - - LLViewerInventoryItem* pAttachItem = gInventory.getItem(idAttachItem); - if (pAttachItem) - { - obj_items.push_back(pAttachItem); - } - } - } - - // (Start of LL code from LLWearableHoldingPattern::onAllComplete()) - LL_DEBUGS("Avatar") << self_av_string() << "Updating " << obj_items.size() << " attachments" << LL_ENDL; - - LLAgentWearables::llvo_vec_t objects_to_remove; - LLAgentWearables::llvo_vec_t objects_to_retain; - LLInventoryModel::item_array_t items_to_add; - LLAgentWearables::findAttachmentsAddRemoveInfo(obj_items, objects_to_remove, objects_to_retain, items_to_add); - - // Here we remove the attachment pos overrides for *all* - // attachments, even those that are not being removed. This is - // needed to get joint positions all slammed down to their - // pre-attachment states. - gAgentAvatarp->clearAttachmentOverrides(); - // (End of LL code) - - // Take off the attachments that will no longer be in the outfit. - // (but don't remove attachments until avatar is fully loaded - should reduce random attaching/detaching/reattaching at log-on) - if (gAgentAvatarp->isFullyLoaded()) - { - LL_DEBUGS("Avatar") << self_av_string() << "Removing " << objects_to_remove.size() << " attachments" << LL_ENDL; - LLAgentWearables::userRemoveMultipleAttachments(objects_to_remove); - } - - // (Start of LL code from LLWearableHoldingPattern::onAllComplete()) - // Restore attachment pos overrides for the attachments that are remaining in the outfit. - for (LLAgentWearables::llvo_vec_t::iterator it = objects_to_retain.begin(); it != objects_to_retain.end(); ++it) - { - LLViewerObject *objectp = *it; - if (!objectp->isAnimatedObject()) - { - gAgentAvatarp->addAttachmentOverridesForObject(objectp); - } - } - - // Add new attachments to match those requested. - LL_DEBUGS("Avatar") << self_av_string() << "Adding " << items_to_add.size() << " attachments" << LL_ENDL; - LLAgentWearables::userAttachMultipleAttachments(items_to_add); - // (End of LL code) - } -// [/SL:KB] - if(!wear_items.size()) { LLNotificationsUtil::add("CouldNotPutOnOutfit"); @@ -2969,7 +2867,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions, LLTimer hp_block_timer; LLWearableHoldingPattern* holder = new LLWearableHoldingPattern; -// holder->setObjItems(obj_items); + holder->setObjItems(obj_items); holder->setGestItems(gest_items); // Note: can't do normal iteration, because if all the @@ -4692,9 +4590,6 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, LLP if (!cb) cb = new LLUpdateAppearanceOnDestroy(); removeCOFItemLinks(linked_item_id, cb, immediate_delete); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - LLAttachmentsMgr::instance().clearPendingAttachmentLink(linked_item_id); -// [/SL:KB] addDoomedTempAttachment(linked_item_id); } // [/RLVa:KB] diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index b4ece6a3cb..3f676d9d15 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -153,9 +153,6 @@ public: // Attachment link management void unregisterAttachment(const LLUUID& item_id); void registerAttachment(const LLUUID& item_id); -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - bool getAttachmentInvLinkEnable() { return mAttachmentInvLinkEnabled; } -// [/SL:KB] void setAttachmentInvLinkEnable(bool val); // Add COF link to individual item. diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 9777a91dcf..aa5824c5bb 100644 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -46,31 +46,10 @@ const F32 MAX_ATTACHMENT_REQUEST_LIFETIME = 30.0F; const F32 MIN_RETRY_REQUEST_TIME = 5.0F; const F32 MAX_BAD_COF_TIME = 30.0F; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 -class LLRegisterAttachmentCallback : public LLRequestServerAppearanceUpdateOnDestroy -{ -public: - LLRegisterAttachmentCallback() - : LLRequestServerAppearanceUpdateOnDestroy() - { - } - - ~LLRegisterAttachmentCallback() override - { - } - - void fire(const LLUUID& idItem) override - { - LLAttachmentsMgr::instance().onRegisterAttachmentComplete(idItem); - LLRequestServerAppearanceUpdateOnDestroy::fire(idItem); - } -}; -// [/SL:KB] - LLAttachmentsMgr::LLAttachmentsMgr(): mAttachmentRequests("attach",MIN_RETRY_REQUEST_TIME), - mDetachRequests("detach",MIN_RETRY_REQUEST_TIME) -// , mQuestionableCOFLinks("badcof",MAX_BAD_COF_TIME) + mDetachRequests("detach",MIN_RETRY_REQUEST_TIME), + mQuestionableCOFLinks("badcof",MAX_BAD_COF_TIME) { } @@ -130,11 +109,6 @@ void LLAttachmentsMgr::addAttachmentRequest(const LLUUID& item_id, void LLAttachmentsMgr::onAttachmentRequested(const LLUUID& item_id) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - if (item_id.isNull()) - return; -// [/SL:KB] - LLViewerInventoryItem *item = gInventory.getItem(item_id); LL_DEBUGS("Avatar") << "ATT attachment was requested " << (item ? item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; @@ -168,7 +142,7 @@ void LLAttachmentsMgr::onIdle() expireOldDetachRequests(); - //checkInvalidCOFLinks(); + checkInvalidCOFLinks(); spamStatusInfo(); } @@ -280,13 +254,6 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments() { if (mRecentlyArrivedAttachments.size()) { - // [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - if (!LLAppearanceMgr::instance().getAttachmentInvLinkEnable()) - { - return; - } -// [/SL:KB] - // One or more attachments have arrived but have not yet been // processed for COF links if (mAttachmentRequests.empty()) @@ -333,68 +300,17 @@ void LLAttachmentsMgr::linkRecentlyArrivedAttachments() } if (ids_to_link.size()) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 - LLPointer cb = NULL; - for (uuid_vec_t::const_iterator itAttach = ids_to_link.begin(); itAttach != ids_to_link.end(); ++itAttach) - { - const LLUUID& idAttach = *itAttach; - if (std::find(mPendingAttachLinks.begin(), mPendingAttachLinks.end(), idAttach) == mPendingAttachLinks.end()) - { - if (cb.isNull()) - { - cb = new LLRegisterAttachmentCallback(); - } - LLAppearanceMgr::instance().addCOFItemLink(idAttach, cb); - mPendingAttachLinks.insert(idAttach); - } - } -// [/SL:KB] -// LLPointer cb = new LLRequestServerAppearanceUpdateOnDestroy(); -// for (uuid_vec_t::const_iterator uuid_it = ids_to_link.begin(); -// uuid_it != ids_to_link.end(); ++uuid_it) -// { -// LLAppearanceMgr::instance().addCOFItemLink(*uuid_it, cb); -// } + LLPointer cb = new LLRequestServerAppearanceUpdateOnDestroy(); + for (uuid_vec_t::const_iterator uuid_it = ids_to_link.begin(); + uuid_it != ids_to_link.end(); ++uuid_it) + { + LLAppearanceMgr::instance().addCOFItemLink(*uuid_it, cb); + } } mRecentlyArrivedAttachments.clear(); } } -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 -bool LLAttachmentsMgr::getPendingAttachments(std::set& ids) const -{ - ids.clear(); - - // Returns the union of the LL maintained list of attachments that are waiting for link creation and our maintained list of attachments that are pending link creation - set_union(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end(), mPendingAttachLinks.begin(), mPendingAttachLinks.end(), std::inserter(ids, ids.begin())); - - return !ids.empty(); -} - -void LLAttachmentsMgr::clearPendingAttachmentLink(const LLUUID& idItem) -{ - mPendingAttachLinks.erase(idItem); -} - -void LLAttachmentsMgr::onRegisterAttachmentComplete(const LLUUID& idAttachLink) -{ - const LLViewerInventoryItem* pAttachLink = gInventory.getItem(idAttachLink); - if (!pAttachLink) - return; - - const LLUUID& idAttachBase = pAttachLink->getLinkedUUID(); - - // Remove the attachment from the pending list - clearPendingAttachmentLink(idAttachBase); - - // It may have been detached already in which case we should remove the COF link - if ( (isAgentAvatarValid()) && (!gAgentAvatarp->isWearingAttachment(idAttachBase)) ) - { - LLAppearanceMgr::instance().removeCOFItemLinks(idAttachBase, NULL, true); - } -} -// [/SL:KB] - LLAttachmentsMgr::LLItemRequestTimes::LLItemRequestTimes(const std::string& op_name, F32 timeout): mOpName(op_name), mTimeout(timeout) @@ -523,11 +439,6 @@ void LLAttachmentsMgr::onDetachRequested(const LLUUID& inv_item_id) void LLAttachmentsMgr::onDetachCompleted(const LLUUID& inv_item_id) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 - // (mRecentlyArrivedAttachments doesn't need pruning since it'll check the attachment is actually worn before linking) - clearPendingAttachmentLink(inv_item_id); -// [/SL:KB] - LLTimer timer; LLInventoryItem *item = gInventory.getItem(inv_item_id); if (mDetachRequests.getTime(inv_item_id, timer)) @@ -550,25 +461,18 @@ void LLAttachmentsMgr::onDetachCompleted(const LLUUID& inv_item_id) LL_DEBUGS("Avatar") << "ATT detach on shutdown for " << (item ? item->getName() : "UNKNOWN") << " " << inv_item_id << LL_ENDL; } -// LL_DEBUGS("Avatar") << "ATT detached item flagging as questionable for COF link checking " -// << (item ? item->getName() : "UNKNOWN") << " id " << inv_item_id << LL_ENDL; -// mQuestionableCOFLinks.addTime(inv_item_id); + LL_DEBUGS("Avatar") << "ATT detached item flagging as questionable for COF link checking " + << (item ? item->getName() : "UNKNOWN") << " id " << inv_item_id << LL_ENDL; + mQuestionableCOFLinks.addTime(inv_item_id); } bool LLAttachmentsMgr::isAttachmentStateComplete() const { -// [SL:KB] - Patch: Appearance-Misc | Checked: Catznip-4.3 - return mPendingAttachments.empty() - && mAttachmentRequests.empty() - && mDetachRequests.empty() - && mRecentlyArrivedAttachments.empty() - && mPendingAttachLinks.empty(); -// [/SL:KB] -// return mPendingAttachments.empty() -// && mAttachmentRequests.empty() -// && mDetachRequests.empty() -// && mRecentlyArrivedAttachments.empty() -// && mQuestionableCOFLinks.empty(); + return mPendingAttachments.empty() + && mAttachmentRequests.empty() + && mDetachRequests.empty() + && mRecentlyArrivedAttachments.empty() + && mQuestionableCOFLinks.empty(); } // Check for attachments that are (a) linked in COF and (b) not @@ -591,58 +495,58 @@ bool LLAttachmentsMgr::isAttachmentStateComplete() const // // See related: MAINT-5070, MAINT-4409 // -//void LLAttachmentsMgr::checkInvalidCOFLinks() -//{ -// if (!gInventory.isInventoryUsable()) -// { -// return; -// } -// LLInventoryModel::cat_array_t cat_array; -// LLInventoryModel::item_array_t item_array; -// gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), -// cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); -// for (S32 i=0; igetLinkedUUID(); -// if (inv_item->getType() == LLAssetType::AT_OBJECT) -// { -// LLTimer timer; -// bool is_flagged_questionable = mQuestionableCOFLinks.getTime(item_id,timer); -// bool is_wearing_attachment = isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item_id); -// if (is_wearing_attachment && is_flagged_questionable) -// { -// LL_DEBUGS("Avatar") << "ATT was flagged questionable but is now " -// << (is_wearing_attachment ? "attached " : "") -// <<"removing flag after " -// << timer.getElapsedTimeF32() << " item " -// << inv_item->getName() << " id " << item_id << LL_ENDL; -// mQuestionableCOFLinks.removeTime(item_id); -// } -// } -// } +void LLAttachmentsMgr::checkInvalidCOFLinks() +{ + if (!gInventory.isInventoryUsable()) + { + return; + } + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), + cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); + for (S32 i=0; igetLinkedUUID(); + if (inv_item->getType() == LLAssetType::AT_OBJECT) + { + LLTimer timer; + bool is_flagged_questionable = mQuestionableCOFLinks.getTime(item_id,timer); + bool is_wearing_attachment = isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item_id); + if (is_wearing_attachment && is_flagged_questionable) + { + LL_DEBUGS("Avatar") << "ATT was flagged questionable but is now " + << (is_wearing_attachment ? "attached " : "") + <<"removing flag after " + << timer.getElapsedTimeF32() << " item " + << inv_item->getName() << " id " << item_id << LL_ENDL; + mQuestionableCOFLinks.removeTime(item_id); + } + } + } -// for(LLItemRequestTimes::iterator it = mQuestionableCOFLinks.begin(); -// it != mQuestionableCOFLinks.end(); ) -// { -// LLItemRequestTimes::iterator curr_it = it; -// ++it; -// const LLUUID& item_id = curr_it->first; -// LLViewerInventoryItem *inv_item = gInventory.getItem(item_id); -// if (curr_it->second.getElapsedTimeF32() > MAX_BAD_COF_TIME) -// { -// if (LLAppearanceMgr::instance().isLinkedInCOF(item_id)) -// { -// LL_DEBUGS("Avatar") << "ATT Linked in COF but not attached or requested, deleting link after " -// << curr_it->second.getElapsedTimeF32() << " seconds for " -// << (inv_item ? inv_item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; -// LLAppearanceMgr::instance().removeCOFItemLinks(item_id); -// } -// mQuestionableCOFLinks.erase(curr_it); -// continue; -// } -// } -//} + for(LLItemRequestTimes::iterator it = mQuestionableCOFLinks.begin(); + it != mQuestionableCOFLinks.end(); ) + { + LLItemRequestTimes::iterator curr_it = it; + ++it; + const LLUUID& item_id = curr_it->first; + LLViewerInventoryItem *inv_item = gInventory.getItem(item_id); + if (curr_it->second.getElapsedTimeF32() > MAX_BAD_COF_TIME) + { + if (LLAppearanceMgr::instance().isLinkedInCOF(item_id)) + { + LL_DEBUGS("Avatar") << "ATT Linked in COF but not attached or requested, deleting link after " + << curr_it->second.getElapsedTimeF32() << " seconds for " + << (inv_item ? inv_item->getName() : "UNKNOWN") << " id " << item_id << LL_ENDL; + LLAppearanceMgr::instance().removeCOFItemLinks(item_id); + } + mQuestionableCOFLinks.erase(curr_it); + continue; + } + } +} void LLAttachmentsMgr::spamStatusInfo() { diff --git a/indra/newview/llattachmentsmgr.h b/indra/newview/llattachmentsmgr.h index 7455b06070..f9b77e99e4 100644 --- a/indra/newview/llattachmentsmgr.h +++ b/indra/newview/llattachmentsmgr.h @@ -92,15 +92,8 @@ public: bool isAttachmentStateComplete() const; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.1 -public: - void clearPendingAttachmentLink(const LLUUID& idItem); - bool getPendingAttachments(std::set& ids) const; - void refreshAttachments(); -protected: - void onRegisterAttachmentComplete(const LLUUID& idAttachLink); - friend class LLRegisterAttachmentCallback; -// [/SL:KB] + // [SL:KB] - Patch: Appearance-PhantomAttach | Checked: Catznip-5.0 + void refreshAttachments(); private: @@ -124,7 +117,7 @@ private: void linkRecentlyArrivedAttachments(); void expireOldAttachmentRequests(); void expireOldDetachRequests(); -// void checkInvalidCOFLinks(); + void checkInvalidCOFLinks(); void spamStatusInfo(); // Attachments that we are planning to rez but haven't requested from the server yet. @@ -140,13 +133,8 @@ private: std::set mRecentlyArrivedAttachments; LLTimer mCOFLinkBatchTimer; -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.1 - // Attachments that have pending link creation - std::set mPendingAttachLinks; -// [/SL:KB] - -// // Attachments that are linked in the COF but may be invalid. -// LLItemRequestTimes mQuestionableCOFLinks; + // Attachments that are linked in the COF but may be invalid. + LLItemRequestTimes mQuestionableCOFLinks; }; #endif diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 62b3b0276f..dee187fe36 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3109,8 +3109,7 @@ void LLSelectMgr::logNoOp(LLSelectNode* node, void *) // static void LLSelectMgr::logAttachmentRequest(LLSelectNode* node, void *) { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-3.7 -// LLAttachmentsMgr::instance().onAttachmentRequested(node->mItemID); + LLAttachmentsMgr::instance().onAttachmentRequested(node->mItemID); } // static diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 0447bcd32b..a4d3e5c99b 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -406,9 +406,8 @@ public: LLViewerObject* updateCacheEntry(U32 local_id, LLViewerObject* objectp); void findOrphans(U32 parent_id); void clearCachedVisibleObjects(); - void dumpCache (); - void clearVOCacheFromMemory(); - + void dumpCache(); + void clearVOCacheFromMemory(); void unpackRegionHandshake(); void calculateCenterGlobal(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 3f673df999..f0da24ee94 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -9283,11 +9283,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { -// [SL:KB] - Patch: Appearance-SyncAttach | Checked: Catznip-2.2 - // Changes to LLAppearanceMgr::updateAppearanceFromCOF() expect this function to actually return mFullyLoaded for gAgentAvatarp - return (mRenderUnloadedAvatar && !isSelf()) ||(mFullyLoaded); -// [/SL:KB] -// return (mRenderUnloadedAvatar || mFullyLoaded); + return (mRenderUnloadedAvatar || mFullyLoaded); } bool LLVOAvatar::isTooComplex() const diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index a1b271ff28..1d36ed64c3 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -165,7 +165,7 @@ Additional code generously contributed to Firestorm by: top_pad="4" width="450" wrap="true"> -Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. +Albatroz Hird, Alexie Birman, Andromeda Rage, Angeldark Raymaker, Angus Boyd, Animats, Armin Weatherwax, Casper Warden, Chalice Yao, Chaser Zaks, Chorazin Allen, Cron Stardust, Damian Zhaoying, Dan Threebeards, Dawa Gurbux, Denver Maksim, Drake Arconis, Felyza Wishbringer, f0rbidden, Fractured Crystal, Geenz Spad, Gibson Firehawk, Hitomi Tiponi, Inusaito Sayori, Jean Severine, Katharine Berry, Kittin Ninetails, Kool Koolhoven, Lance Corrimal, Lassie, Latif Khalifa, Laurent Bechir, Magne Metaverse LLC, Magus Freston, Makidoll, Manami Hokkigai, MartinRJ Fayray, McCabe Maxstead, Melancholy Lemon, Melysmile, Mimika Oh, Mister Acacia, MorganMegan, Morgan Pennent, Mysty Saunders, Nagi Michinaga, Name Short, nhede Core, NiranV Dean, Nogardrevlis Lectar, Oren Hurvitz, Paladin Forzane, paperwork, Penny Patton, Peyton Menges, programmtest, Qwerty Venom, Rebecca Ashbourne, Revolution Smythe, Romka Swallowtail, Sahkolihaa Contepomi, sal Kaligawa, Samm Florian, Satomi Ahn, Sei Lisa, Sempervirens Oddfellow, Shin Wasp, Shyotl Kuhr, Sione Lomu, Skills Hak, StarlightShining, Sunset Faulkes, Tapple Gao, Testicular Slingshot, Thickbrick Sleaford, Ubit Umarov, Vaalith Jinn, Vincent Sylvester, Whirly Fizzle, Xenhat Liamano, Zwagoth Klaar and others. + + + + + + +