diff options
author | Neal Orman <nyx@lindenlab.com> | 2009-10-16 17:56:30 +0000 |
---|---|---|
committer | Neal Orman <nyx@lindenlab.com> | 2009-10-16 17:56:30 +0000 |
commit | d08b0b6ae8bcd452a3d707ac153107d0f1523df8 (patch) | |
tree | 3caac3468a18b105e5aa5eb53cd13ed416c1a48d /indra/newview/llfloateravatartextures.cpp | |
parent | 087897b1f837872fc02822595e5dd47fabf3b7e8 (diff) |
merging in new wearable infrastructure to get a step closer to eventually supporting multiple wearables per type. Merge tested and compiles/working on linux and windows - no obvious regressions on appearance or appearance editor. Merge generated no conflicts due to being tested in fresh re-branch in avatar-pipeline/multiple-textures-12. Merge perfomed with following command:
svn merge -r 136489:136510 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/multiple-textures-12 .
Progress can be tracked in DEV-32551.
-Nyx
Diffstat (limited to 'indra/newview/llfloateravatartextures.cpp')
-rw-r--r-- | indra/newview/llfloateravatartextures.cpp | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 3976e25ba4..81d38f8f68 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -39,6 +39,7 @@ #include "lluictrlfactory.h" #include "llviewerobjectlist.h" #include "llvoavatar.h" +#include "llagentwearables.h" using namespace LLVOAvatarDefines; @@ -79,7 +80,18 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, LLTextureCtrl* ctrl, ETextureIndex te) { - LLUUID id = avatarp->getTE(te)->getID(); + LLUUID id = IMG_DEFAULT_AVATAR; + EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType(te); + LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); + if (wearable) + { + LLLocalTextureObject *lto = wearable->getLocalTextureObject(te); + if (lto) + { + id = lto->getID(); + } + } + //id = avatarp->getTE(te)->getID(); if (id == IMG_DEFAULT_AVATAR) { ctrl->setImageAssetID(LLUUID::null); @@ -152,7 +164,32 @@ void LLFloaterAvatarTextures::onClickDump(void* data) const LLTextureEntry* te = avatarp->getTE(i); if (!te) continue; - llinfos << "Avatar TE " << i << " id " << te->getID() << llendl; + 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) + { + 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; + } + } + else + { + llinfos << "Avatar TE " << i << " id " << te->getID() << llendl; + } } #endif } |