EXT-6840 : Miscellaneous Avatar Debug Textures Floater improvements
Changed "Debug" into "Debug Textures" on right-click menu. Added "Debug Textures" to right-click menu for self (so you don't need to CTRL+SHIFT+ALT+A). Prettied up the dump textures console output. Fixed a bug where component textures for yourself were showing up when viewing others (you shouldn't see any component textures when viewing others). Enlarged debug textures floater a bit.meow-7.2.2
parent
dbe288bf8f
commit
88782e7546
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue