#3780 disable water exclusion if user applies PBR or Media
parent
0ec9bfaabd
commit
6b88a2bec2
|
|
@ -3075,10 +3075,7 @@ void LLPanelFace::onCommitHideWater()
|
|||
}
|
||||
else
|
||||
{
|
||||
// reset texture to default plywood
|
||||
LLSelectMgr::getInstance()->selectionSetImage(DEFAULT_OBJECT_TEXTURE);
|
||||
// reset texture repeats, that might be altered by invisiprim script from wiki
|
||||
LLSelectMgr::getInstance()->selectionTexScaleAutofit(2.f);
|
||||
LLSelectMgr::getInstance()->clearWaterExclusion();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1995,7 +1995,7 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
|||
asset_id = BLANK_MATERIAL_ASSET_ID;
|
||||
}
|
||||
}
|
||||
|
||||
objectp->clearTEWaterExclusion(te);
|
||||
// Blank out most override data on the object and send to server
|
||||
objectp->setRenderMaterialID(te, asset_id);
|
||||
|
||||
|
|
@ -2477,6 +2477,7 @@ void LLSelectMgr::selectionSetMedia(U8 media_type, const LLSD &media_data)
|
|||
}
|
||||
else {
|
||||
// Add/update media
|
||||
object->clearTEWaterExclusion(te);
|
||||
object->setTEMediaFlags(te, mMediaFlags);
|
||||
LLVOVolume *vo = dynamic_cast<LLVOVolume*>(object);
|
||||
llassert(NULL != vo);
|
||||
|
|
@ -7724,6 +7725,14 @@ void LLSelectMgr::setAgentHUDZoom(F32 target_zoom, F32 current_zoom)
|
|||
gAgentCamera.mHUDCurZoom = current_zoom;
|
||||
}
|
||||
|
||||
void LLSelectMgr::clearWaterExclusion()
|
||||
{
|
||||
// reset texture to default plywood
|
||||
LLSelectMgr::getInstance()->selectionSetImage(DEFAULT_OBJECT_TEXTURE);
|
||||
// reset texture repeats, that might be altered by invisiprim script from wiki
|
||||
LLSelectMgr::getInstance()->selectionTexScaleAutofit(2.f);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Object selection iterator helpers
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -836,6 +836,7 @@ public:
|
|||
void getAgentHUDZoom(F32 &target_zoom, F32 ¤t_zoom) const;
|
||||
|
||||
void updatePointAt();
|
||||
void clearWaterExclusion();
|
||||
|
||||
// Internal list maintenance functions. TODO: Make these private!
|
||||
void remove(std::vector<LLViewerObject*>& objects);
|
||||
|
|
|
|||
|
|
@ -7682,6 +7682,31 @@ void LLViewerObject::setGLTFAsset(const LLUUID& id)
|
|||
updateVolume(volume_params);
|
||||
}
|
||||
|
||||
void LLViewerObject::clearTEWaterExclusion(const U8 te)
|
||||
{
|
||||
if (permModify())
|
||||
{
|
||||
LLViewerTexture* image = getTEImage(te);
|
||||
if (image && (IMG_ALPHA_GRAD == image->getID()))
|
||||
{
|
||||
// reset texture to default plywood
|
||||
setTEImage(te, LLViewerTextureManager::getFetchedTexture(DEFAULT_OBJECT_TEXTURE, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE));
|
||||
|
||||
// reset texture repeats, that might be altered by invisiprim script from wiki
|
||||
U32 s_axis, t_axis;
|
||||
if (!LLPrimitive::getTESTAxes(te, &s_axis, &t_axis))
|
||||
{
|
||||
return;
|
||||
}
|
||||
F32 DEFAULT_REPEATS = 2.f;
|
||||
F32 new_s = getScale().mV[s_axis] * DEFAULT_REPEATS;
|
||||
F32 new_t = getScale().mV[t_axis] * DEFAULT_REPEATS;
|
||||
|
||||
setTEScale(te, new_s, new_t);
|
||||
sendTEUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ObjectPhysicsProperties : public LLHTTPNode
|
||||
{
|
||||
|
|
|
|||
|
|
@ -405,6 +405,8 @@ public:
|
|||
LLViewerTexture *getTENormalMap(const U8 te) const;
|
||||
LLViewerTexture *getTESpecularMap(const U8 te) const;
|
||||
|
||||
void clearTEWaterExclusion(const U8 te);
|
||||
|
||||
bool isImageAlphaBlended(const U8 te) const;
|
||||
|
||||
void fitFaceTexture(const U8 face);
|
||||
|
|
|
|||
Loading…
Reference in New Issue