# Conflicts:
#	indra/newview/llappviewer.cpp
#	indra/newview/skins/default/xui/en/strings.xml
master
Ansariel 2024-01-09 11:30:13 +01:00
commit cd4883fccc
6 changed files with 48 additions and 29 deletions

View File

@ -3980,7 +3980,6 @@ LLSD LLAppViewer::getViewerInfo() const
//info["NET_BANDWITH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS");
//info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor");
//info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance");
//info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled";
//info["TEXTURE_MEMORY"] = gGLManager.mVRAM;
// </FS>

View File

@ -822,7 +822,7 @@ const F64Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
const F64Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb");
const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("651510b8-5f4d-8991-1592-e7eeab2a5a06");
const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("c46226b4-0e43-5a56-9708-d27ca1df3292");
const LLUUID LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY("cef49723-0292-af49-9b14-9598a616b8a3");
const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("084e26cd-a900-28e8-08d0-64a9de5c15e2");
const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("8a01b97a-cb20-c1ea-ac63-f7ea84ad0090");

View File

@ -1379,10 +1379,23 @@ bool LLMaterialEditor::saveIfNeeded()
LLPermissions local_permissions;
local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
if (mIsOverride)
{
// Shouldn't happen, but just in case it ever changes
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
}
else
{
// Uploads are supposed to use Upload permissions, not material permissions
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Uploads");
U32 group_perm = LLFloaterPerms::getGroupPerms("Uploads");
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Uploads");
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
}
std::string res_desc = buildMaterialDescription();
createInventoryItem(buffer, mMaterialName, res_desc, local_permissions);
@ -2231,7 +2244,7 @@ bool LLMaterialEditor::canModifyObjectsMaterial()
LLSelectedTEGetMatData func(true);
LLPermissions permissions;
LLViewerInventoryItem* item_out;
return can_use_objects_material(func, std::vector({PERM_MODIFY}), ItemSource::OBJECT, permissions, item_out);
return can_use_objects_material(func, std::vector<PermissionBit>({PERM_MODIFY}), ItemSource::OBJECT, permissions, item_out);
}
bool LLMaterialEditor::canSaveObjectsMaterial()
@ -2239,7 +2252,7 @@ bool LLMaterialEditor::canSaveObjectsMaterial()
LLSelectedTEGetMatData func(true);
LLPermissions permissions;
LLViewerInventoryItem* item_out;
return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY}), ItemSource::AGENT, permissions, item_out);
return can_use_objects_material(func, std::vector<PermissionBit>({PERM_COPY, PERM_MODIFY}), ItemSource::AGENT, permissions, item_out);
}
bool LLMaterialEditor::canClipboardObjectsMaterial()
@ -2265,7 +2278,7 @@ bool LLMaterialEditor::canClipboardObjectsMaterial()
LLSelectedTEGetMatData func(true);
LLPermissions permissions;
LLViewerInventoryItem* item_out;
return can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY, PERM_TRANSFER}), ItemSource::OBJECT, permissions, item_out);
return can_use_objects_material(func, std::vector<PermissionBit>({PERM_COPY, PERM_MODIFY, PERM_TRANSFER}), ItemSource::OBJECT, permissions, item_out);
}
void LLMaterialEditor::saveObjectsMaterialAs()
@ -2273,7 +2286,7 @@ void LLMaterialEditor::saveObjectsMaterialAs()
LLSelectedTEGetMatData func(true);
LLPermissions permissions;
LLViewerInventoryItem* item = nullptr;
bool allowed = can_use_objects_material(func, std::vector({PERM_COPY, PERM_MODIFY}), ItemSource::AGENT, permissions, item);
bool allowed = can_use_objects_material(func, std::vector<PermissionBit>({PERM_COPY, PERM_MODIFY}), ItemSource::AGENT, permissions, item);
if (!allowed)
{
LL_WARNS("MaterialEditor") << "Failed to save GLTF material from object" << LL_ENDL;

View File

@ -5385,8 +5385,9 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
bool can_modify = itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgentID); // do we have perm to transfer this material?
bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply material belong to the agent?
bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply material not for sale?
bool from_library = ALEXANDRIA_LINDEN_ID == itemp->getPermissions().getOwner();
if (can_copy && can_transfer && can_modify)
if ((can_copy && can_transfer && can_modify) || from_library)
{
pbr_ctrl->setCanApply(true, true);
return;

View File

@ -2046,26 +2046,30 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
{
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)
{
// Attachments are in world and in inventory simultaneously,
// at the moment server doesn't support such a situation.
return false;
}
}
LLUUID asset_id = mMatId;
if (mItem)
{
// If success, the material may be copied into the object's inventory
BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
if (!success)
const LLPermissions& perm = mItem->getPermissions();
bool from_library = perm.getOwner() == ALEXANDRIA_LINDEN_ID;
if (objectp->isAttachment())
{
bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
if (!unrestricted && !from_library)
{
// Attachments are in world and in inventory simultaneously,
// at the moment server doesn't support such a situation.
return false;
}
}
if (!from_library
// Check if item may be copied into the object's inventory
&& !LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null))
{
return false;
}
asset_id = mItem->getAssetUUID();
if (asset_id.isNull())
{
@ -2081,11 +2085,13 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
};
bool success = true;
if (item &&
(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
if (item
&& (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()) ||
!item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())
))
)
&& item->getPermissions().getOwner() != ALEXANDRIA_LINDEN_ID
)
{
success = success && getSelection()->applyRestrictedPbrMaterialToTEs(item);
}

View File

@ -8574,7 +8574,7 @@ void LLPipeline::doWaterHaze()
else
{
//render water patches like LLDrawPoolWater does
LLGLDepthTest depth(GL_FALSE);
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
gGLLastMatrix = NULL;