aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloateravatartextures.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llfloateravatartextures.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloateravatartextures.cpp59
1 files changed, 14 insertions, 45 deletions
diff --git a/linden/indra/newview/llfloateravatartextures.cpp b/linden/indra/newview/llfloateravatartextures.cpp
index f6d985e..e81b5d7 100644
--- a/linden/indra/newview/llfloateravatartextures.cpp
+++ b/linden/indra/newview/llfloateravatartextures.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -39,6 +40,8 @@
39#include "llviewerobjectlist.h" 40#include "llviewerobjectlist.h"
40#include "llvoavatar.h" 41#include "llvoavatar.h"
41 42
43using namespace LLVOAvatarDefines;
44
42LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id) : 45LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id) :
43 LLFloater(std::string("avatar_texture_debug")), 46 LLFloater(std::string("avatar_texture_debug")),
44 mID(id) 47 mID(id)
@@ -67,26 +70,11 @@ LLFloaterAvatarTextures* LLFloaterAvatarTextures::show(const LLUUID &id)
67 70
68BOOL LLFloaterAvatarTextures::postBuild() 71BOOL LLFloaterAvatarTextures::postBuild()
69{ 72{
70 mBakedHead = getChild<LLTextureCtrl>("baked_head"); 73 for (U32 i=0; i < TEX_NUM_INDICES; i++)
71 mBakedEyes = getChild<LLTextureCtrl>("baked_eyes"); 74 {
72 mBakedUpper = getChild<LLTextureCtrl>("baked_upper_body"); 75 const std::string tex_name = LLVOAvatarDictionary::getInstance()->getTexture(ETextureIndex(i))->mName;
73 mBakedLower = getChild<LLTextureCtrl>("baked_lower_body"); 76 mTextures[i] = getChild<LLTextureCtrl>(tex_name);
74 mBakedSkirt = getChild<LLTextureCtrl>("baked_skirt"); 77 }
75 mHair = getChild<LLTextureCtrl>("hair");
76 mMakeup = getChild<LLTextureCtrl>("head_bodypaint");
77 mEye = getChild<LLTextureCtrl>("eye_texture");
78 mShirt = getChild<LLTextureCtrl>("shirt");
79 mUpperTattoo = getChild<LLTextureCtrl>("upper_bodypaint");
80 mUpperJacket = getChild<LLTextureCtrl>("upper_jacket");
81 mGloves = getChild<LLTextureCtrl>("gloves");
82 mUndershirt = getChild<LLTextureCtrl>("undershirt");
83 mPants = getChild<LLTextureCtrl>("pants");
84 mLowerTattoo = getChild<LLTextureCtrl>("lower_bodypaint");
85 mShoes = getChild<LLTextureCtrl>("shoes");
86 mSocks = getChild<LLTextureCtrl>("socks");
87 mJacket = getChild<LLTextureCtrl>("jacket");
88 mUnderpants = getChild<LLTextureCtrl>("underpants");
89 mSkirt = getChild<LLTextureCtrl>("skirt_texture");
90 mTitle = getTitle(); 78 mTitle = getTitle();
91 79
92 childSetAction("Dump", onClickDump, this); 80 childSetAction("Dump", onClickDump, this);
@@ -104,7 +92,7 @@ void LLFloaterAvatarTextures::draw()
104#if !LL_RELEASE_FOR_DOWNLOAD 92#if !LL_RELEASE_FOR_DOWNLOAD
105static void update_texture_ctrl(LLVOAvatar* avatarp, 93static void update_texture_ctrl(LLVOAvatar* avatarp,
106 LLTextureCtrl* ctrl, 94 LLTextureCtrl* ctrl,
107 LLVOAvatar::ETextureIndex te) 95 ETextureIndex te)
108{ 96{
109 LLUUID id = avatarp->getTE(te)->getID(); 97 LLUUID id = avatarp->getTE(te)->getID();
110 if (id == IMG_DEFAULT_AVATAR) 98 if (id == IMG_DEFAULT_AVATAR)
@@ -147,29 +135,10 @@ void LLFloaterAvatarTextures::refresh()
147 { 135 {
148 setTitle(mTitle + ": " + fullname); 136 setTitle(mTitle + ": " + fullname);
149 } 137 }
150 update_texture_ctrl(avatarp, mBakedHead, LLVOAvatar::TEX_HEAD_BAKED); 138 for (U32 i=0; i < TEX_NUM_INDICES; i++)
151 update_texture_ctrl(avatarp, mBakedEyes, LLVOAvatar::TEX_EYES_BAKED); 139 {
152 update_texture_ctrl(avatarp, mBakedUpper, LLVOAvatar::TEX_UPPER_BAKED); 140 update_texture_ctrl(avatarp, mTextures[i], ETextureIndex(i));
153 update_texture_ctrl(avatarp, mBakedLower, LLVOAvatar::TEX_LOWER_BAKED); 141 }
154 update_texture_ctrl(avatarp, mBakedSkirt, LLVOAvatar::TEX_SKIRT_BAKED);
155
156 update_texture_ctrl(avatarp, mMakeup, LLVOAvatar::TEX_HEAD_BODYPAINT);
157 update_texture_ctrl(avatarp, mHair, LLVOAvatar::TEX_HAIR);
158 update_texture_ctrl(avatarp, mEye, LLVOAvatar::TEX_EYES_IRIS);
159
160 update_texture_ctrl(avatarp, mShirt, LLVOAvatar::TEX_UPPER_SHIRT);
161 update_texture_ctrl(avatarp, mUpperTattoo, LLVOAvatar::TEX_UPPER_BODYPAINT);
162 update_texture_ctrl(avatarp, mUpperJacket, LLVOAvatar::TEX_UPPER_JACKET);
163 update_texture_ctrl(avatarp, mGloves, LLVOAvatar::TEX_UPPER_GLOVES);
164 update_texture_ctrl(avatarp, mUndershirt, LLVOAvatar::TEX_UPPER_UNDERSHIRT);
165
166 update_texture_ctrl(avatarp, mPants, LLVOAvatar::TEX_LOWER_PANTS);
167 update_texture_ctrl(avatarp, mLowerTattoo, LLVOAvatar::TEX_LOWER_BODYPAINT);
168 update_texture_ctrl(avatarp, mShoes, LLVOAvatar::TEX_LOWER_SHOES);
169 update_texture_ctrl(avatarp, mSocks, LLVOAvatar::TEX_LOWER_SOCKS);
170 update_texture_ctrl(avatarp, mJacket, LLVOAvatar::TEX_LOWER_JACKET);
171 update_texture_ctrl(avatarp, mUnderpants, LLVOAvatar::TEX_LOWER_UNDERPANTS);
172 update_texture_ctrl(avatarp, mSkirt, LLVOAvatar::TEX_SKIRT);
173 } 142 }
174 else 143 else
175 { 144 {