summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-06-28 09:40:26 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-06-28 12:57:33 -0700
commitf7134beb405cd080765fd5cf905ee6cc503e9074 (patch)
treefc5a37f45b458fd92276e5afb9e5450f2b7314b6 /indra/newview
parentf0dc9ea3fd1b91028cf9c039f646a9da48c41f27 (diff)
SL-17405 (Part 2): Fix viewer not requesting land impact when a non-root prim in a link set gets a GLTF material ID update
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerobject.cpp22
-rw-r--r--indra/newview/llviewerobject.h1
2 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index e67750af7c..004674997b 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1269,7 +1269,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LL_INFOS() << "Full:" << getID() << LL_ENDL;
#endif
//clear cost and linkset cost
- mCostStale = true;
+ setObjectCostStale();
if (isSelected())
{
gFloaterTools->dirty();
@@ -1825,7 +1825,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#ifdef DEBUG_UPDATE_TYPE
LL_INFOS() << "CompFull:" << getID() << LL_ENDL;
#endif
- mCostStale = true;
+ setObjectCostStale();
if (isSelected())
{
@@ -3779,6 +3779,16 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)
}
}
+void LLViewerObject::setObjectCostStale()
+{
+ mCostStale = true;
+ // *NOTE: This is harmlessly redundant for Blinn-Phong material updates, as
+ // the root prim currently gets set stale anyway due to other property
+ // updates. But it is needed for GLTF material ID updates.
+ // -Cosmic,2023-06-27
+ getRootEdit()->mCostStale = true;
+}
+
void LLViewerObject::setObjectCost(F32 cost)
{
mObjectCost = cost;
@@ -6796,7 +6806,7 @@ void LLViewerObject::setPhysicsShapeType(U8 type)
if (type != mPhysicsShapeType)
{
mPhysicsShapeType = type;
- mCostStale = true;
+ setObjectCostStale();
}
}
@@ -7303,6 +7313,12 @@ void LLViewerObject::setRenderMaterialID(S32 te_in, const LLUUID& id, bool updat
LLGLTFMaterialList::queueApply(this, te, id);
}
}
+
+ if (!update_server)
+ {
+ // Land impact may have changed
+ setObjectCostStale();
+ }
}
void LLViewerObject::setRenderMaterialIDs(const LLUUID& id)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index bf82c43cd3..3665c64965 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -637,6 +637,7 @@ public:
std::vector<LLVector3> mUnselectedChildrenPositions ;
private:
+ void setObjectCostStale();
bool isAssetInInventory(LLViewerInventoryItem* item);
ExtraParameter* createNewParameterEntry(U16 param_type);