summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rwxr-xr-xindra/newview/llviewerobject.cpp54
1 files changed, 34 insertions, 20 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 0842526e9e..d56df96c44 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -530,6 +530,17 @@ void LLViewerObject::setNameValueList(const std::string& name_value_list)
}
}
+void LLViewerObject::setSelected(BOOL sel)
+{
+ mUserSelected = sel;
+ resetRot();
+
+ if (!sel)
+ {
+ setAllTESelected(false);
+ }
+}
+
// This method returns true if the object is over land owned by the
// agent.
bool LLViewerObject::isReturnable()
@@ -4117,14 +4128,8 @@ S32 LLViewerObject::setTENormalMapCore(const U8 te, LLViewerTexture *image)
{
mat->setNormalID(uuid);
}
-
- setChanged(TEXTURE);
- if (mDrawable.notNull())
- {
- gPipeline.markTextured(mDrawable);
- }
}
- mTENormalMaps[te] = image;
+ changeTENormalMap(te,image);
return retval;
}
@@ -4146,13 +4151,8 @@ S32 LLViewerObject::setTESpecularMapCore(const U8 te, LLViewerTexture *image)
{
mat->setSpecularID(uuid);
}
- setChanged(TEXTURE);
- if (mDrawable.notNull())
- {
- gPipeline.markTextured(mDrawable);
- }
}
- mTESpecularMaps[te] = image;
+ changeTESpecularMap(te, image);
return retval;
}
@@ -4172,6 +4172,11 @@ void LLViewerObject::changeTENormalMap(S32 index, LLViewerTexture* new_image)
{
return ;
}
+ setChanged(TEXTURE);
+ if (mDrawable.notNull())
+ {
+ gPipeline.markTextured(mDrawable);
+ }
mTENormalMaps[index] = new_image ;
}
@@ -4181,6 +4186,11 @@ void LLViewerObject::changeTESpecularMap(S32 index, LLViewerTexture* new_image)
{
return ;
}
+ setChanged(TEXTURE);
+ if (mDrawable.notNull())
+ {
+ gPipeline.markTextured(mDrawable);
+ }
mTESpecularMaps[index] = new_image ;
}
@@ -4376,19 +4386,22 @@ S32 LLViewerObject::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID
<< ", material " << pMaterialID
<< LL_ENDL;
}
- else if (pMaterialID != tep->getMaterialID())
+ //else if (pMaterialID != tep->getMaterialID())
{
LL_DEBUGS("Material") << "Changing texture entry for te " << (S32)te
<< ", object " << mID
<< ", material " << pMaterialID
<< LL_ENDL;
retval = LLPrimitive::setTEMaterialID(te, pMaterialID);
+ }
+ // Kitty would like to know if this is necessary?
+ // Since we should get a setTEMaterialParams that does it anyway?
+ //
setChanged(TEXTURE);
- if (mDrawable.notNull() && retval)
+ if (mDrawable.notNull())
{
gPipeline.markTextured(mDrawable);
}
- }
return retval;
}
@@ -4399,9 +4412,9 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
if (!tep)
{
llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl;
+ return 0;
}
- else if (pMaterialParams != tep->getMaterialParams())
- {
+
retval = LLPrimitive::setTEMaterialParams(te, pMaterialParams);
LL_DEBUGS("Material") << "Changing material params for te " << (S32)te
<< ", object " << mID
@@ -4409,12 +4422,13 @@ S32 LLViewerObject::setTEMaterialParams(const U8 te, const LLMaterialPtr pMateri
<< LL_ENDL;
setTENormalMap(te, tep->getMaterialParams()->getNormalID());
setTESpecularMap(te, tep->getMaterialParams()->getSpecularID());
+
setChanged(TEXTURE);
- if (mDrawable.notNull() && retval)
+ if (mDrawable.notNull())
{
gPipeline.markTextured(mDrawable);
}
- }
+
return retval;
}