summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateravatartextures.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloateravatartextures.cpp')
-rw-r--r--indra/newview/llfloateravatartextures.cpp92
1 files changed, 43 insertions, 49 deletions
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 8c7899af3e..18db60705b 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -31,15 +31,14 @@
*/
#include "llviewerprecompiledheaders.h"
-
#include "llfloateravatartextures.h"
+#include "llagent.h"
+#include "llagentwearables.h"
#include "lltexturectrl.h"
-
#include "lluictrlfactory.h"
#include "llviewerobjectlist.h"
#include "llvoavatar.h"
-#include "llagentwearables.h"
using namespace LLVOAvatarDefines;
@@ -75,7 +74,6 @@ void LLFloaterAvatarTextures::draw()
LLFloater::draw();
}
-#if !LL_RELEASE_FOR_DOWNLOAD
static void update_texture_ctrl(LLVOAvatar* avatarp,
LLTextureCtrl* ctrl,
ETextureIndex te)
@@ -132,72 +130,68 @@ static LLVOAvatar* find_avatar(const LLUUID& id)
void LLFloaterAvatarTextures::refresh()
{
- LLVOAvatar *avatarp = find_avatar(mID);
- if (avatarp)
+ if (gAgent.isGodlike())
{
- std::string fullname;
- if (gCacheName->getFullName(avatarp->getID(), fullname))
+ LLVOAvatar *avatarp = find_avatar(mID);
+ if (avatarp)
{
- setTitle(mTitle + ": " + fullname);
+ std::string fullname;
+ if (gCacheName->getFullName(avatarp->getID(), fullname))
+ {
+ setTitle(mTitle + ": " + fullname);
+ }
+ for (U32 i=0; i < TEX_NUM_INDICES; i++)
+ {
+ update_texture_ctrl(avatarp, mTextures[i], ETextureIndex(i));
+ }
}
- for (U32 i=0; i < TEX_NUM_INDICES; i++)
+ else
{
- update_texture_ctrl(avatarp, mTextures[i], ETextureIndex(i));
+ setTitle(mTitle + ": " + getString("InvalidAvatar") + " (" + mID.asString() + ")");
}
}
- else
- {
- setTitle(mTitle + ": " + getString("InvalidAvatar") + " (" + mID.asString() + ")");
- }
}
-#else
-
-void LLFloaterAvatarTextures::refresh()
-{
-}
-
-#endif
-
// static
void LLFloaterAvatarTextures::onClickDump(void* data)
{
-#if !LL_RELEASE_FOR_DOWNLOAD
- LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data;
- LLVOAvatar* avatarp = find_avatar(self->mID);
- if (!avatarp) return;
-
- for (S32 i = 0; i < avatarp->getNumTEs(); i++)
+ if (gAgent.isGodlike())
{
- const LLTextureEntry* te = avatarp->getTE(i);
- if (!te) continue;
+ LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data;
+ LLVOAvatar* avatarp = find_avatar(self->mID);
+ if (!avatarp) return;
- if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i))
+ for (S32 i = 0; i < avatarp->getNumTEs(); i++)
{
- LLUUID id = IMG_DEFAULT_AVATAR;
- EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i);
- LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
- if (wearable)
+ const LLTextureEntry* te = avatarp->getTE(i);
+ if (!te) continue;
+
+ if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i))
{
- LLLocalTextureObject *lto = wearable->getLocalTextureObject(i);
- if (lto)
+ LLUUID id = IMG_DEFAULT_AVATAR;
+ EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i);
+ LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
+ if (wearable)
{
- id = lto->getID();
+ LLLocalTextureObject *lto = wearable->getLocalTextureObject(i);
+ if (lto)
+ {
+ id = lto->getID();
+ }
+ }
+ if (id != IMG_DEFAULT_AVATAR)
+ {
+ llinfos << "Avatar TE " << i << " id " << id << llendl;
+ }
+ else
+ {
+ llinfos << "Avatar TE " << i << " id " << "<DEFAULT>" << llendl;
}
- }
- if (id != IMG_DEFAULT_AVATAR)
- {
- llinfos << "Avatar TE " << i << " id " << id << llendl;
}
else
{
- llinfos << "Avatar TE " << i << " id " << "<DEFAULT>" << llendl;
+ llinfos << "Avatar TE " << i << " id " << te->getID() << llendl;
}
}
- else
- {
- llinfos << "Avatar TE " << i << " id " << te->getID() << llendl;
- }
}
-#endif
}