summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/featuretable_mac.txt6
-rw-r--r--indra/newview/llfetchedgltfmaterial.cpp4
-rw-r--r--indra/newview/llpanelface.cpp6
-rw-r--r--indra/newview/llselectmgr.cpp10
-rw-r--r--indra/newview/lltooldraganddrop.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp69
-rw-r--r--indra/newview/llviewerobject.h3
-rw-r--r--indra/newview/skins/default/xui/en/panel_tools_texture.xml16
8 files changed, 86 insertions, 32 deletions
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index d86412a237..77a9a0d1cf 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -1,4 +1,4 @@
-version 54
+version 55
// The version number above should be incremented IF AND ONLY IF some
// change has been made that is sufficiently important to justify
// resetting the graphics preferences of all users to the recommended
@@ -61,7 +61,7 @@ RenderShaderLightingMaxLevel 1 3
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderUseAdvancedAtmospherics 1 0
-RenderShadowDetail 1 2
+RenderShadowDetail 1 0
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
RenderMaxTextureIndex 1 16
@@ -71,7 +71,7 @@ RenderGLMultiThreadedMedia 1 0
RenderReflectionsEnabled 1 1
RenderReflectionProbeDetail 1 2
RenderScreenSpaceReflections 1 1
-RenderReflectionProbeLevel 1 3
+RenderReflectionProbeLevel 1 0
//
// Low Graphics Settings
diff --git a/indra/newview/llfetchedgltfmaterial.cpp b/indra/newview/llfetchedgltfmaterial.cpp
index 1fb3577dd7..fc9d42bfb6 100644
--- a/indra/newview/llfetchedgltfmaterial.cpp
+++ b/indra/newview/llfetchedgltfmaterial.cpp
@@ -83,11 +83,11 @@ void LLFetchedGLTFMaterial::bind(LLViewerTexture* media_tex)
if (baseColorTex != nullptr)
{
- gGL.getTexUnit(0)->bindFast(baseColorTex);
+ shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, baseColorTex);
}
else
{
- gGL.getTexUnit(0)->bindFast(LLViewerFetchedTexture::sWhiteImagep);
+ shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, LLViewerFetchedTexture::sWhiteImagep);
}
F32 base_color_packed[8];
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index cb28fb4770..9150b89de3 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -113,9 +113,9 @@ const S32 BUMPY_TEXTURE = 18; // use supplied normal map
const S32 SHINY_TEXTURE = 4; // use supplied specular map
const S32 PBRTYPE_RENDER_MATERIAL_ID = 0; // Render Material ID
const S32 PBRTYPE_BASE_COLOR = 1; // PBR Base Color
-const S32 PBRTYPE_NORMAL = 2; // PBR Normal
-const S32 PBRTYPE_METALLIC_ROUGHNESS = 3; // PBR Metallic
-const S32 PBRTYPE_EMISSIVE = 4; // PBR Emissive
+const S32 PBRTYPE_METALLIC_ROUGHNESS = 2; // PBR Metallic
+const S32 PBRTYPE_EMISSIVE = 3; // PBR Emissive
+const S32 PBRTYPE_NORMAL = 4; // PBR Normal
LLGLTFMaterial::TextureInfo texture_info_from_pbrtype(S32 pbr_type)
{
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index c86e43333c..d172a87b1d 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -5830,13 +5830,19 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
}
else
{
+ // save texture data as soon as we get texture perms first time
+ bool save_textures = !node->mValid;
if (node->mInventorySerial != inv_serial && node->getObject())
{
node->getObject()->dirtyInventory();
+
+ // Even if this isn't object's first udpate, inventory changed
+ // and some of the applied textures might have been in inventory
+ // so update texture list.
+ save_textures = true;
}
- // save texture data as soon as we get texture perms first time
- if (!node->mValid)
+ if (save_textures)
{
BOOL can_copy = FALSE;
BOOL can_transfer = FALSE;
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 97be78df77..e7f96239fd 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -961,7 +961,9 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
LLNotificationsUtil::add("ErrorMessage", args);
return FALSE;
}
- if (hit_obj->getInventoryItemByAsset(item->getAssetUUID()))
+ // Make sure to verify both id and type since 'null'
+ // is a shared default for some asset types.
+ if (hit_obj->getInventoryItemByAsset(item->getAssetUUID(), item->getType()))
{
// if the asset is already in the object's inventory
// then it can always be added to a side.
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 22089d3f2b..3b5b986725 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3498,22 +3498,29 @@ void LLViewerObject::removeInventory(const LLUUID& item_id)
++mExpectedInventorySerialNum;
}
-bool LLViewerObject::isAssetInInventory(LLViewerInventoryItem* item)
+bool LLViewerObject::isAssetInInventory(LLViewerInventoryItem* item, LLAssetType::EType type)
{
- bool result = false;
+ bool result = false;
- if (item)
- {
- std::list<LLUUID>::iterator begin = mPendingInventoryItemsIDs.begin();
- std::list<LLUUID>::iterator end = mPendingInventoryItemsIDs.end();
+ if (item)
+ {
+ // For now mPendingInventoryItemsIDs only stores textures and materials
+ // but if it gets to store more types, it will need to verify type as well
+ // since null can be a shared default id and it is fine to need a null
+ // script and a null material simultaneously.
+ std::list<LLUUID>::iterator begin = mPendingInventoryItemsIDs.begin();
+ std::list<LLUUID>::iterator end = mPendingInventoryItemsIDs.end();
- bool is_fetching = std::find(begin, end, item->getAssetUUID()) != end;
- bool is_fetched = getInventoryItemByAsset(item->getAssetUUID()) != NULL;
+ bool is_fetching = std::find(begin, end, item->getAssetUUID()) != end;
- result = is_fetched || is_fetching;
- }
+ // null is the default asset for materials and default for scripts
+ // so need to check type as well
+ bool is_fetched = getInventoryItemByAsset(item->getAssetUUID(), type) != NULL;
- return result;
+ result = is_fetched || is_fetching;
+ }
+
+ return result;
}
void LLViewerObject::updateMaterialInventory(LLViewerInventoryItem* item, U8 key, bool is_new)
@@ -3529,7 +3536,7 @@ void LLViewerObject::updateMaterialInventory(LLViewerInventoryItem* item, U8 key
return;
}
- if (isAssetInInventory(item))
+ if (isAssetInInventory(item, item->getType()))
{
// already there
return;
@@ -3672,6 +3679,44 @@ LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& ass
return rv;
}
+LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& asset_id, LLAssetType::EType type)
+{
+ if (mInventoryDirty)
+ LL_WARNS() << "Peforming inventory lookup for object " << mID << " that has dirty inventory!" << LL_ENDL;
+
+ LLViewerInventoryItem* rv = NULL;
+ if (type == LLAssetType::AT_CATEGORY)
+ {
+ // Whatever called this shouldn't be trying to get a folder by asset
+ // categories don't have assets
+ llassert(0);
+ return rv;
+ }
+
+ if (mInventory)
+ {
+ LLViewerInventoryItem* item = NULL;
+
+ LLInventoryObject::object_list_t::iterator it = mInventory->begin();
+ LLInventoryObject::object_list_t::iterator end = mInventory->end();
+ for (; it != end; ++it)
+ {
+ LLInventoryObject* obj = *it;
+ if (obj->getType() == type)
+ {
+ // *FIX: gank-ass down cast!
+ item = (LLViewerInventoryItem*)obj;
+ if (item->getAssetUUID() == asset_id)
+ {
+ rv = item;
+ break;
+ }
+ }
+ }
+ }
+ return rv;
+}
+
void LLViewerObject::updateViewerInventoryAsset(
const LLViewerInventoryItem* item,
const LLUUID& new_asset)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 80e9247436..80da7b2f73 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -500,6 +500,7 @@ public:
void getInventoryContents(LLInventoryObject::object_list_t& objects);
LLInventoryObject* getInventoryRoot();
LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id);
+ LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id, LLAssetType::EType type);
S16 getInventorySerial() const { return mInventorySerialNum; }
// These functions does viewer-side only object inventory modifications
@@ -639,7 +640,7 @@ public:
private:
void setObjectCostStale();
- bool isAssetInInventory(LLViewerInventoryItem* item);
+ bool isAssetInInventory(LLViewerInventoryItem* item, LLAssetType::EType type);
ExtraParameter* createNewParameterEntry(U16 param_type);
ExtraParameter* getExtraParameterEntry(U16 param_type) const;
diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
index 5b15752eb7..3f4e3e804f 100644
--- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml
+++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml
@@ -217,25 +217,25 @@
height="16"
value="1"/>
<radio_item
- label="Normal"
- layout="topleft"
- top_pad="1"
- height="16"
- name="Normal"
- value="2"/>
- <radio_item
label="Metallic/roughness"
name="Metallic/roughness"
height="16"
layout="topleft"
top_pad="1"
- value="3"/>
+ value="2"/>
<radio_item
label="Emissive"
name="Emissive"
layout="topleft"
top_pad="1"
height="16"
+ value="3"/>
+ <radio_item
+ label="Normal"
+ layout="topleft"
+ top_pad="1"
+ height="16"
+ name="Normal"
value="4"/>
</radio_group>
<menu_button