@@ -1730,18 +1730,21 @@ struct LLSelectMgrSendFunctor : public LLSelectedObjectFunctor
1730
1730
1731
1731
struct LLSelectMgrAlphaGammaBypassFunctor : public LLSelectedObjectFunctor
1732
1732
{
1733
+ LLSelectMgrAlphaGammaBypassFunctor (bool agent_in_group) : mAgentInGroup (agent_in_group) {}
1734
+
1733
1735
virtual bool apply (LLViewerObject* object)
1734
1736
{
1735
1737
if (object->permModify ())
1736
1738
{
1737
1739
object->sendTEUpdate ();
1738
1740
}
1739
- else if (object->permYouOwner ())
1741
+ else if (object->permYouOwner () || (object-> permGroupOwner () && mAgentInGroup ) )
1740
1742
{
1741
1743
LLSelectMgr::packAlphaGammaBypass (object);
1742
1744
}
1743
1745
return true ;
1744
1746
}
1747
+ bool mAgentInGroup { false };
1745
1748
};
1746
1749
1747
1750
void LLObjectSelection::applyNoCopyTextureToTEs (LLViewerInventoryItem* item)
@@ -2340,24 +2343,30 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id)
2340
2343
2341
2344
void LLSelectMgr::selectionSetAlphaGamma (U8 gamma)
2342
2345
{
2346
+ LLUUID owner_id;
2347
+ std::string owner_name;
2348
+ LLSelectMgr::getInstance ()->selectGetOwner (owner_id, owner_name);
2349
+ bool agent_in_group = gAgent .isInGroup (owner_id);
2350
+
2343
2351
struct f : public LLSelectedTEFunctor
2344
2352
{
2345
2353
U8 mAlphaGamma ;
2346
- f (const U8 &t) : mAlphaGamma (t) {}
2354
+ f (const U8 &t, bool agent_in_group ) : mAlphaGamma (t), mAgentInGroup (agent_in_group ) {}
2347
2355
bool apply (LLViewerObject *object, S32 te)
2348
2356
{
2349
2357
bool can_modify = object->permModify ();
2350
- if (can_modify || object->permYouOwner ())
2358
+ if (can_modify || object->permYouOwner () || (object-> permGroupOwner () && mAgentInGroup ) )
2351
2359
{
2352
2360
// update viewer side color in anticipation of update from simulator
2353
2361
object->setTEAlphaGamma (te, mAlphaGamma );
2354
2362
}
2355
2363
return true ;
2356
2364
}
2357
- } setfunc (gamma);
2365
+ bool mAgentInGroup { false };
2366
+ } setfunc (gamma, agent_in_group);
2358
2367
getSelection ()->applyToTEs (&setfunc);
2359
2368
2360
- LLSelectMgrAlphaGammaBypassFunctor sendfunc;
2369
+ LLSelectMgrAlphaGammaBypassFunctor sendfunc (agent_in_group) ;
2361
2370
getSelection ()->applyToObjects (&sendfunc);
2362
2371
}
2363
2372
0 commit comments