# Conflicts:
#	indra/newview/app_settings/logcontrol.xml
#	indra/newview/app_settings/settings.xml
#	indra/newview/llpanelface.cpp
#	indra/newview/skins/default/xui/en/menu_viewer.xml
master
Ansariel 2023-08-09 11:05:56 +02:00
commit ed67ca001c
14 changed files with 115 additions and 33 deletions

View File

@ -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

View File

@ -74,7 +74,6 @@
<string>Voice</string>
<string>Avatar</string>
-->
<string>Capabilities</string>
<string>import</string>
<string>export</string>
<string>Outfit</string>

View File

@ -14710,6 +14710,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>SelectReflectionProbes</key>
<map>
<key>Comment</key>
<string>Select reflection probes</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SelectOwnedOnly</key>
<map>
<key>Comment</key>

View File

@ -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);
}

View File

@ -103,6 +103,8 @@ private:
bool mBulkChangeIncludeSounds;
bool mBulkChangeIncludeTextures;
bool mBulkChangeIncludeSettings;
bool mBulkChangeIncludeMaterials;
bool mBulkChangeShareWithGroup;
bool mBulkChangeEveryoneCopy;
bool mBulkChangeNextOwnerModify;

View File

@ -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<LLTextureCtrl>("texture control");
//LLTextureCtrl *shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
//LLTextureCtrl *bumpytexture_ctrl = getChild<LLTextureCtrl>("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<LLRadioGroup>("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<LLTextureCtrl>("texture control");
//LLTextureCtrl* shinytexture_ctrl = getChild<LLTextureCtrl>("shinytexture control");
//LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("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<LLUICtrl>("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;

View File

@ -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)

View File

@ -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;
}

View File

@ -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);

View File

@ -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");

View File

@ -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);
}

View File

@ -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);

View File

@ -170,6 +170,20 @@
name="icon_setting"
tool_tip="Environment settings"
left_pad="2" />
<check_box
control_name="BulkChangeIncludeMaterials"
height="16"
name="check_materials"
top_pad="5"
left="245"
width="16" />
<icon
height="16"
image_name="Inv_Material"
mouse_opaque="true"
name="icon_materials"
tool_tip="Materials"
left_pad="2" />
<button
height="23"
layout="topleft"

View File

@ -2047,6 +2047,15 @@
function="Tools.SelectInvisibleObjects"
parameter="invisible" />
</menu_item_check>
<menu_item_check
label="Select Reflection Probes"
name="Select Reflection Probes">
<menu_item_check.on_check
control="SelectReflectionProbes" />
<menu_item_check.on_click
function="Tools.SelectReflectionProbes"
parameter="reflection_probes" />
</menu_item_check>
<menu_item_check
label="Select By Surrounding"
name="Select By Surrounding">