From 2aecd42d1ffc2ee056b60a66d5c39f09312e1fbe Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 1 Aug 2023 15:51:18 -0700 Subject: [PATCH 001/128] First commit of code to investigate how we might do bulk uploads of inventory item thumbnails - both from a code and a UI perspective --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterbulkythumbs.cpp | 63 +++++++++++++++++++ indra/newview/llfloaterbulkythumbs.h | 49 +++++++++++++++ indra/newview/llviewerfloaterreg.cpp | 2 + .../default/xui/en/floater_bulky_thumbs.xml | 42 +++++++++++++ .../skins/default/xui/en/menu_viewer.xml | 8 +++ 6 files changed, 166 insertions(+) create mode 100644 indra/newview/llfloaterbulkythumbs.cpp create mode 100644 indra/newview/llfloaterbulkythumbs.h create mode 100644 indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index c37d03221c..4c6e37f82f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -185,6 +185,7 @@ set(viewer_SOURCE_FILES llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp + llfloaterbulkythumbs.cpp llfloaterbump.cpp llfloaterbuy.cpp llfloaterbuycontents.cpp @@ -831,6 +832,7 @@ set(viewer_HEADER_FILES llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h + llfloaterbulkythumbs.h llfloaterbump.h llfloaterbuy.h llfloaterbuycontents.h diff --git a/indra/newview/llfloaterbulkythumbs.cpp b/indra/newview/llfloaterbulkythumbs.cpp new file mode 100644 index 0000000000..14ecc32c40 --- /dev/null +++ b/indra/newview/llfloaterbulkythumbs.cpp @@ -0,0 +1,63 @@ +/** + * @file llfloaterbulkythumbs.cpp + * @author Callum Prentice + * @brief LLFloaterBulkyThumbs class implementation + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +/** + * Floater that appears when buying an object, giving a preview + * of its contents and their permissions. + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterbulkythumbs.h" +#include "lluictrlfactory.h" + + +LLFloaterBulkyThumbs::LLFloaterBulkyThumbs(const LLSD &key) + : LLFloater("floater_bulky_thumbs") +{ +} + +LLFloaterBulkyThumbs::~LLFloaterBulkyThumbs() {} + +BOOL LLFloaterBulkyThumbs::postBuild() +{ + mPasteFromInventoryBtn = getChild("paste_from_inventory"); + mPasteFromInventoryBtn->setCommitCallback(boost::bind(&LLFloaterBulkyThumbs::onPasteFromInventory, this)); + + mProcessBulkyThumbsBtn = getChild("process_bulky_thumbs"); + mProcessBulkyThumbsBtn->setCommitCallback(boost::bind(&LLFloaterBulkyThumbs::onProcessBulkyThumbs, this)); + mProcessBulkyThumbsBtn->setEnabled(false); + + return true; +} + + +void LLFloaterBulkyThumbs::onPasteFromInventory() +{ std::cout << "onPasteFromInventory" << std::endl; } + +void LLFloaterBulkyThumbs::onProcessBulkyThumbs() +{ std::cout << "onProcessBulkyThumbs" << std::endl; } diff --git a/indra/newview/llfloaterbulkythumbs.h b/indra/newview/llfloaterbulkythumbs.h new file mode 100644 index 0000000000..9c951211d7 --- /dev/null +++ b/indra/newview/llfloaterbulkythumbs.h @@ -0,0 +1,49 @@ +/** + * @file llfloaterbulkythumbs.h + * @author Callum Prentice + * @brief Helper floater for bulk processing of inventory thumbnails + * + * $LicenseInfo:firstyear=2008&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_LLFLOATERBULKYTHUMBS_H +#define LL_LLFLOATERBULKYTHUMBS_H + +#include "llfloater.h" + +class LLFloaterBulkyThumbs: + public LLFloater +{ + friend class LLFloaterReg; +private: + LLFloaterBulkyThumbs(const LLSD &key); + BOOL postBuild() override; + ~LLFloaterBulkyThumbs(); + + LLUICtrl *mPasteFromInventoryBtn; + void onPasteFromInventory(); + + LLUICtrl *mProcessBulkyThumbsBtn; + void onProcessBulkyThumbs(); +}; + +#endif // LL_LLFLOATERBULKYTHUMBS_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 060bdb6995..459101317b 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -47,6 +47,7 @@ #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbulkpermission.h" +#include "llfloaterbulkythumbs.h" #include "llfloaterbump.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" @@ -328,6 +329,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("bulky_thumbs", "floater_bulky_thumbs.xml", (LLFloaterBuildFunc) &LLFloaterReg::build); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("camera_presets", "floater_camera_presets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml b/indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml new file mode 100644 index 0000000000..867c8fdc20 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_bulky_thumbs.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + % + + + + Alpha mode + + + + + + + + + + + + + Bumpiness + + + + + + + + + + + + + + + + + + + + + + + + + + + + Shininess + + + + + + + + + + + + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + Scale + + + + + + + + + + + + + + + + Offset + + + + + + + + + + + + Rotation + + + + + + + + + + + + + + + + URL of chosen media, if any, goes here + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 6444ea2540..b3bf977df2 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -3633,6 +3633,14 @@ function="World.EnvPreset" + + + + From 2dad5776e04c3fbcf3e2b2153ac2145289dc97ef Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 25 Mar 2024 00:07:38 +0100 Subject: [PATCH 091/128] Update German translation --- indra/newview/skins/default/xui/de/menu_viewer.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/de/menu_viewer.xml b/indra/newview/skins/default/xui/de/menu_viewer.xml index c778ca05e8..dd958a50fe 100644 --- a/indra/newview/skins/default/xui/de/menu_viewer.xml +++ b/indra/newview/skins/default/xui/de/menu_viewer.xml @@ -579,9 +579,10 @@ + - + From f815b015cecda18098dd2d16f65682a37e1bff7c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 26 Mar 2024 03:19:06 +0100 Subject: [PATCH 092/128] secondlife/jira-archive-internal#69593 Avatar is upside down when viewed from below --- indra/newview/llagent.cpp | 30 ++++--- indra/newview/llfloatercamera.cpp | 81 ++++++++++++------- .../skins/default/xui/en/floater_camera.xml | 6 +- 3 files changed, 72 insertions(+), 45 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d1e1815a79..13501833b2 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1468,23 +1468,27 @@ void LLAgent::pitch(F32 angle) LLVector3 skyward = getReferenceUpVector(); - // SL-19286 Avatar is upside down when viewed from below - // after left-clicking the mouse on the avatar and dragging down - // - // The issue is observed on angle below 10 degrees - const F32 look_down_limit = 179.f * DEG_TO_RAD; - const F32 look_up_limit = 10.f * DEG_TO_RAD; - - F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward); - // clamp pitch to limits - if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit)) + if (angle >= 0.f) { - angle = look_down_limit - angle_from_skyward; + const F32 look_down_limit = 179.f * DEG_TO_RAD; + F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward); + if (angle_from_skyward + angle > look_down_limit) + { + angle = look_down_limit - angle_from_skyward; + } } - else if ((angle < 0.f) && (angle_from_skyward + angle < look_up_limit)) + else if (angle < 0.f) { - angle = look_up_limit - angle_from_skyward; + const F32 look_up_limit = 5.f * DEG_TO_RAD; + const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin(); + LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); + LLVector3 look_dir = agent_focus_pos - viewer_camera_pos; + F32 angle_from_skyward = angle_between(look_dir, skyward); + if (angle_from_skyward + angle < look_up_limit) + { + angle = look_up_limit - angle_from_skyward; + } } if (fabs(angle) > 1e-4) diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index 177e2a8567..7985ce447f 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -248,23 +248,25 @@ void activate_camera_tool() class LLCameraInfoPanel : public LLPanel { - const S32 MARGIN { 10 }; - - const char* mTitle; - const LLCoordFrame* mCamera; - const LLFontGL* mFont; - public: - LLCameraInfoPanel(const LLView* parent, const LLCoordFrame* camera, const char* title) - : LLPanel([&]() -> LLPanel::Params - { - LLPanel::Params params; - params.rect = LLRect(parent->getLocalRect()); - return params; - }()) - , mTitle(title) - , mCamera(camera) - , mFont(LLFontGL::getFontSansSerifBig()) + typedef std::function get_vector_t; + + LLCameraInfoPanel( + const LLView* parent, + const char* title, + const LLCoordFrame& camera, + const get_vector_t get_focus + ) + : LLPanel([&]() -> LLPanel::Params + { + LLPanel::Params params; + params.rect = LLRect(parent->getLocalRect()); + return params; + }()) + , mTitle(title) + , mCamera(camera) + , mGetFocus(get_focus) + , mFont(LLFontGL::getFontSansSerifBig()) { } @@ -272,25 +274,44 @@ public: { LLPanel::draw(); + static const U32 HPADDING = 10; + static const U32 VPADDING = 5; + LLVector3 focus = mGetFocus(); + LLVector3 sight = focus - mCamera.mOrigin; + std::pair const data[] = + { + { "Origin:", mCamera.mOrigin }, + { "X Axis:", mCamera.mXAxis }, + { "Y Axis:", mCamera.mYAxis }, + { "Z Axis:", mCamera.mZAxis }, + { "Focus:", focus }, + { "Sight:", sight } + }; S32 width = getRect().getWidth(); S32 height = getRect().getHeight(); - S32 top = MARGIN / 2 + (height - MARGIN) / 10 * 9; - mFont->renderUTF8(mTitle, 0, MARGIN, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER); - const LLVector3* const vectors[] = { &mCamera->getOrigin(), &mCamera->getXAxis(), &mCamera->getYAxis(), &mCamera->getZAxis() }; - for (int row = 0; row < 4; ++row) + S32 row_count = 1 + sizeof(data) / sizeof(*data); + S32 row_height = (height - VPADDING * 2) / row_count; + S32 top = height - VPADDING - row_height / 2; + mFont->renderUTF8(mTitle, 0, HPADDING, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER); + for (const auto& row : data) { - top -= (height - MARGIN) / 5; - static const char* const labels[] = { "Origin:", "X Axis:", "Y Axis:", "Z Axis:" }; - mFont->renderUTF8(labels[row], 0, MARGIN, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER); - const LLVector3& vector = *vectors[row]; - for (int col = 0; col < 3; ++col) + top -= row_height; + mFont->renderUTF8(row.first, 0, HPADDING, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER); + const LLVector3& vector = row.second; + for (S32 i = 0; i < 3; ++i) { - std::string text = llformat("%.6f", vector[col]); - S32 right = width / 4 * (col + 2) - MARGIN; + std::string text = llformat("%.6f", vector[i]); + S32 right = width / 4 * (i + 2) - HPADDING; mFont->renderUTF8(text, 0, right, top, LLColor4::white, LLFontGL::RIGHT, LLFontGL::VCENTER); } } } + +private: + const char* mTitle; + const LLCoordFrame& mCamera; + const get_vector_t mGetFocus; + const LLFontGL* mFont; }; // @@ -344,8 +365,10 @@ void LLFloaterCamera::showDebugInfo(bool show) // Initially LLPanel contains 1 child "view_border" if (show && mViewerCameraInfo->getChildCount() < 2) { - mViewerCameraInfo->addChild(new LLCameraInfoPanel(mViewerCameraInfo, LLViewerCamera::getInstance(), "Viewer Camera")); - mAgentCameraInfo->addChild(new LLCameraInfoPanel(mAgentCameraInfo, &gAgent.getFrameAgent(), "Agent Camera")); + mViewerCameraInfo->addChild(new LLCameraInfoPanel(mViewerCameraInfo, "Viewer Camera", *LLViewerCamera::getInstance(), + []() { return LLViewerCamera::getInstance()->getPointOfInterest(); })); + mAgentCameraInfo->addChild(new LLCameraInfoPanel(mAgentCameraInfo, "Agent Camera", gAgent.getFrameAgent(), + []() { return gAgent.getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); })); } mAgentCameraInfo->setVisible(show); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 8774b12e2b..93cfdf6030 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -258,16 +258,16 @@ left="0" top="135" width="400" - height="130" + height="150" border="true" visible="false" background_visible="true"/> From 70055934224fc4acba18f9bf6dd36fc1f416d3fd Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 27 Mar 2024 15:35:02 +0100 Subject: [PATCH 093/128] Apply camera debug panel size changes --- indra/newview/skins/ansastorm/xui/en/floater_camera.xml | 4 ++-- .../newview/skins/default/xui/en/floater_fs_camera_small.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/ansastorm/xui/en/floater_camera.xml b/indra/newview/skins/ansastorm/xui/en/floater_camera.xml index b5effcd3b0..ec8fe13a0f 100644 --- a/indra/newview/skins/ansastorm/xui/en/floater_camera.xml +++ b/indra/newview/skins/ansastorm/xui/en/floater_camera.xml @@ -274,7 +274,7 @@ left="0" top="85" width="400" - height="130" + height="150" border="true" visible="false" background_visible="true"/> @@ -283,7 +283,7 @@ left="0" top="215" width="400" - height="130" + height="150" border="true" visible="false" background_visible="true"/> diff --git a/indra/newview/skins/default/xui/en/floater_fs_camera_small.xml b/indra/newview/skins/default/xui/en/floater_fs_camera_small.xml index 6e3745accc..95fd89d24b 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_camera_small.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_camera_small.xml @@ -416,7 +416,7 @@ free_mode_title left="0" top="77" width="400" - height="130" + height="150" border="true" visible="false" background_visible="true"/> @@ -425,7 +425,7 @@ free_mode_title left="0" top="207" width="400" - height="130" + height="150" border="true" visible="false" background_visible="true"/> From a436595d316dd569c2ccb03d189fb6c8da13fb31 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Mon, 8 Apr 2024 15:38:34 +0200 Subject: [PATCH 094/128] Merge new texture edit panel up to current master --- indra/newview/app_settings/settings.xml | 1 - indra/newview/fspanelface.cpp | 22 +++++++++++++++++----- indra/newview/fspanelface.h | 2 ++ indra/newview/llfloatertools.cpp | 7 +++++++ indra/newview/llfloatertools.h | 4 +++- indra/newview/lltooldraganddrop.cpp | 12 +++++++++--- 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3c118d795c..ccbb1e8ae5 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26737,7 +26737,6 @@ Change of this parameter will affect the layout of buttons in notification toast Value 128578 - UseNewTexturePanel Backup diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index 111714eeb2..195da66b94 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -785,7 +785,7 @@ BOOL FSPanelFace::postBuild() mMaterialCtrlPBR->setImmediateFilterPermMask(PERM_NONE); mMaterialCtrlPBR->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER); mMaterialCtrlPBR->setBakeTextureEnabled(false); - mMaterialCtrlPBR->setInventoryPickType(LLTextureCtrl::PICK_MATERIAL); + mMaterialCtrlPBR->setInventoryPickType(PICK_MATERIAL); // PBR Base Color texture swatch mBaseTexturePBR->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("DefaultObjectTexture"))); @@ -924,6 +924,18 @@ LLRender::eTexIndex FSPanelFace::getTextureDropChannel() return LLRender::eTexIndex(MATTYPE_DIFFUSE); } +LLGLTFMaterial::TextureInfo FSPanelFace::getPBRDropChannel() +{ + if (getCurrentMaterialType() == MATMEDIA_PBR) + { + S32 current_pbr_channel = getCurrentPBRChannel(); + if (current_pbr_channel == PBRTYPE_NORMAL) return LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL; + if (current_pbr_channel == PBRTYPE_METALLIC_ROUGHNESS) return LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS; + if (current_pbr_channel == PBRTYPE_EMISSIVE) return LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE; + } + return LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR; +} + LLMaterialPtr FSPanelFace::createDefaultMaterial(LLMaterialPtr current_material) { LLMaterialPtr new_material(current_material.notNull() ? new LLMaterial(current_material->asLLSD()) : new LLMaterial()); @@ -4859,7 +4871,8 @@ void FSPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) LLToolDragAndDrop::dropTextureAllFaces(objectp, itemp_res, from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT, - LLUUID::null); + LLUUID::null, + false); } else // one face { @@ -4868,6 +4881,7 @@ void FSPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) itemp_res, from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null, + false, 0); } } @@ -4965,8 +4979,6 @@ void FSPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) { LLUUID object_id = objectp->getID(); - LLSelectedTEMaterial::setAlphaMaskCutoff(this, (U8)te_data["material"]["AlphaMaskCutoff"].asInteger(), te, object_id); - // Normal // Replace placeholders with target's if (te_data["material"].has("NormMapNoCopy")) @@ -5015,7 +5027,7 @@ void FSPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) LLSelectedTEMaterial::setSpecularLightExponent(this, (U8)te_data["material"]["SpecExp"].asInteger(), te, object_id); LLSelectedTEMaterial::setEnvironmentIntensity(this, (U8)te_data["material"]["EnvIntensity"].asInteger(), te, object_id); LLSelectedTEMaterial::setDiffuseAlphaMode(this, (U8)te_data["material"]["DiffuseAlphaMode"].asInteger(), te, object_id); - LLSelectedTEMaterial::setAlphaMaskCutoff(this, (U8)te_data["material"]["AlphaMaskCutoff"].asInteger(), te, object_id); + LLSelectedTEMaterial::setAlphaMaskCutoff(this, (U8)te_data["material"]["AlphaMaskCutoff"].asInteger(), te, object_id); if (te_data.has("te") && te_data["te"].has("shiny")) { diff --git a/indra/newview/fspanelface.h b/indra/newview/fspanelface.h index 5b62206eb3..342b9c111a 100644 --- a/indra/newview/fspanelface.h +++ b/indra/newview/fspanelface.h @@ -128,6 +128,8 @@ public: LLRender::eTexIndex getTextureChannelToEdit(); LLRender::eTexIndex getTextureDropChannel(); + LLGLTFMaterial::TextureInfo getPBRDropChannel(); + protected: void navigateToTitleMedia(const std::string url); bool selectedMediaEditable(); diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index c792059a2d..d2e9f60dea 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -1697,6 +1697,13 @@ LLRender::eTexIndex LLFloaterTools::getTextureChannelToEdit() return LLRender::NUM_TEXTURE_CHANNELS; // invalid } +LLGLTFMaterial::TextureInfo LLFloaterTools::getPBRDropChannel() +{ + if (mPanelFace) return mPanelFace->getPBRDropChannel(); + if (mFSPanelFace) return mFSPanelFace->getPBRDropChannel(); + return LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; // invalid +} + LLMaterialPtr LLFloaterTools::createDefaultMaterial(LLMaterialPtr old_mat) { if (mPanelFace) return mPanelFace->createDefaultMaterial(old_mat); diff --git a/indra/newview/llfloatertools.h b/indra/newview/llfloatertools.h index 3bf13ca01b..2ea5daaf93 100644 --- a/indra/newview/llfloatertools.h +++ b/indra/newview/llfloatertools.h @@ -51,8 +51,9 @@ class LLObjectSelection; class LLLandImpactsObserver; // switchable edit texture/materials panel -#include "llrender.h" +#include "llgltfmaterial.h" #include "llmaterial.h" +#include "llrender.h" class FSPanelFace; // @@ -118,6 +119,7 @@ public: // LLPanelFace* getPanelFace() { return mPanelFace; } LLRender::eTexIndex getTextureDropChannel(); LLRender::eTexIndex getTextureChannelToEdit(); + LLGLTFMaterial::TextureInfo getPBRDropChannel(); LLMaterialPtr createDefaultMaterial(LLMaterialPtr old_mat); void refreshPanelFace(); // diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 2b224fa757..07c2be1c64 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1477,11 +1477,17 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, if (allow_adding_to_override) { LLGLTFMaterial::TextureInfo drop_channel = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR; - LLPanelFace* panel_face = gFloaterTools->getPanelFace(); - if (gFloaterTools->getVisible() && panel_face) + // switchable edit texture/materials panel + // LLPanelFace* panel_face = gFloaterTools->getPanelFace(); + // if (gFloaterTools->getVisible() && panel_face) + // { + // drop_channel = panel_face->getPBRDropChannel(); + // } + if (gFloaterTools->getVisible()) { - drop_channel = panel_face->getPBRDropChannel(); + drop_channel = gFloaterTools->getPBRDropChannel(); } + // set_texture_to_material(hit_obj, hit_face, asset_id, drop_channel); LLGLTFMaterialList::flushUpdates(nullptr); } From 896b7f69d1586e460ef0880135ab3c07cfdf0069 Mon Sep 17 00:00:00 2001 From: Zi Ree Date: Mon, 8 Apr 2024 15:42:15 +0200 Subject: [PATCH 095/128] Fix whitespace accident --- indra/newview/lltooldraganddrop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 07c2be1c64..6617f19d6e 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1477,7 +1477,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, if (allow_adding_to_override) { LLGLTFMaterial::TextureInfo drop_channel = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR; - // switchable edit texture/materials panel + // switchable edit texture/materials panel // LLPanelFace* panel_face = gFloaterTools->getPanelFace(); // if (gFloaterTools->getVisible() && panel_face) // { @@ -1487,7 +1487,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, { drop_channel = gFloaterTools->getPBRDropChannel(); } - // + // set_texture_to_material(hit_obj, hit_face, asset_id, drop_channel); LLGLTFMaterialList::flushUpdates(nullptr); } From 5bd0de2a92bf54c4c6a5dc5b93b07d222ad08d3a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 10 Apr 2024 11:13:06 +0200 Subject: [PATCH 096/128] Keep set location button code for profile picks --- indra/newview/llpanelprofilepicks.cpp | 17 +++++++++++++++++ indra/newview/llpanelprofilepicks.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 548a8064fd..3cbf6128d1 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -270,6 +270,9 @@ void LLPanelProfilePicks::onClickNewBtn() select_tab(true). label(pick_panel->getPickName())); updateButtons(); + + // Keep set location button + pick_panel->addLocationChangedCallbacks(); } void LLPanelProfilePicks::onClickDelete() @@ -839,6 +842,12 @@ void LLPanelProfilePick::onClickSave() { mParcelCallbackConnection.disconnect(); } + // Keep set location button + if (mLocationChanged) + { + onClickSetLocation(); + } + // sendUpdate(); mLocationChanged = false; @@ -886,6 +895,14 @@ void LLPanelProfilePick::processParcelInfo(const LLParcelData& parcel_data) } } +// Keep set location button +void LLPanelProfilePick::addLocationChangedCallbacks() +{ + mRegionCallbackConnection = gAgent.addRegionChangedCallback([this]() { onClickSetLocation(); }); + mParcelCallbackConnection = gAgent.addParcelChangedCallback([this]() { onClickSetLocation(); }); +} +// + void LLPanelProfilePick::sendUpdate() { LLPickData pick_data; diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index e95de01908..e6a3b8cc60 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -147,6 +147,8 @@ public: void setParcelID(const LLUUID& parcel_id) override { mParcelId = parcel_id; } void setErrorStatus(S32 status, const std::string& reason) override {}; + void addLocationChangedCallbacks(); // Keep set location button + protected: /** From 2e6884950e0568b2550fd534efc675e53d8f5979 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 10 Apr 2024 21:03:37 +0100 Subject: [PATCH 097/128] Allow creators to see the BlinnPhong Fallback while they are editing even if PBR exists --- indra/newview/app_settings/settings.xml | 13 +++++++++++++ indra/newview/llface.cpp | 7 +++++++ indra/newview/llvovolume.cpp | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index bfe539cab4..593c9341ea 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -17952,6 +17952,19 @@ Change of this parameter will affect the layout of buttons in notification toast Backup 0 + ShowSelectedInBlinnPhong + + Comment + show BlinnPhong while selected + Persist + 0 + Type + Boolean + Value + 0 + Backup + 0 + ShowSpecificLODInEdit Comment diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4775686fc0..ca98eef504 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1395,6 +1395,13 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLMaterial* mat = tep ? tep->getMaterialParams().get() : 0; // LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial(); + // show legacy when editing the fallback materials. + static LLCachedControl showSelectedinBP(gSavedSettings, "ShowSelectedInBlinnPhong"); + if( gltf_mat && getViewerObject()->isSelected() && showSelectedinBP ) + { + gltf_mat = nullptr; + } + // F32 r = 0, os = 0, ot = 0, ms = 0, mt = 0, cos_ang = 0, sin_ang = 0; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c5e7cff9c0..a22d62fa47 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -6781,6 +6781,14 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace const LLTextureEntry* te = facep->getTextureEntry(); LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial(); + + // show legacy when editing the fallback materials. + static LLCachedControl showSelectedinBP(gSavedSettings, "ShowSelectedInBlinnPhong"); + if( gltf_mat && facep->getViewerObject()->isSelected() && showSelectedinBP ) + { + gltf_mat = nullptr; + } + // if (hud_group && gltf_mat == nullptr) { //all hud attachments are fullbright From 274a0cdb6aafe3b76aba5baf343a617adc789e79 Mon Sep 17 00:00:00 2001 From: Beq Date: Sun, 7 Jan 2024 22:12:12 +0000 Subject: [PATCH 098/128] another override point --- indra/newview/llvovolume.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index a22d62fa47..54cd78fcd6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5516,6 +5516,10 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, const LLMatrix4* model_mat = NULL; LLDrawable* drawable = facep->getDrawable(); + if(!drawable) + { + return; + } if (rigged) { @@ -5551,6 +5555,15 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, auto* gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial(); llassert(gltf_mat == nullptr || dynamic_cast(te->getGLTFRenderMaterial()) != nullptr); + + // show legacy when editing the fallback materials. + static LLCachedControl showSelectedinBP(gSavedSettings, "ShowSelectedInBlinnPhong"); + if( gltf_mat && facep->getViewerObject()->isSelected() && showSelectedinBP ) + { + gltf_mat = nullptr; + } + // + if (gltf_mat != nullptr) { mat_id = gltf_mat->getHash(); // TODO: cache this hash From 0f94ea86d44f56ace4160eabceafe07a1f11784f Mon Sep 17 00:00:00 2001 From: Bennett Goble Date: Thu, 11 Apr 2024 13:32:48 -0700 Subject: [PATCH 099/128] CI: adopt xz compression Move towards packaging artifacts with xz, which offers higher compression ratios and faster decode time. --- .github/workflows/build.yaml | 58 ++++++++++++-------------------- build.sh | 10 +++--- indra/newview/CMakeLists.txt | 12 +++---- indra/newview/viewer_manifest.py | 14 ++++---- 4 files changed, 40 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f18b31ef0f..44f32c1c5d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,13 +12,10 @@ jobs: strategy: matrix: runner: [windows-large, macos-12-xl] - configuration: [Release, ReleaseOS] + configuration: [Release] include: - runner: macos-12-xl developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer" - exclude: - - runner: macos-12-xl - configuration: ReleaseOS runs-on: ${{ matrix.runner }} outputs: viewer_channel: ${{ steps.build.outputs.viewer_channel }} @@ -100,7 +97,7 @@ jobs: - name: Determine source branch id: which-branch - uses: secondlife/viewer-build-util/which-branch@v1 + uses: secondlife/viewer-build-util/which-branch@v2 with: token: ${{ github.token }} @@ -223,7 +220,7 @@ jobs: - name: Upload executable if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-app" path: | @@ -233,7 +230,7 @@ jobs: # artifact for that too. - name: Upload symbol file if: matrix.configuration != 'ReleaseOS' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-symbols" path: | @@ -241,7 +238,7 @@ jobs: - name: Upload metadata if: matrix.configuration != 'ReleaseOS' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "${{ steps.build.outputs.artifact }}-metadata" # emitted by build.sh, possibly multiple lines @@ -249,7 +246,7 @@ jobs: ${{ steps.build.outputs.metadata }} - name: Upload physics package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 # should only be set for viewer-private if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv with: @@ -270,7 +267,7 @@ jobs: steps: - name: Sign and package Windows viewer if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID - uses: secondlife/viewer-build-util/sign-pkg-windows@v1 + uses: secondlife/viewer-build-util/sign-pkg-windows@v2 with: vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}" cert_name: "${{ env.AZURE_CERT_NAME }}" @@ -309,7 +306,7 @@ jobs: - name: Sign and package Mac viewer if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team - uses: secondlife/viewer-build-util/sign-pkg-mac@v1 + uses: secondlife/viewer-build-util/sign-pkg-mac@v2 with: channel: ${{ needs.build.outputs.viewer_channel }} imagename: ${{ needs.build.outputs.imagename }} @@ -329,7 +326,7 @@ jobs: steps: - name: Post Windows symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife/viewer-build-util/post-bugsplat-windows@v1 + uses: secondlife/viewer-build-util/post-bugsplat-windows@v2 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} @@ -346,7 +343,7 @@ jobs: steps: - name: Post Mac symbols if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS - uses: secondlife/viewer-build-util/post-bugsplat-mac@v1 + uses: secondlife/viewer-build-util/post-bugsplat-mac@v2 with: username: ${{ env.BUGSPLAT_USER }} password: ${{ env.BUGSPLAT_PASS }} @@ -359,31 +356,20 @@ jobs: runs-on: ubuntu-latest if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_') steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: Windows-installer + pattern: "*-installer" - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: macOS-installer - - - uses: actions/download-artifact@v3 - with: - name: Windows-metadata - - - name: Rename windows metadata + pattern: "*-metadata" + + - name: Rename metadata run: | - mv autobuild-package.xml Windows-autobuild-package.xml - mv newview/viewer_version.txt Windows-viewer_version.txt - - - uses: actions/download-artifact@v3 - with: - name: macOS-metadata - - - name: Rename macOS metadata - run: | - mv autobuild-package.xml macOS-autobuild-package.xml - mv newview/viewer_version.txt macOS-viewer_version.txt + cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml + cp Windows-metadata/newview/viewer_version.txt Windows-viewer_version.txt + cp macOS-metadata/autobuild-package.xml macOS-autobuild-package.xml + cp macOS-metadata/newview/viewer_version.txt macOS-viewer_version.txt # forked from softprops/action-gh-release - name: Create GitHub release @@ -406,8 +392,8 @@ jobs: append_body: true fail_on_unmatched_files: true files: | - *.dmg - *.exe + macOS-installer/*.dmg + Windows-installer/*.exe *-autobuild-package.xml *-viewer_version.txt diff --git a/build.sh b/build.sh index 806718e077..46a287ea32 100755 --- a/build.sh +++ b/build.sh @@ -82,7 +82,7 @@ installer_Linux() { local package_name="$1" local package_dir="$(build_dir_Linux)/newview/" - local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.bz2\$" + local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.xz\$" # since the additional packages are built after the base package, # sorting oldest first ensures that the unqualified package is returned # even if someone makes a qualified name that duplicates the last word of the base name @@ -170,7 +170,7 @@ pre_build() # This name is consumed by indra/newview/CMakeLists.txt. Make it # absolute because we've had troubles with relative pathnames. abs_build_dir="$(cd "$build_dir"; pwd)" - VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")" + VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.xz")" fi # honor autobuild_configure_parameters same as sling-buildscripts @@ -414,10 +414,10 @@ do fi if [ -d "$build_dir/doxygen/html" ] then - tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html" - python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \ + tar -cJf "$build_dir/viewer-doxygen.tar.xz" --strip-components 3 "$build_dir/doxygen/html" + python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.xz" \ || fatal "Upload of doxygen tarball failed" - metadata+=("$build_dir/viewer-doxygen.tar.bz2") + metadata+=("$build_dir/viewer-doxygen.tar.xz") fi ;; *) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 355f35c558..39f6117c69 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1820,7 +1820,7 @@ if (WINDOWS) if (PACKAGE) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2 + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py @@ -1864,7 +1864,7 @@ if (WINDOWS) ) # temporarily disable packaging of event_host until hg subrepos get # sorted out on the parabuild cluster... - #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2) + #${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz) endif (PACKAGE) elseif (DARWIN) @@ -1984,7 +1984,7 @@ if (LINUX) #endif (NOT USE_BUGSPLAT) add_custom_command( - OUTPUT ${product}.tar.bz2 + OUTPUT ${product}.tar.xz COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py @@ -2038,7 +2038,7 @@ if (LINUX) add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched) if (PACKAGE) - add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2) + add_custom_target(llpackage ALL DEPENDS ${product}.tar.xz) # Make sure we don't run two instances of viewer_manifest.py at the same time. add_dependencies(llpackage copy_l_viewer_manifest) check_message_template(llpackage) @@ -2169,12 +2169,12 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}" - # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.bz2; + # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.xz; # testing a string suffix is painful enough in CMake language that # we'll continue assuming it until forced to generalize. COMMAND "tar" ARGS - "cjf" + "cJf" "${VIEWER_SYMBOL_FILE_CYGWIN}" "-C" "${PARENT_DIRECTORY_CYGWIN}" diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index c7f32d0da9..4de4dc8fc5 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -525,7 +525,7 @@ class Windows_x86_64_Manifest(ViewerManifest): 'secondlife-bin.*', '*_Setup.exe', '*.bat', - '*.tar.bz2'))) + '*.tar.xz'))) with self.prefix(src=os.path.join(pkgdir, "VMP")): # include the compiled launcher scripts so that it gets included in the file_list @@ -1183,9 +1183,9 @@ class Darwin_x86_64_Manifest(ViewerManifest): # causes problems, especially with frameworks: a framework's top # level must contain symlinks into its Versions/Current, which # must itself be a symlink to some specific Versions subdir. - tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.bz2") + tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.xz") print(f'Creating {tarpath} from {self.get_dst_prefix()}') - with tarfile.open(tarpath, mode="w:bz2") as tarball: + with tarfile.open(tarpath, mode="w:xz") as tarball: # Store in the tarball as just 'Second Life Mumble.app' # instead of 'Users/someone/.../newview/Release/Second...' # It's at this point that we rename 'Second Life Release.app' @@ -1272,7 +1272,7 @@ class LinuxManifest(ViewerManifest): self.run_command(['find', self.get_dst_prefix(), '-type', 'f', '-perm', old, '-exec', 'chmod', new, '{}', ';']) - self.package_file = installer_name + '.tar.bz2' + self.package_file = installer_name + '.tar.xz' # temporarily move directory tree so that it has the right # name in the tarfile @@ -1285,10 +1285,10 @@ class LinuxManifest(ViewerManifest): # --numeric-owner hides the username of the builder for # security etc. self.run_command(['tar', '-C', self.get_build_prefix(), - '--numeric-owner', '-cjf', - tempname + '.tar.bz2', installer_name]) + '--numeric-owner', '-cJf', + tempname + '.tar.xz', installer_name]) else: - print("Skipping %s.tar.bz2 for non-Release build (%s)" % \ + print("Skipping %s.tar.xz for non-Release build (%s)" % \ (installer_name, self.args['buildtype'])) finally: self.run_command(["mv", tempname, realname]) From eafe4354a2b9420b143570519cc1196b77afc1d1 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Fri, 12 Apr 2024 21:26:47 +0200 Subject: [PATCH 100/128] Small fix for beacons label for all affected langauges --- indra/newview/skins/default/xui/az/floater_beacons.xml | 2 +- indra/newview/skins/default/xui/fr/floater_beacons.xml | 2 +- indra/newview/skins/default/xui/it/floater_beacons.xml | 2 +- indra/newview/skins/default/xui/ja/floater_beacons.xml | 2 +- indra/newview/skins/default/xui/pl/floater_beacons.xml | 2 +- indra/newview/skins/default/xui/ru/floater_beacons.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/newview/skins/default/xui/az/floater_beacons.xml b/indra/newview/skins/default/xui/az/floater_beacons.xml index 569d019fcb..35be748764 100644 --- a/indra/newview/skins/default/xui/az/floater_beacons.xml +++ b/indra/newview/skins/default/xui/az/floater_beacons.xml @@ -20,7 +20,7 @@ - + Göstərmə istiqaməti: diff --git a/indra/newview/skins/default/xui/fr/floater_beacons.xml b/indra/newview/skins/default/xui/fr/floater_beacons.xml index fb9c894ff5..215b41b5df 100644 --- a/indra/newview/skins/default/xui/fr/floater_beacons.xml +++ b/indra/newview/skins/default/xui/fr/floater_beacons.xml @@ -20,7 +20,7 @@ - + Montrer la direction : diff --git a/indra/newview/skins/default/xui/it/floater_beacons.xml b/indra/newview/skins/default/xui/it/floater_beacons.xml index 80dc19e317..1b8998be82 100644 --- a/indra/newview/skins/default/xui/it/floater_beacons.xml +++ b/indra/newview/skins/default/xui/it/floater_beacons.xml @@ -20,7 +20,7 @@ - + Mostra direzione: diff --git a/indra/newview/skins/default/xui/ja/floater_beacons.xml b/indra/newview/skins/default/xui/ja/floater_beacons.xml index 0c254918b2..841301384d 100644 --- a/indra/newview/skins/default/xui/ja/floater_beacons.xml +++ b/indra/newview/skins/default/xui/ja/floater_beacons.xml @@ -20,7 +20,7 @@ - 天体の方向: + 天体の方向: diff --git a/indra/newview/skins/default/xui/pl/floater_beacons.xml b/indra/newview/skins/default/xui/pl/floater_beacons.xml index f2c2bc2dc5..1598822687 100644 --- a/indra/newview/skins/default/xui/pl/floater_beacons.xml +++ b/indra/newview/skins/default/xui/pl/floater_beacons.xml @@ -20,7 +20,7 @@ - + Pokazuj kierunek: diff --git a/indra/newview/skins/default/xui/ru/floater_beacons.xml b/indra/newview/skins/default/xui/ru/floater_beacons.xml index b1a0adfb72..32228fab75 100644 --- a/indra/newview/skins/default/xui/ru/floater_beacons.xml +++ b/indra/newview/skins/default/xui/ru/floater_beacons.xml @@ -20,7 +20,7 @@ - + Показать направление на: From 5372dfc795ba70e221c969247f7a49b0f640d753 Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 13 Apr 2024 17:46:45 +0100 Subject: [PATCH 101/128] Tab change handler to trigger the rendering flips. --- indra/newview/fspanelface.cpp | 22 ++++++++++++++++++++-- indra/newview/fspanelface.h | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index 195da66b94..ddd1d38ddf 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -592,6 +592,23 @@ void skin_error(int line) LL_ERRS("BuildTool") << "Skin error in line: " << line << LL_ENDL; } +void FSPanelFace::onMatTabChange() +{ + static S32 last_mat = -1; + if( auto curr_mat = getCurrentMaterialType(); curr_mat != last_mat ) + { + LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(); + LLViewerObject* objectp = node ? node->getObject() : NULL; + if(objectp) + { + last_mat = curr_mat; + gSavedSettings.setBOOL("ShowSelectedInBlinnPhong", (curr_mat == MATMEDIA_MATERIAL)); + objectp->markForUpdate(); + objectp->faceMappingChanged(); + } + } +} + BOOL FSPanelFace::postBuild() { // @@ -689,7 +706,7 @@ BOOL FSPanelFace::postBuild() // // hook up callbacks and do setup of all relevant UI elements here // - + mTabsPBRMatMedia->setCommitCallback(boost::bind(&FSPanelFace::onMatTabChange, this)); // common controls and parameters for Blinn-Phong and PBR mBtnCopyFaces->setCommitCallback(boost::bind(&FSPanelFace::onCopyFaces, this)); mBtnPasteFaces->setCommitCallback(boost::bind(&FSPanelFace::onPasteFaces, this)); @@ -852,7 +869,7 @@ BOOL FSPanelFace::postBuild() selectMaterialType(MATMEDIA_MATERIAL); // TODO: add tab switching signal selectMatChannel(MATTYPE_DIFFUSE); // TODO: add tab switching signal selectPBRChannel(PBRTYPE_RENDER_MATERIAL_ID); // TODO: add tab switching signal - + onMatTabChange(); // set up relative to active tab return TRUE; } @@ -958,6 +975,7 @@ void FSPanelFace::onVisibilityChange(BOOL new_visibility) void FSPanelFace::draw() { + // TODO(Beq) why does it have to call applyTE? updateCopyTexButton(); // grab media name/title and update the UI widget diff --git a/indra/newview/fspanelface.h b/indra/newview/fspanelface.h index 342b9c111a..e73a2cb593 100644 --- a/indra/newview/fspanelface.h +++ b/indra/newview/fspanelface.h @@ -348,6 +348,7 @@ public: // Tab controls // public to give functors access -Zi LLTabContainer* mTabsMatChannel; + void onMatTabChange(); private: bool isAlpha() { return mIsAlpha; } From ab2a74bb2d13130725060210c445dac93f29a1ce Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 13 Apr 2024 17:53:38 +0100 Subject: [PATCH 102/128] update call to selectionSetImage with optional boolean "isPBR" This is keyhole surgery, we inject isPBR into selectionMgr so that it can use use a slightly different apply functor when it passes off to dragdrop controller. Nasty, but for now the least intrusive change. --- indra/newview/fspanelface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index ddd1d38ddf..a19c38b09b 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -1026,7 +1026,7 @@ void FSPanelFace::sendTexture() { id = mTextureCtrl->getImageAssetID(); } - if (!LLSelectMgr::getInstance()->selectionSetImage(id)) + if (!LLSelectMgr::getInstance()->selectionSetImage(id, getCurrentMaterialType()==MATMEDIA_PBR) ) { // need to refresh value in texture ctrl refresh(); From e1665ddb4b7f5e4e877e706d9a00a24cf82aff5f Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 13 Apr 2024 18:20:30 +0100 Subject: [PATCH 103/128] remove conditional enabling, we want to be able to add fallbacks --- indra/newview/fspanelface.cpp | 50 +++++++++++++---------------------- 1 file changed, 19 insertions(+), 31 deletions(-) diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index a19c38b09b..f6b8a1bb58 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -1509,10 +1509,7 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) mTabsPBRMatMedia->enableTabButton( mTabsPBRMatMedia->getIndexForPanel( - mTabsPBRMatMedia->getPanelByName("panel_material_type_blinn_phong")), editable && has_faces_without_pbr); - LL_DEBUGS("ENABLEDISABLETOOLS") << "panel_material_type_blinn_phong " << (editable && has_faces_without_pbr) << LL_ENDL; - - const bool has_material = !has_pbr_material; + mTabsPBRMatMedia->getPanelByName("panel_material_type_blinn_phong")), editable ); // only turn on auto-adjust button if there is a media renderer and the media is loaded mBtnAlignMedia->setEnabled(editable); @@ -1535,16 +1532,8 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTEMaterial::getNormalID(normmap_id, identical_norm); LLSelectedTEMaterial::getSpecularID(specmap_id, identical_spec); - if (getCurrentMaterialType() != MATMEDIA_MEDIA) - { - // When selecting an object with a pbr and UI tab is not set, - // set to pbr option, otherwise to a texture (material) - selectMaterialType(has_pbr_material ? MATMEDIA_PBR : MATMEDIA_MATERIAL); - } - - mTabsMatChannel->setEnabled(editable && !has_pbr_material && has_faces_without_pbr); - mTabsPBRChannel->setEnabled(editable && has_pbr_material && !has_faces_without_pbr); - LL_DEBUGS("ENABLEDISABLETOOLS") << "editable " << editable << " has_pbr_material " << has_pbr_material << " has_faces_without_pbr " << has_faces_without_pbr << LL_ENDL; + mTabsMatChannel->setEnabled(editable); + mTabsPBRChannel->setEnabled(editable); mCheckSyncMaterials->setEnabled(editable); mCheckSyncMaterials->setValue(gSavedSettings.getBOOL("SyncMaterialSettings")); @@ -1560,15 +1549,14 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) mColorSwatch->setOriginal(color); mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable); - mColorSwatch->setValid(editable && !has_pbr_material); - LL_DEBUGS("ENABLEDISABLETOOLS") << "mColorSwatch valid " << (editable && !has_pbr_material) << LL_ENDL; - mColorSwatch->setEnabled(editable && !has_pbr_material); - mColorSwatch->setCanApplyImmediately( editable && !has_pbr_material); + mColorSwatch->setValid(editable); + mColorSwatch->setEnabled(editable); + mColorSwatch->setCanApplyImmediately( editable ); F32 transparency = (1.f - color.mV[VALPHA]) * 100.f; mCtrlColorTransp->setValue(editable ? transparency : 0); - mCtrlColorTransp->setEnabled(editable && has_material); - mColorTransPercent->setMouseOpaque(editable && has_material); + mCtrlColorTransp->setEnabled(editable ); + mColorTransPercent->setMouseOpaque(editable ); U8 shiny = 0; // Shiny @@ -1636,10 +1624,10 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) if (identical_diffuse) { mTextureCtrl->setTentative(false); - mTextureCtrl->setEnabled(editable && !has_pbr_material); + mTextureCtrl->setEnabled(editable); mTextureCtrl->setImageAssetID(id); - mComboAlphaMode->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material); - mCtrlMaskCutoff->setEnabled(editable && mIsAlpha && !has_pbr_material); + mComboAlphaMode->setEnabled(editable && mIsAlpha && transparency <= 0.f ); + mCtrlMaskCutoff->setEnabled(editable && mIsAlpha ); mTextureCtrl->setBakeTextureEnabled(true); } @@ -1658,20 +1646,20 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) { // Tentative: multiple selected with different textures mTextureCtrl->setTentative(true); - mTextureCtrl->setEnabled(editable && !has_pbr_material); + mTextureCtrl->setEnabled(editable ); mTextureCtrl->setImageAssetID(id); - mComboAlphaMode->setEnabled(editable && mIsAlpha && transparency <= 0.f && !has_pbr_material); - mCtrlMaskCutoff->setEnabled(editable && mIsAlpha && !has_pbr_material); + mComboAlphaMode->setEnabled(editable && mIsAlpha && transparency <= 0.f ); + mCtrlMaskCutoff->setEnabled(editable && mIsAlpha ); mTextureCtrl->setBakeTextureEnabled(true); } mShinyTextureCtrl->setTentative(!identical_spec); - mShinyTextureCtrl->setEnabled(editable && !has_pbr_material); + mShinyTextureCtrl->setEnabled(editable); mShinyTextureCtrl->setImageAssetID(specmap_id); mBumpyTextureCtrl->setTentative(!identical_norm); - mBumpyTextureCtrl->setEnabled(editable && !has_pbr_material); + mBumpyTextureCtrl->setEnabled(editable ); mBumpyTextureCtrl->setImageAssetID(normmap_id); if (attachment) @@ -1988,7 +1976,7 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTE::getFullbright(fullbright_flag,identical_fullbright); mCheckFullbright->setValue((S32)(fullbright_flag != 0)); - mCheckFullbright->setEnabled(editable && !has_pbr_material); + mCheckFullbright->setEnabled(editable ); mCheckFullbright->setTentative(!identical_fullbright); // TODO: find a better way to do this without relying on the name -Zi @@ -2025,7 +2013,7 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) // TODO: check if repeats per meter even apply to PBR materials -Zi else if (material_selection == MATMEDIA_PBR) { - enabled = editable && has_pbr_material; + enabled = editable; material_type = getCurrentPBRChannel(); } @@ -2080,7 +2068,7 @@ void FSPanelFace::updateUI(bool force_set_values /*false*/) mCtrlRpt->setValue(editable ? repeats : 1.0f); } mCtrlRpt->setTentative(LLSD(repeats_tentative)); - mCtrlRpt->setEnabled(!has_pbr_material && !identical_planar_texgen && enabled); + mCtrlRpt->setEnabled(!identical_planar_texgen && enabled); } // Blinn-Phong Materials From a0271ef77275b3372a851e1e715114526fc7cbef Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 13 Apr 2024 18:55:29 +0100 Subject: [PATCH 104/128] Changes to support applying textures to BlinnPhong when PBR exists We need to inject a flag from the tools floater that reaches the dragdrop tooling overriding the behaviour that by-default applies the texture to the color channel on the PBR mat. This is minimal code but rather horrible for maintenance, suggestions of better options are welcome. --- indra/newview/llselectmgr.cpp | 149 +++++++++++++++++++--------- indra/newview/llselectmgr.h | 2 +- indra/newview/lltooldraganddrop.cpp | 8 +- 3 files changed, 111 insertions(+), 48 deletions(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 0c1b119328..bc519ed7ef 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1919,8 +1919,52 @@ bool LLObjectSelection::applyRestrictedPbrMaterialToTEs(LLViewerInventoryItem* i //----------------------------------------------------------------------------- // selectionSetImage() //----------------------------------------------------------------------------- +// Allow editing of non-PBR materials in-situ +template +struct TextureApplyFunctor : public LLSelectedTEFunctor +{ + LLViewerInventoryItem* mItem; + LLUUID mImageID; + TextureApplyFunctor(LLViewerInventoryItem* item, const LLUUID& id) : mItem(item), mImageID(id) {} + bool apply(LLViewerObject* objectp, S32 te) override + { + if(!objectp || !objectp->permModify()) + { + return false; + } + + if (mItem && objectp->isAttachment()) + { + const LLPermissions& perm = mItem->getPermissions(); + BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + if (!unrestricted) + { + return false; + } + } + + if (mItem) + { + if constexpr (IsPBR) + { + LLToolDragAndDrop::dropTextureOneFace(objectp, te, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null, false); + } + else + { + LLToolDragAndDrop::dropTextureOneFace(objectp, te, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null, false, -2); // -2 means no PBR + } + } + else // not an inventory item + { + objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + } + + return true; + } +}; +// // *TODO: re-arch texture applying out of lltooldraganddrop -bool LLSelectMgr::selectionSetImage(const LLUUID& imageid) +bool LLSelectMgr::selectionSetImage(const LLUUID& imageid, bool isPBR) { // First for (no copy) textures and multiple object selection LLViewerInventoryItem* item = gInventory.getItem(imageid); @@ -1935,60 +1979,73 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid) return false; } - struct f : public LLSelectedTEFunctor - { - LLViewerInventoryItem* mItem; - LLUUID mImageID; - f(LLViewerInventoryItem* item, const LLUUID& id) : mItem(item), mImageID(id) {} - bool apply(LLViewerObject* objectp, S32 te) - { - if(!objectp || !objectp->permModify()) - { - return false; - } + // Allow editing of non-PBR materials in-situ + // struct f : public LLSelectedTEFunctor + // { + // LLViewerInventoryItem* mItem; + // LLUUID mImageID; + // f(LLViewerInventoryItem* item, const LLUUID& id) : mItem(item), mImageID(id) {} + // bool apply(LLViewerObject* objectp, S32 te) + // { + // if(!objectp || !objectp->permModify()) + // { + // return false; + // } - // Might be better to run willObjectAcceptInventory - if (mItem && objectp->isAttachment()) - { - const LLPermissions& perm = mItem->getPermissions(); - BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; - if (!unrestricted) - { - // Attachments are in world and in inventory simultaneously, - // at the moment server doesn't support such a situation. - return false; - } - } + // // Might be better to run willObjectAcceptInventory + // if (mItem && objectp->isAttachment()) + // { + // const LLPermissions& perm = mItem->getPermissions(); + // BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; + // if (!unrestricted) + // { + // // Attachments are in world and in inventory simultaneously, + // // at the moment server doesn't support such a situation. + // return false; + // } + // } - if (mItem) - { - LLToolDragAndDrop::dropTextureOneFace(objectp, - te, - mItem, - LLToolDragAndDrop::SOURCE_AGENT, - LLUUID::null, - false); - } - else // not an inventory item - { - // Texture picker defaults aren't inventory items - // * Don't need to worry about permissions for them - // * Can just apply the texture and be done with it. - objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); - } - - return true; - } - }; + // if (mItem) + // { + // LLToolDragAndDrop::dropTextureOneFace(objectp, + // te, + // mItem, + // LLToolDragAndDrop::SOURCE_AGENT, + // LLUUID::null, + // false); + // } + // else // not an inventory item + // { + // // Texture picker defaults aren't inventory items + // // * Don't need to worry about permissions for them + // // * Can just apply the texture and be done with it. + // objectp->setTEImage(te, LLViewerTextureManager::getFetchedTexture(mImageID, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)); + // } + // return true; + // } + // }; + // if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) { getSelection()->applyNoCopyTextureToTEs(item); } else { - f setfunc(item, imageid); - getSelection()->applyToTEs(&setfunc); + // Allow editing of non-PBR materials in-situ + // f setfunc(item, imageid); + // getSelection()->applyToTEs(&setfunc); + TextureApplyFunctor setfuncPBR(item, imageid); // For PBR textures + TextureApplyFunctor setfuncBP(item, imageid); // For non-PBR textures + if(isPBR) + { + getSelection()->applyToTEs(&setfuncPBR); + } + else + { + getSelection()->applyToTEs(&setfuncBP); + } + // } diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 0902fc1b39..5bea652f10 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -717,7 +717,7 @@ public: void selectionSetDensity(F32 density); void selectionSetRestitution(F32 restitution); void selectionSetMaterial(U8 material); - bool selectionSetImage(const LLUUID& imageid); // could be item or asset id + bool selectionSetImage(const LLUUID& imageid, bool isPBR=true); // inject PBR awareness. bool selectionSetGLTFMaterial(const LLUUID& mat_id); // material id only void selectionSetColor(const LLColor4 &color); void selectionSetColorOnly(const LLColor4 &color); // Set only the RGB channels diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6617f19d6e..6a115f4021 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1467,7 +1467,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, LLUUID asset_id = item->getAssetUUID(); - if (hit_obj->getRenderMaterialID(hit_face).notNull() && !remove_pbr) + if (hit_obj->getRenderMaterialID(hit_face).notNull() && !remove_pbr && tex_channel >= -1) // tex_channel -2 means ignorePBR then treat as -1, don't judge me. { // Overrides require textures to be copy and transfer free LLPermissions item_permissions = item->getPermissions(); @@ -1493,6 +1493,12 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, } return; } + // tex_channel -2 means ignorePBR then treat as -1 + if(tex_channel < -1) + { + tex_channel = -1; + } + // BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id); if (!success) { From 33c4c3a703529e8864fc1d8c18a050adf950f610 Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 13 Apr 2024 21:53:45 +0100 Subject: [PATCH 105/128] Normalize the setting names to have FS prefixes+tweak defaults --- indra/newview/app_settings/settings.xml | 8 +++++--- indra/newview/fspanelface.cpp | 7 ++++--- indra/newview/llface.cpp | 2 +- indra/newview/llfloatertools.cpp | 2 +- indra/newview/llvovolume.cpp | 4 ++-- .../skins/default/xui/en/panel_preferences_firestorm.xml | 8 ++++++++ 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 593c9341ea..a168e10a09 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -17952,10 +17952,10 @@ Change of this parameter will affect the layout of buttons in notification toast Backup 0 - ShowSelectedInBlinnPhong + FSShowSelectedInBlinnPhong Comment - show BlinnPhong while selected + Show BlinnPhong while selected (non-persistent).This setting is driven by the code, not by user Persist 0 Type @@ -17964,6 +17964,8 @@ Change of this parameter will affect the layout of buttons in notification toast 0 Backup 0 + HideFromEditor + 1 ShowSpecificLODInEdit @@ -26563,7 +26565,7 @@ Change of this parameter will affect the layout of buttons in notification toast Value 128578 - UseNewTexturePanel + FSUseNewTexturePanel Backup 1 diff --git a/indra/newview/fspanelface.cpp b/indra/newview/fspanelface.cpp index f6b8a1bb58..89cfd83309 100644 --- a/indra/newview/fspanelface.cpp +++ b/indra/newview/fspanelface.cpp @@ -602,7 +602,7 @@ void FSPanelFace::onMatTabChange() if(objectp) { last_mat = curr_mat; - gSavedSettings.setBOOL("ShowSelectedInBlinnPhong", (curr_mat == MATMEDIA_MATERIAL)); + gSavedSettings.setBOOL("FSShowSelectedInBlinnPhong", (curr_mat == MATMEDIA_MATERIAL)); objectp->markForUpdate(); objectp->faceMappingChanged(); } @@ -866,10 +866,10 @@ BOOL FSPanelFace::postBuild() changePrecision(gSavedSettings.getS32("FSBuildToolDecimalPrecision")); - selectMaterialType(MATMEDIA_MATERIAL); // TODO: add tab switching signal + selectMaterialType(MATMEDIA_PBR); // TODO: add tab switching signal selectMatChannel(MATTYPE_DIFFUSE); // TODO: add tab switching signal selectPBRChannel(PBRTYPE_RENDER_MATERIAL_ID); // TODO: add tab switching signal - onMatTabChange(); // set up relative to active tab + return TRUE; } @@ -5917,6 +5917,7 @@ void FSPanelFace::selectMaterialType(S32 material_type) { mTabsPBRMatMedia->selectTabByName("panel_material_type_blinn_phong"); } + onMatTabChange(); // set up relative to active tab } void FSPanelFace::selectMatChannel(S32 mat_channel) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index ca98eef504..467c7e1d69 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1396,7 +1396,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, // LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial(); // show legacy when editing the fallback materials. - static LLCachedControl showSelectedinBP(gSavedSettings, "ShowSelectedInBlinnPhong"); + static LLCachedControl showSelectedinBP(gSavedSettings, "FSShowSelectedInBlinnPhong"); if( gltf_mat && getViewerObject()->isSelected() && showSelectedinBP ) { gltf_mat = nullptr; diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index d2e9f60dea..ef5b19ba2d 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -239,7 +239,7 @@ BOOL LLFloaterTools::postBuild() { // switchable edit texture/materials panel LLPanel* panel; - if (gSavedSettings.getBOOL("UseNewTexturePanel")) + if (gSavedSettings.getBOOL("FSUseNewTexturePanel")) { mFSPanelFace = new FSPanelFace; panel = mFSPanelFace; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 54cd78fcd6..a6efdab747 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5557,7 +5557,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, llassert(gltf_mat == nullptr || dynamic_cast(te->getGLTFRenderMaterial()) != nullptr); // show legacy when editing the fallback materials. - static LLCachedControl showSelectedinBP(gSavedSettings, "ShowSelectedInBlinnPhong"); + static LLCachedControl showSelectedinBP(gSavedSettings, "FSShowSelectedInBlinnPhong"); if( gltf_mat && facep->getViewerObject()->isSelected() && showSelectedinBP ) { gltf_mat = nullptr; @@ -6796,7 +6796,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial(); // show legacy when editing the fallback materials. - static LLCachedControl showSelectedinBP(gSavedSettings, "ShowSelectedInBlinnPhong"); + static LLCachedControl showSelectedinBP(gSavedSettings, "FSShowSelectedInBlinnPhong"); if( gltf_mat && facep->getViewerObject()->isSelected() && showSelectedinBP ) { gltf_mat = nullptr; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml index 41dda40ed8..ae08cdd5de 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml @@ -1654,6 +1654,14 @@ tool_tip="If enabled, the list of attachments spots in the &Attach to& menus will be sorted alphabetically" name="FSSortAttachmentSpotsAlphabetically" control_name="FSSortAttachmentSpotsAlphabetically"/> + From c1fe6d41ba5072dd74d020e32a8738654740e816 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 14 Apr 2024 01:15:53 +0200 Subject: [PATCH 106/128] Tiny fix for stat bar name --- indra/newview/skins/default/xui/az/floater_scene_load_stats.xml | 2 +- indra/newview/skins/default/xui/fr/floater_scene_load_stats.xml | 2 +- indra/newview/skins/default/xui/ja/floater_scene_load_stats.xml | 2 +- indra/newview/skins/default/xui/pl/floater_scene_load_stats.xml | 2 +- indra/newview/skins/default/xui/ru/floater_scene_load_stats.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/skins/default/xui/az/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/az/floater_scene_load_stats.xml index 863f3de86e..e7b294d810 100644 --- a/indra/newview/skins/default/xui/az/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/az/floater_scene_load_stats.xml @@ -20,7 +20,7 @@ - + diff --git a/indra/newview/skins/default/xui/fr/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/fr/floater_scene_load_stats.xml index c0bf186b60..9dfe297f1f 100644 --- a/indra/newview/skins/default/xui/fr/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/fr/floater_scene_load_stats.xml @@ -18,7 +18,7 @@ - + diff --git a/indra/newview/skins/default/xui/ja/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/ja/floater_scene_load_stats.xml index 43d5223ecc..012d3be418 100644 --- a/indra/newview/skins/default/xui/ja/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/ja/floater_scene_load_stats.xml @@ -17,7 +17,7 @@ - + diff --git a/indra/newview/skins/default/xui/pl/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/pl/floater_scene_load_stats.xml index ff44390971..1914070704 100644 --- a/indra/newview/skins/default/xui/pl/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/pl/floater_scene_load_stats.xml @@ -17,7 +17,7 @@ - + diff --git a/indra/newview/skins/default/xui/ru/floater_scene_load_stats.xml b/indra/newview/skins/default/xui/ru/floater_scene_load_stats.xml index d491033512..6f52136f20 100644 --- a/indra/newview/skins/default/xui/ru/floater_scene_load_stats.xml +++ b/indra/newview/skins/default/xui/ru/floater_scene_load_stats.xml @@ -20,7 +20,7 @@ - + From 0bacc8d3dd72c7add52ba469be9e1263ac95b562 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 14 Apr 2024 19:49:03 +0200 Subject: [PATCH 107/128] REvert string name to azure_links_text, as google_links_text already exists, for all affected translations --- .../skins/default/xui/fr/floater_translation_settings.xml | 2 +- .../skins/default/xui/it/floater_translation_settings.xml | 2 +- .../skins/default/xui/pl/floater_translation_settings.xml | 2 +- .../skins/default/xui/ru/floater_translation_settings.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/floater_translation_settings.xml b/indra/newview/skins/default/xui/fr/floater_translation_settings.xml index eaeecd44ed..6808654c31 100644 --- a/indra/newview/skins/default/xui/fr/floater_translation_settings.xml +++ b/indra/newview/skins/default/xui/fr/floater_translation_settings.xml @@ -33,7 +33,7 @@ - + [https://learn.microsoft.com/en-us/azure/cognitive-services/translator/create-translator-resource Guide] Point final : Clé Azure : diff --git a/indra/newview/skins/default/xui/it/floater_translation_settings.xml b/indra/newview/skins/default/xui/it/floater_translation_settings.xml index a123d1350a..01bd08ffbc 100644 --- a/indra/newview/skins/default/xui/it/floater_translation_settings.xml +++ b/indra/newview/skins/default/xui/it/floater_translation_settings.xml @@ -32,7 +32,7 @@ Seleziona il servizio di traduzione: - + [https://learn.microsoft.com/en-us/azure/cognitive-services/translator/create-translator-resource Setup] + + + + + Skalierung + + + U + + + +> + + + + + +> + + + + + +> + + + + + Date: Wed, 17 Apr 2024 11:26:13 +0200 Subject: [PATCH 119/128] Fix type in settings names --- indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a168e10a09..eff7cf9c5e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13580,7 +13580,7 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1.0 - RendeSkyAutoAdjustBlueHorizonScale + RenderSkyAutoAdjustBlueHorizonScale Comment Blue Horizon Scale value to use when auto-adjusting legacy skies @@ -13591,7 +13591,7 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1.0 - RendeSkyAutoAdjustBlueDensityScale + RenderSkyAutoAdjustBlueDensityScale Comment Blue Horizon Scale value to use when auto-adjusting legacy skies From 46e4b1c23f4e6fddbdf38eeac34f9092bca686fb Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 17 Apr 2024 11:26:50 +0200 Subject: [PATCH 120/128] Add missing new settings to list of eligible settings for graphic presets --- .../app_settings/graphic_preset_controls.xml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/indra/newview/app_settings/graphic_preset_controls.xml b/indra/newview/app_settings/graphic_preset_controls.xml index 87c653c43a..4cdf8e94c3 100644 --- a/indra/newview/app_settings/graphic_preset_controls.xml +++ b/indra/newview/app_settings/graphic_preset_controls.xml @@ -19,29 +19,55 @@ RenderAvatarMaxComplexity RenderAvatarMaxNonImpostors RenderAvatarPhysicsLODFactor + RenderCloudShadowAmbianceFactor RenderCompressTextures RenderDeferredSSAO RenderDepthOfField RenderDepthOfFieldInEditMode + RenderDisablePostProcessing + RenderPostProcessingHDR + RenderDefaultProbeUpdatePeriod RenderDynamicExposureCoefficient RenderExposure RenderFarClip RenderFlexTimeFactor RenderFSAASamples RenderGlow + RenderGlowHDR RenderGlowIterations + RenderGlowNoise RenderGlowResolutionPow RenderLocalLightCount RenderMaxPartCount + RenderMaxVRAMBudget RenderQualityPerformance RenderReflectionsEnabled + RenderReflectionProbeAmbiance RenderReflectionProbeDetail + RenderReflectionProbeDrawDistance RenderReflectionProbeLevel + RenderReflectionProbeMaxLocalLightAmbiance + RenderReflectionProbeResolution + RenderReflectionProbeVolumes RenderScreenSpaceReflections + RenderScreenSpaceReflectionIterations + RenderScreenSpaceReflectionRayStep + RenderScreenSpaceReflectionDistanceBias + RenderScreenSpaceReflectionDepthRejectBias + RenderScreenSpaceReflectionAdaptiveStepMultiplier + RenderScreenSpaceReflectionGlossySamples RenderShaderLightingMaxLevel RenderShadowDetail RenderShadowResolutionScale + RenderSkyAmbientScale + RenderSkyAutoAdjustAmbientScale + RenderSkyAutoAdjustBlueDensityScale + RenderSkyAutoAdjustBlueHorizonScale + RenderSkyAutoAdjustSunColorScale + RenderSkyAutoAdjustHDRScale RenderSkyAutoAdjustLegacy + RenderSkyAutoAdjustProbeAmbiance + RenderSkySunlightScale RenderSSAOIrradianceScale RenderSSAOIrradianceMax RenderSunDynamicRange From ac064c933624a0497a081c49486f1dcbf29b0662 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 17 Apr 2024 11:33:21 +0200 Subject: [PATCH 121/128] Update German translation --- .../skins/default/xui/de/panel_fs_tools_texture.xml | 8 ++++++-- .../skins/default/xui/en/panel_fs_tools_texture.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/de/panel_fs_tools_texture.xml b/indra/newview/skins/default/xui/de/panel_fs_tools_texture.xml index d84098c060..16f3da7d54 100644 --- a/indra/newview/skins/default/xui/de/panel_fs_tools_texture.xml +++ b/indra/newview/skins/default/xui/de/panel_fs_tools_texture.xml @@ -18,6 +18,7 @@ +