From d5d6e5526590459ba0c30ed84d613d784839e0b5 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 25 Jun 2021 13:09:12 +0100 Subject: [PATCH 01/34] Add visible (rendered) face count to inspect --- indra/newview/llfloaterinspect.cpp | 30 +++++++++++-------- indra/newview/llviewerobject.cpp | 15 ++++++++++ indra/newview/llviewerobject.h | 1 + .../skins/default/xui/en/floater_inspect.xml | 1 + 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp index 701b057383..5d0d77d87e 100644 --- a/indra/newview/llfloaterinspect.cpp +++ b/indra/newview/llfloaterinspect.cpp @@ -348,6 +348,7 @@ void LLFloaterInspect::refresh() LLResMgr& res_mgr = LLResMgr::instance(); LLSelectMgr& sel_mgr = LLSelectMgr::instance(); S32 fcount = 0; + S32 fcount_visible = 0; S32 tcount = 0; S32 vcount = 0; S32 objcount = 0; @@ -383,6 +384,7 @@ void LLFloaterInspect::refresh() LLSelectNode* obj = *iter; LLSD row; std::string owner_name, creator_name; + auto vobj{obj->getObject()}; if (obj->mCreationDate == 0) { // Don't have valid information from the server, so skip this one @@ -462,12 +464,12 @@ void LLFloaterInspect::refresh() mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetCreatorNameCallback, this)); } - row["id"] = obj->getObject()->getID(); + row["id"] = vobj->getID(); row["columns"][0]["column"] = "object_name"; row["columns"][0]["type"] = "text"; // make sure we're either at the top of the link chain // or top of the editable chain, for attachments - if(!(obj->getObject()->isRoot() || obj->getObject()->isRootEdit())) + if(!(vobj->isRoot() || vobj->isRootEdit())) { row["columns"][0]["value"] = std::string(" ") + obj->mName; } @@ -495,17 +497,17 @@ void LLFloaterInspect::refresh() row["columns"][5]["value"] = llformat("%d", timestamp); // // PoundLife - Improved Object Inspect - res_mgr.getIntegerString(format_res_string, obj->getObject()->getNumFaces()); + res_mgr.getIntegerString(format_res_string, vobj->getNumFaces()); row["columns"][6]["column"] = "facecount"; row["columns"][6]["type"] = "text"; row["columns"][6]["value"] = format_res_string; - res_mgr.getIntegerString(format_res_string, obj->getObject()->getNumVertices()); + res_mgr.getIntegerString(format_res_string, vobj->getNumVertices()); row["columns"][7]["column"] = "vertexcount"; row["columns"][7]["type"] = "text"; row["columns"][7]["value"] = format_res_string; - res_mgr.getIntegerString(format_res_string, obj->getObject()->getNumIndices() / 3); + res_mgr.getIntegerString(format_res_string, vobj->getNumIndices() / 3); row["columns"][8]["column"] = "trianglecount"; row["columns"][8]["type"] = "text"; row["columns"][8]["value"] = format_res_string; @@ -513,7 +515,7 @@ void LLFloaterInspect::refresh() // Poundlife - Get VRAM U32 texture_memory = 0; U32 vram_memory = 0; - getObjectTextureMemory(obj->getObject(), texture_memory, vram_memory); + getObjectTextureMemory(vobj, texture_memory, vram_memory); res_mgr.getIntegerString(format_res_string, texture_memory / 1024); row["columns"][9]["column"] = "tramcount"; row["columns"][9]["type"] = "text"; @@ -526,15 +528,15 @@ void LLFloaterInspect::refresh() row["columns"][11]["column"] = "facecount_sort"; row["columns"][11]["type"] = "text"; - row["columns"][11]["value"] = LLSD::Integer(obj->getObject()->getNumFaces()); + row["columns"][11]["value"] = LLSD::Integer(vobj->getNumFaces()); row["columns"][12]["column"] = "vertexcount_sort"; row["columns"][12]["type"] = "text"; - row["columns"][12]["value"] = LLSD::Integer(obj->getObject()->getNumVertices()); + row["columns"][12]["value"] = LLSD::Integer(vobj->getNumVertices()); row["columns"][13]["column"] = "trianglecount_sort"; row["columns"][13]["type"] = "text"; - row["columns"][13]["value"] = LLSD::Integer(obj->getObject()->getNumIndices() / 3); + row["columns"][13]["value"] = LLSD::Integer(vobj->getNumIndices() / 3); row["columns"][14]["column"] = "tramcount_sort"; row["columns"][14]["type"] = "text"; @@ -546,9 +548,11 @@ void LLFloaterInspect::refresh() primcount = sel_mgr.getSelection()->getObjectCount(); objcount = sel_mgr.getSelection()->getRootObjectCount(); - fcount += obj->getObject()->getNumFaces(); - tcount += obj->getObject()->getNumIndices() / 3; - vcount += obj->getObject()->getNumVertices(); + fcount += vobj->getNumFaces(); + fcount_visible += vobj->getNumVisibleFaces(); + tcount += vobj->getNumIndices() / 3; + vcount += vobj->getNumVertices(); + // PoundLife - END mObjectList->addElement(row, ADD_TOP); } @@ -613,6 +617,8 @@ void LLFloaterInspect::refresh() args["NUM_OBJECTS"] = format_res_string; res_mgr.getIntegerString(format_res_string, primcount); args["NUM_PRIMS"] = format_res_string; + res_mgr.getIntegerString(format_res_string, fcount_visible); + args["NUM_VISIBLE_FACES"] = format_res_string; res_mgr.getIntegerString(format_res_string, fcount); args["NUM_FACES"] = format_res_string; res_mgr.getIntegerString(format_res_string, vcount); diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 00deddbf73..9e59e9f7df 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -516,6 +516,21 @@ void LLViewerObject::markDead() } } +S32 LLViewerObject::getNumVisibleFaces() const +{ + int v{0}; + if(mDrawable.notNull()) + { + for (int i = 0;i < mDrawable->getNumFaces();i++) + { + if(mDrawable->getFace(i)->getTextureEntry()->getAlpha() == 0.f) + v++; + } + } + return v; +}; + + void LLViewerObject::dump() const { LL_INFOS() << "Type: " << pCodeToString(mPrimitiveCode) << LL_ENDL; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 07498bec2b..6b2d4ed877 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -199,6 +199,7 @@ public: virtual U32 getNumVertices() const; virtual U32 getNumIndices() const; S32 getNumFaces() const { return mNumFaces; } + S32 getNumVisibleFaces() const; // Graphical stuff for objects - maybe broken out into render class later? virtual void updateTextures(); diff --git a/indra/newview/skins/default/xui/en/floater_inspect.xml b/indra/newview/skins/default/xui/en/floater_inspect.xml index 70d441b072..7c19e550d8 100644 --- a/indra/newview/skins/default/xui/en/floater_inspect.xml +++ b/indra/newview/skins/default/xui/en/floater_inspect.xml @@ -25,6 +25,7 @@ [NUM_OBJECTS] objects, [NUM_PRIMS] prims Faces: [NUM_FACES] +Visible: [NUM_VISIBLE_FACES] Vertices: [NUM_VERTICES] Triangles: [NUM_TRIANGLES] Complex.: [COMPLEXITY] From f996d7579e0d4329a6b53aec77989830ae9650cf Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 25 Jun 2021 13:14:10 +0100 Subject: [PATCH 02/34] BUG-230890 uppercase "DAE" breaks LOD auto detect --- indra/newview/llmodelpreview.cpp | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index 51b79c3cc2..6409b29e00 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3002,14 +3002,33 @@ void LLModelPreview::lookupLODModelFiles(S32 lod) S32 next_lod = (lod - 1 >= LLModel::LOD_IMPOSTOR) ? lod - 1 : LLModel::LOD_PHYSICS; std::string lod_filename = mLODFile[LLModel::LOD_HIGH]; - std::string ext = ".dae"; - std::string::size_type i = lod_filename.rfind(ext); - if (i != std::string::npos) + // BUG-230890 fix case-sensitive filename handling + // std::string ext = ".dae"; + // std::string::size_type i = lod_filename.rfind(ext); + // if (i != std::string::npos) + // { + // lod_filename.replace(i, lod_filename.size() - ext.size(), getLodSuffix(next_lod) + ext); + // } + // Note: we cannot use gDirUtilp here because the getExtension forces a tolower which would then break uppercase extensions on Linux/Mac + std::size_t offset = lod_filename.find_last_of('.'); + std::string ext = (offset == std::string::npos || offset == 0) ? "" : lod_filename.substr(offset+1); + lod_filename = gDirUtilp->getDirName(lod_filename) + gDirUtilp->getDirDelimiter() + gDirUtilp->getBaseFileName(lod_filename, true) + getLodSuffix(next_lod) + "." + ext; + std::ostringstream out; + out << "Looking for file: " << lod_filename << " for LOD " << next_lod; + LL_DEBUGS("MeshUpload") << out.str() << LL_ENDL; + if(mImporterDebug) { - lod_filename.replace(i, lod_filename.size() - ext.size(), getLodSuffix(next_lod) + ext); + LLFloaterModelPreview::addStringToLog(out, true); } + out.str(""); + // if (gDirUtilp->fileExists(lod_filename)) { + // extra logging is helpful here, so add to log tab + out << "Auto Loading LOD" << next_lod << " from " << lod_filename; + LL_INFOS() << out.str() << LL_ENDL; + LLFloaterModelPreview::addStringToLog(out, true); + // LLFloaterModelPreview* fmp = LLFloaterModelPreview::sInstance; if (fmp) { From b2111032bbc56399660f1080da002951904e4d53 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 25 Jun 2021 13:15:06 +0100 Subject: [PATCH 03/34] FIRE-31018 fix off by one error preventing selection of lowest for phys --- indra/newview/llfloatermodelpreview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 78ab6ae055..edd3a57595 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1142,7 +1142,7 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata) // FIRE-30963 Support pre-defined physics shapes (initially cube) // S32 which_lod = num_lods - which_mode; // sInstance->mModelPreview->setPhysicsFromLOD(which_lod); - if(which_mode >= num_lods) + if(which_mode > num_lods) { // which_mode is between the last LOD entry and file selection // so it is a preset From bc440125c9a4ca02bb412e347a2a114e5fbd77b3 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 25 Jun 2021 14:30:24 +0200 Subject: [PATCH 04/34] Update German translation --- indra/newview/skins/default/xui/de/floater_inspect.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/skins/default/xui/de/floater_inspect.xml b/indra/newview/skins/default/xui/de/floater_inspect.xml index f8058a1a24..1f6fe35bc4 100644 --- a/indra/newview/skins/default/xui/de/floater_inspect.xml +++ b/indra/newview/skins/default/xui/de/floater_inspect.xml @@ -12,6 +12,7 @@ [NUM_OBJECTS] Objekte, [NUM_PRIMS] Prims Flächen: [NUM_FACES] +Sichtbar: [NUM_VISIBLE_FACES] Vertices: [NUM_VERTICES] Dreiecke: [NUM_TRIANGLES] Komplex.: [COMPLEXITY] From c964508919b8c219e92462b369b32e08e033b3df Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sat, 26 Jun 2021 21:00:25 +0200 Subject: [PATCH 05/34] Updated Polish translation --- .../ansastorm/xui/pl/panel_main_inventory.xml | 1 + .../xui/pl/floater_add_payment_method.xml | 19 +++ .../xui/pl/floater_adjust_environment.xml | 12 ++ .../default/xui/pl/floater_buy_currency.xml | 121 +++++++++++------- .../xui/pl/floater_create_landmark.xml | 14 ++ .../xui/pl/floater_fs_teleporthistory.xml | 21 +-- .../skins/default/xui/pl/floater_inspect.xml | 1 + .../default/xui/pl/menu_attachment_self.xml | 29 ++++- .../skins/default/xui/pl/menu_avatar_self.xml | 3 +- .../skins/default/xui/pl/menu_favorites.xml | 5 +- .../default/xui/pl/menu_inspect_self_gear.xml | 1 - .../pl/menu_inventory_search_visibility.xml | 6 + .../skins/default/xui/pl/menu_login.xml | 1 - .../skins/default/xui/pl/menu_picks.xml | 5 +- .../default/xui/pl/menu_place_add_button.xml | 10 +- .../xui/pl/menu_places_gear_folder.xml | 5 +- .../xui/pl/menu_places_gear_landmark.xml | 32 +++-- .../xui/pl/menu_places_gear_sorting.xml | 6 + .../xui/pl/menu_teleport_history_gear.xml | 4 +- .../xui/pl/menu_teleport_history_item.xml | 13 +- .../skins/default/xui/pl/menu_viewer.xml | 23 +++- .../skins/default/xui/pl/notifications.xml | 48 +++++-- .../skins/default/xui/pl/panel_landmarks.xml | 22 ---- .../default/xui/pl/panel_main_inventory.xml | 1 + .../default/xui/pl/panel_outfit_edit.xml | 7 +- .../xui/pl/panel_outfits_inventory.xml | 5 +- .../skins/default/xui/pl/panel_people.xml | 17 ++- .../skins/default/xui/pl/panel_places.xml | 94 ++++++++------ .../xui/pl/panel_settings_sky_sunmoon.xml | 16 ++- .../default/xui/pl/panel_teleport_history.xml | 3 - .../newview/skins/default/xui/pl/strings.xml | 23 ++-- .../skins/default/xui/pl/teleport_strings.xml | 3 +- .../vintage/xui/pl/panel_main_inventory.xml | 1 + 33 files changed, 367 insertions(+), 205 deletions(-) create mode 100644 indra/newview/skins/default/xui/pl/floater_add_payment_method.xml create mode 100644 indra/newview/skins/default/xui/pl/floater_create_landmark.xml create mode 100644 indra/newview/skins/default/xui/pl/menu_inventory_search_visibility.xml create mode 100644 indra/newview/skins/default/xui/pl/menu_places_gear_sorting.xml delete mode 100644 indra/newview/skins/default/xui/pl/panel_landmarks.xml diff --git a/indra/newview/skins/ansastorm/xui/pl/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/pl/panel_main_inventory.xml index 277aad005f..9b29d56b08 100644 --- a/indra/newview/skins/ansastorm/xui/pl/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/pl/panel_main_inventory.xml @@ -98,6 +98,7 @@ + diff --git a/indra/newview/skins/default/xui/pl/floater_add_payment_method.xml b/indra/newview/skins/default/xui/pl/floater_add_payment_method.xml new file mode 100644 index 0000000000..2ef78d3d35 --- /dev/null +++ b/indra/newview/skins/default/xui/pl/floater_add_payment_method.xml @@ -0,0 +1,19 @@ + + + + + Dodaj metodę płatności, aby kupić Lindeny i lepiej doświadczać Second Life. + +