diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index bd8f4cdc88..7d885ce82d 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -133,7 +133,7 @@ const std::string LLSettingsSky::SETTING_SKY_ICE_LEVEL("ice_level"); const std::string LLSettingsSky::SETTING_REFLECTION_PROBE_AMBIANCE("reflection_probe_ambiance"); -const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("3ae23978-ac82-bcf3-a9cb-ba6e52dcb9ad"); +const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("651510b8-5f4d-8991-1592-e7eeab2a5a06"); static const LLUUID DEFAULT_SUN_ID("32bfbcea-24b1-fb9d-1ef9-48a28a63730f"); // dataserver static const LLUUID DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml index 8a1ee35573..3f63cf24f8 100644 --- a/indra/newview/app_settings/logcontrol.xml +++ b/indra/newview/app_settings/logcontrol.xml @@ -74,7 +74,6 @@ Voice Avatar --> - Capabilities import export Outfit diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index acdb1271cc..1ec14a5b21 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14710,6 +14710,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + SelectReflectionProbes + + Comment + Select reflection probes + Persist + 0 + Type + Boolean + Value + 0 + SelectOwnedOnly Comment diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index a3cc939f85..abc9cdbcc2 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -76,6 +76,8 @@ BOOL LLFloaterBulkPermission::postBuild() mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds"); mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures"); mBulkChangeIncludeSettings = gSavedSettings.getBOOL("BulkChangeIncludeSettings"); + mBulkChangeIncludeMaterials = gSavedSettings.getBOOL("BulkChangeIncludeMaterials"); + mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup"); mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy"); mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify"); @@ -188,6 +190,8 @@ void LLFloaterBulkPermission::onCloseBtn() gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds); gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures); gSavedSettings.setBOOL("BulkChangeIncludeSettings", mBulkChangeIncludeSettings); + gSavedSettings.setBOOL("BulkChangeIncludeMaterials", mBulkChangeIncludeMaterials); + gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup); gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy); gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify); @@ -284,6 +288,7 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check) gSavedSettings.setBOOL("BulkChangeIncludeSounds" , check); gSavedSettings.setBOOL("BulkChangeIncludeTextures" , check); gSavedSettings.setBOOL("BulkChangeIncludeSettings" , check); + gSavedSettings.setBOOL("BulkChangeIncludeMaterials" , check); } diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index 1afc876bba..ab5d568667 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -103,6 +103,8 @@ private: bool mBulkChangeIncludeSounds; bool mBulkChangeIncludeTextures; bool mBulkChangeIncludeSettings; + bool mBulkChangeIncludeMaterials; + bool mBulkChangeShareWithGroup; bool mBulkChangeEveryoneCopy; bool mBulkChangeNextOwnerModify; diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 17c6a0436a..e68a0d56f7 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1145,6 +1145,52 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) } } + // *NOTE: The "identical" variable is currently only used to decide if + // the texgen control should be tentative - this is not used by GLTF + // materials. -Cosmic;2022-11-09 + bool identical = true; // true because it is anded below + bool identical_diffuse = false; + bool identical_norm = false; + bool identical_spec = false; + + //LLTextureCtrl *texture_ctrl = getChild("texture control"); + //LLTextureCtrl *shinytexture_ctrl = getChild("shinytexture control"); + //LLTextureCtrl *bumpytexture_ctrl = getChild("bumpytexture control"); + + LLUUID id; + LLUUID normmap_id; + LLUUID specmap_id; + + LLSelectedTE::getTexId(id, identical_diffuse); + LLSelectedTEMaterial::getNormalID(normmap_id, identical_norm); + LLSelectedTEMaterial::getSpecularID(specmap_id, identical_spec); + + static S32 selected_te = -1; + if ((LLToolFace::getInstance() == LLToolMgr::getInstance()->getCurrentTool()) && + !LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected()) + { + S32 new_selection = LLSelectMgr::getInstance()->getSelection()->getFirstNode()->getLastSelectedTE(); + if (new_selection != selected_te) + { + bool te_has_media = objectp->getTE(new_selection) && objectp->getTE(new_selection)->hasMedia(); + bool te_has_pbr = objectp->getRenderMaterialID(new_selection).notNull(); + + if (te_has_pbr && !((mComboMatMedia->getCurrentIndex() == MATMEDIA_MEDIA) && te_has_media)) + { + mComboMatMedia->selectNthItem(MATMEDIA_PBR); + } + else if (te_has_media) + { + mComboMatMedia->selectNthItem(MATMEDIA_MEDIA); + } + else if (id.notNull() || normmap_id.notNull() || specmap_id.notNull()) + { + mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL); + } + selected_te = new_selection; + } + } + mComboMatMedia->setEnabled(editable); //LLRadioGroup* radio_mat_type = getChild("radio_material_type"); @@ -1168,22 +1214,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) updateVisibility(); - // *NOTE: The "identical" variable is currently only used to decide if - // the texgen control should be tentative - this is not used by GLTF - // materials. -Cosmic;2022-11-09 - bool identical = true; // true because it is anded below - bool identical_diffuse = false; - bool identical_norm = false; - bool identical_spec = false; - - //LLTextureCtrl* texture_ctrl = getChild("texture control"); - //LLTextureCtrl* shinytexture_ctrl = getChild("shinytexture control"); - //LLTextureCtrl* bumpytexture_ctrl = getChild("bumpytexture control"); - - LLUUID id; - LLUUID normmap_id; - LLUUID specmap_id; - // Color swatch { getChildView("color label")->setEnabled(editable); @@ -1213,9 +1243,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChild("ColorTrans")->setValue(editable ? transparency : 0); getChildView("ColorTrans")->setEnabled(editable && has_material); - // Specular map - LLSelectedTEMaterial::getSpecularID(specmap_id, identical_spec); - U8 shiny = 0; bool identical_shiny = false; @@ -1281,11 +1308,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) // Texture { - LLSelectedTE::getTexId(id,identical_diffuse); - - // Normal map - LLSelectedTEMaterial::getNormalID(normmap_id, identical_norm); - mIsAlpha = FALSE; LLGLenum image_format = GL_RGB; bool identical_image_format = false; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 76045620d7..edfbe30018 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3817,7 +3817,9 @@ public: } } - if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mPickUnselectable, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) + if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, + (mPickReflectionProbe && vobj->isReflectionProbe()) ? TRUE : mPickTransparent, // always pick transparent when picking selection probe + mPickRigged, mPickUnselectable, mFaceHit, &intersection, mTexCoord, mNormal, mTangent)) { mEnd = intersection; // shorten ray so we only find CLOSER hits if (mIntersection) diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index b09ca58dd8..6325d9dbb7 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -272,7 +272,8 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask) BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask) { mMouseDown = TRUE; - gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build")); + gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build"), FALSE, + gSavedSettings.getBOOL("SelectReflectionProbes"));; return TRUE; } diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 9619867ca1..c8f9cfb2c0 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -71,7 +71,9 @@ BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) // do immediate pick query BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); BOOL pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects"); - mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged); + BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes"); + + mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, FALSE, TRUE, pick_reflection_probe); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 8506ec3e6e..da466c2348 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -10510,6 +10510,18 @@ class LLToolsSelectInvisibleObjects : public view_listener_t } }; +class LLToolsSelectReflectionProbes: public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + BOOL cur_val = gSavedSettings.getBOOL("SelectReflectionProbes"); + + gSavedSettings.setBOOL("SelectReflectionProbes", !cur_val); + + return true; + } +}; + class LLToolsSelectBySurrounding : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -12180,6 +12192,7 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); view_listener_t::addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects"); view_listener_t::addMenu(new LLToolsSelectInvisibleObjects(), "Tools.SelectInvisibleObjects"); + view_listener_t::addMenu(new LLToolsSelectReflectionProbes(), "Tools.SelectReflectionProbes"); view_listener_t::addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); view_listener_t::addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); view_listener_t::addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 357bfd63ea..38e80d6139 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -5338,7 +5338,8 @@ void LLViewerWindow::pickAsync( S32 x, void (*callback)(const LLPickInfo& info), BOOL pick_transparent, BOOL pick_rigged, - BOOL pick_unselectable) + BOOL pick_unselectable, + BOOL pick_reflection_probes) { // "Show Debug Alpha" means no object actually transparent BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); @@ -5348,7 +5349,7 @@ void LLViewerWindow::pickAsync( S32 x, pick_transparent = TRUE; } - LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, TRUE, callback); + LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, pick_reflection_probes, pick_unselectable, TRUE, callback); schedulePick(pick_info); } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 041be00cc2..ea1c0f762f 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -409,8 +409,9 @@ public: void (*callback)(const LLPickInfo& pick_info), BOOL pick_transparent = FALSE, BOOL pick_rigged = FALSE, - BOOL pick_unselectable = FALSE); - LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE, BOOL pick_unselectable = TRUE, BOOL pick_reflection_probe = TRUE); + BOOL pick_unselectable = FALSE, + BOOL pick_reflection_probes = FALSE); + LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE, BOOL pick_unselectable = TRUE, BOOL pick_reflection_probe = FALSE); LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth, LLVector4a* intersection); diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index 095765d4d1..14aeddc588 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -170,6 +170,20 @@ name="icon_setting" tool_tip="Environment settings" left_pad="2" /> + +