summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-09-05 18:25:51 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-09-05 18:25:51 -0400
commit201d9853f9d57efab9b819ff07745141a5265e98 (patch)
treecadd8f7bc09f8b5eb096f693b04fb2e68120da93 /indra
parent825cc7873251ad90720ab40221d689abed7b2ac8 (diff)
Debug display for baked vs. composite status, via setting DebugAvatarCompositeBaked
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llviewerjointmesh.cpp5
-rwxr-xr-xindra/newview/llviewerjointmesh.h1
-rwxr-xr-xindra/newview/llvoavatar.cpp20
4 files changed, 33 insertions, 4 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 69986af83b..674685f3bc 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1949,6 +1949,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>DebugAvatarCompositeBaked</key>
+ <map>
+ <key>Comment</key>
+ <string>Colorize avatar meshes based on baked/composite state.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DebugBeaconLineWidth</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 5d1aa870a3..c3f8f42a2a 100755
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -219,6 +219,11 @@ void LLViewerJointMesh::setColor( F32 red, F32 green, F32 blue, F32 alpha )
mColor[3] = alpha;
}
+void LLViewerJointMesh::setColor( const LLColor4& color )
+{
+ mColor = color;
+}
+
//--------------------------------------------------------------------
// LLViewerJointMesh::getTexture()
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index dd5dae1dc1..630981b4a0 100755
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -99,6 +99,7 @@ public:
// Sets the shape color
void setColor( F32 red, F32 green, F32 blue, F32 alpha );
+ void setColor( const LLColor4& color );
// Sets the shininess
void setSpecular( const LLColor4& color, F32 shiny ) { /*mSpecular = color;*/ mShiny = shiny; };
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 4894f21e67..d92caf1edb 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5763,7 +5763,7 @@ BOOL LLVOAvatar::loadMeshNodes()
// If this isn't set to white (1.0), avatars will *ALWAYS* be darker than their surroundings.
// Do not touch!!!
- mesh->setColor( 1.0f, 1.0f, 1.0f, 1.0f );
+ mesh->setColor( LLColor4::white );
LLPolyMesh *poly_mesh = NULL;
@@ -6503,7 +6503,7 @@ void LLVOAvatar::onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL
LLColor4 color = mTexHairColor->getColor();
for (U32 i = 0; i < mBakedTextureDatas[BAKED_HAIR].mMeshes.size(); i++)
{
- mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( color.mV[VX], color.mV[VY], color.mV[VZ], color.mV[VW] );
+ mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( color );
}
}
}
@@ -6764,6 +6764,10 @@ void LLVOAvatar::updateMeshTextures()
for (U32 k=0; k < mBakedTextureDatas[i].mMeshes.size(); k++)
{
mBakedTextureDatas[i].mMeshes[k]->setTexture( baked_img );
+ if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ {
+ mBakedTextureDatas[i].mMeshes[k]->setColor(LLColor4::red);
+ }
}
}
else if (!mUseLocalAppearance && is_layer_baked[i])
@@ -6794,6 +6798,10 @@ void LLVOAvatar::updateMeshTextures()
for (U32 k=0; k < mBakedTextureDatas[i].mMeshes.size(); k++)
{
mBakedTextureDatas[i].mMeshes[k]->setLayerSet( mBakedTextureDatas[i].mTexLayerSet );
+ if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ {
+ mBakedTextureDatas[i].mMeshes[k]->setColor( LLColor4::yellow );
+ }
}
}
}
@@ -6807,7 +6815,7 @@ void LLVOAvatar::updateMeshTextures()
LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 );
for (U32 i = 0; i < mBakedTextureDatas[BAKED_HAIR].mMeshes.size(); i++)
{
- mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( color.mV[VX], color.mV[VY], color.mV[VZ], color.mV[VW] );
+ mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( color );
mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setTexture( hair_img );
}
}
@@ -7721,6 +7729,10 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
for (U32 k = 0; k < mBakedTextureDatas[i].mMeshes.size(); k++)
{
mBakedTextureDatas[i].mMeshes[k]->setTexture( image_baked );
+ if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ {
+ mBakedTextureDatas[i].mMeshes[k]->setColor( LLColor4::green );
+ }
}
if (mBakedTextureDatas[i].mTexLayerSet)
{
@@ -7741,7 +7753,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id )
{
for (U32 i = 0; i < mBakedTextureDatas[BAKED_HAIR].mMeshes.size(); i++)
{
- mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( 1.f, 1.f, 1.f, 1.f );
+ mBakedTextureDatas[BAKED_HAIR].mMeshes[i]->setColor( LLColor4::white );
}
}
}