diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-06-28 14:23:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 14:23:38 -0700 |
commit | effb14913b7b5fd7024528ccab5df6fa030e7581 (patch) | |
tree | 5d16a9d2c76e888ba94985000f027c8b2c0f0820 /indra/newview/llviewerobject.cpp | |
parent | 79223b63a2d1d5947b7955ebfa79054b897265d9 (diff) | |
parent | f7134beb405cd080765fd5cf905ee6cc503e9074 (diff) |
Merge pull request #260 from secondlife/SL-17405
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/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 628a787b9d..d21d6f7027 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1271,7 +1271,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(); @@ -1827,7 +1827,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, #ifdef DEBUG_UPDATE_TYPE LL_INFOS() << "CompFull:" << getID() << LL_ENDL; #endif - mCostStale = true; + setObjectCostStale(); if (isSelected()) { @@ -3781,6 +3781,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; @@ -6798,7 +6808,7 @@ void LLViewerObject::setPhysicsShapeType(U8 type) if (type != mPhysicsShapeType) { mPhysicsShapeType = type; - mCostStale = true; + setObjectCostStale(); } } @@ -7305,6 +7315,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) |