diff options
9 files changed, 60 insertions, 28 deletions
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 18db60705b..deef85cc6c 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -38,7 +38,7 @@ #include "lltexturectrl.h" #include "lluictrlfactory.h" #include "llviewerobjectlist.h" -#include "llvoavatar.h" +#include "llvoavatarself.h" using namespace LLVOAvatarDefines; @@ -82,14 +82,17 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture(te); if (tex_entry->mIsLocalTexture) { - const EWearableType wearable_type = tex_entry->mWearableType; - LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); - if (wearable) + if (avatarp->isSelf()) { - LLLocalTextureObject *lto = wearable->getLocalTextureObject(te); - if (lto) + const EWearableType wearable_type = tex_entry->mWearableType; + LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); + if (wearable) { - id = lto->getID(); + LLLocalTextureObject *lto = wearable->getLocalTextureObject(te); + if (lto) + { + id = lto->getID(); + } } } } @@ -101,12 +104,12 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, if (id == IMG_DEFAULT_AVATAR) { ctrl->setImageAssetID(LLUUID::null); - ctrl->setToolTip(std::string("IMG_DEFAULT_AVATAR")); + ctrl->setToolTip(tex_entry->mName + " : " + std::string("IMG_DEFAULT_AVATAR")); } else { ctrl->setImageAssetID(id); - ctrl->setToolTip(id.asString()); + ctrl->setToolTip(tex_entry->mName + " : " + id.asString()); } } @@ -160,37 +163,43 @@ void LLFloaterAvatarTextures::onClickDump(void* data) LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data; LLVOAvatar* avatarp = find_avatar(self->mID); if (!avatarp) return; - for (S32 i = 0; i < avatarp->getNumTEs(); i++) { const LLTextureEntry* te = avatarp->getTE(i); if (!te) continue; + const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)(i)); + if (!tex_entry) + continue; + if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i)) { LLUUID id = IMG_DEFAULT_AVATAR; EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); - LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); - if (wearable) + if (avatarp->isSelf()) { - LLLocalTextureObject *lto = wearable->getLocalTextureObject(i); - if (lto) + 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; + llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << id << llendl; } else { - llinfos << "Avatar TE " << i << " id " << "<DEFAULT>" << llendl; + llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << "<DEFAULT>" << llendl; } } else { - llinfos << "Avatar TE " << i << " id " << te->getID() << llendl; + llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << llendl; } } } diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 3f4dab4fea..e489a12513 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -166,12 +166,13 @@ void LLTexLayerSetBuffer::popProjection() const BOOL LLTexLayerSetBuffer::needsRender() { - const LLVOAvatarSelf* avatar = mTexLayerSet->getAvatar(); + llassert(mTexLayerSet->getAvatar() == gAgentAvatarp); + if (!isAgentAvatarValid()) return FALSE; BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgentQueryManager.hasNoPendingQueries(); - BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating; + BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating; if (needs_update) { - BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT); + BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT); if (invalid_skirt) { // we were trying to create a skirt texture @@ -181,7 +182,6 @@ BOOL LLTexLayerSetBuffer::needsRender() } else { - needs_update &= (avatar->isSelf() || (avatar->isVisible() && !avatar->isCulled())); needs_update &= mTexLayerSet->isLocalTextureDataAvailable(); } } diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml index 54b6edb0ec..e30e958543 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="650" + height="660" layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" title="AVATAR TEXTURES" - width="1250"> + width="1253"> <floater.string name="InvalidAvatar"> INVALID AVATAR diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index c5b31c7f63..b46b62ec4d 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -72,7 +72,7 @@ function="Avatar.EnableFreezeEject"/> </menu_item_call> <menu_item_call - label="Debug" + label="Debug Textures" name="Debug..."> <menu_item_call.on_click function="Avatar.Debug" /> diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 281ec5a7c3..5c30b9ee94 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -99,5 +99,12 @@ function="ShowAgentProfile" parameter="agent" /> </menu_item_call> - + <menu_item_call + label="Debug Textures" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index ac9101cfd9..276b5f106f 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -72,7 +72,7 @@ function="Avatar.EnableFreezeEject"/> </menu_item_call> <menu_item_call - label="Debug" + label="Debug Textures" name="Debug..."> <menu_item_call.on_click function="Avatar.Debug" /> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index 1e32cfd9df..a21c1ac44b 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -215,4 +215,12 @@ function="ShowAgentProfile" parameter="agent" /> </menu_item_call> + <menu_item_call + label="Debug Textures" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml index a5ac5f76e1..334decdf58 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml @@ -89,7 +89,7 @@ function="InspectAvatar.VisibleFreezeEject"/> </menu_item_call> <menu_item_call - label="Debug" + label="Debug Textures" name="debug"> <menu_item_call.on_click function="Avatar.Debug"/> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index 9dc2611663..03bd93e271 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -45,4 +45,12 @@ function="SideTray.PanelPeopleTab" parameter="groups_panel" /> </menu_item_call> + <menu_item_call + label="Debug Textures" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> </menu> |