Merging in Avatar Pipeline work for Viewer 1.23 (QAR-1272).
No conflicts in the merge. Result of: svn merge -r113372:113479 $branches/avatar-pipeline/avatar-pipeline-merge-r113370 .master
parent
c0af95e18c
commit
6db6d81b0a
|
|
@ -380,6 +380,7 @@ Robin Cornelius
|
|||
VWR-2488
|
||||
VWR-9557
|
||||
Ryozu Kojima
|
||||
VWR-53
|
||||
VWR-287
|
||||
Sammy Frederix
|
||||
VWR-6186
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver
|
|||
const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver
|
||||
const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
|
||||
const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
|
||||
const LLUUID IMG_INVISIBLE ("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); // dataserver
|
||||
|
||||
const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
|
||||
const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
|
||||
|
|
|
|||
|
|
@ -510,10 +510,8 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
|
|||
is_compressed = true;
|
||||
}
|
||||
|
||||
{
|
||||
// LLFastTimer t2(LLFastTimer::FTM_TEMP2);
|
||||
llverify(gGL.getTexUnit(0)->bind(this));
|
||||
}
|
||||
gGL.getTexUnit(0)->bind(this);
|
||||
|
||||
if (mUseMipMaps)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -197,8 +197,8 @@ bool LLTexUnit::bind(LLImageGL* texture, bool forceBind)
|
|||
|
||||
return texture->bindDefaultImage(mIndex);
|
||||
}
|
||||
|
||||
if (texture != NULL && ((mCurrTexture != texture->getTexName()) || forceBind))
|
||||
|
||||
if ((mCurrTexture != texture->getTexName()) || forceBind)
|
||||
{
|
||||
activate();
|
||||
enable(texture->getTarget());
|
||||
|
|
@ -213,9 +213,8 @@ bool LLTexUnit::bind(LLImageGL* texture, bool forceBind)
|
|||
setTextureAddressMode(texture->mAddressMode);
|
||||
setTextureFilteringOption(texture->mFilterOption);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LLTexUnit::bind(LLCubeMap* cubeMap)
|
||||
|
|
@ -224,7 +223,13 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
|
|||
|
||||
gGL.flush();
|
||||
|
||||
if (cubeMap != NULL && mCurrTexture != cubeMap->mImages[0]->getTexName())
|
||||
if (cubeMap == NULL)
|
||||
{
|
||||
llwarns << "NULL LLTexUnit::bind cubemap" << llendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mCurrTexture != cubeMap->mImages[0]->getTexName())
|
||||
{
|
||||
if (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps)
|
||||
{
|
||||
|
|
@ -244,10 +249,11 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
|
|||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Using cube map without extension!" << llendl
|
||||
llwarns << "Using cube map without extension!" << llendl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// LLRenderTarget is unavailible on the mapserver since it uses FBOs.
|
||||
|
|
|
|||
|
|
@ -907,7 +907,7 @@ LLPanel *LLPanel::childGetVisibleTab(const std::string& id) const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void LLPanel::childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata)
|
||||
void LLPanel::childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata, void (*on_precommit)(void*,bool))
|
||||
{
|
||||
LLTabContainer* child = getChild<LLTabContainer>(id);
|
||||
if (child)
|
||||
|
|
@ -917,6 +917,10 @@ void LLPanel::childSetTabChangeCallback(const std::string& id, const std::string
|
|||
{
|
||||
child->setTabChangeCallback(panel, on_tab_clicked);
|
||||
child->setTabUserData(panel, userdata);
|
||||
if (on_precommit)
|
||||
{
|
||||
child->setTabPrecommitChangeCallback(panel, on_precommit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public:
|
|||
// LLTabContainer
|
||||
void childShowTab(const std::string& id, const std::string& tabname, bool visible = true);
|
||||
LLPanel *childGetVisibleTab(const std::string& id) const;
|
||||
void childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata);
|
||||
void childSetTabChangeCallback(const std::string& id, const std::string& tabname, void (*on_tab_clicked)(void*, bool), void *userdata, void (*on_precommit)(void*,bool) = NULL);
|
||||
|
||||
// LLTextBox
|
||||
void childSetWrappedText(const std::string& id, const std::string& text, bool visible = true);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ LLTabContainer::LLTabContainer(const std::string& name, const LLRect& rect, TabP
|
|||
:
|
||||
LLPanel(name, rect, bordered),
|
||||
mCurrentTabIdx(-1),
|
||||
mNextTabIdx(-1),
|
||||
mTabsHidden(FALSE),
|
||||
mScrolled(FALSE),
|
||||
mScrollPos(0),
|
||||
|
|
@ -1150,9 +1151,37 @@ BOOL LLTabContainer::selectTab(S32 which)
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (!selected_tuple->mPrecommitChangeCallback)
|
||||
{
|
||||
return setTab(which);
|
||||
}
|
||||
|
||||
mNextTabIdx = which;
|
||||
selected_tuple->mPrecommitChangeCallback(selected_tuple->mUserData, false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL LLTabContainer::setTab(S32 which)
|
||||
{
|
||||
if (which == -1)
|
||||
{
|
||||
if (mNextTabIdx == -1)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
which = mNextTabIdx;
|
||||
mNextTabIdx = -1;
|
||||
}
|
||||
|
||||
LLTabTuple* selected_tuple = getTab(which);
|
||||
if (!selected_tuple)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL is_visible = FALSE;
|
||||
if (getTab(which)->mButton->getEnabled())
|
||||
if (selected_tuple->mButton->getEnabled())
|
||||
{
|
||||
setCurrentPanelIndex(which);
|
||||
|
||||
|
|
@ -1332,6 +1361,15 @@ void LLTabContainer::setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(v
|
|||
}
|
||||
}
|
||||
|
||||
void LLTabContainer::setTabPrecommitChangeCallback(LLPanel* tab, void (*on_precommit)(void*, bool))
|
||||
{
|
||||
LLTabTuple* tuplep = getTabByPanel(tab);
|
||||
if (tuplep)
|
||||
{
|
||||
tuplep->mPrecommitChangeCallback = on_precommit;
|
||||
}
|
||||
}
|
||||
|
||||
void LLTabContainer::setTabUserData(LLPanel* tab, void* userdata)
|
||||
{
|
||||
LLTabTuple* tuplep = getTabByPanel(tab);
|
||||
|
|
@ -1371,11 +1409,6 @@ void LLTabContainer::onTabBtn( void* userdata )
|
|||
LLTabTuple* tuple = (LLTabTuple*) userdata;
|
||||
LLTabContainer* self = tuple->mTabContainer;
|
||||
self->selectTabPanel( tuple->mTabPanel );
|
||||
|
||||
if( tuple->mOnChangeCallback )
|
||||
{
|
||||
tuple->mOnChangeCallback( tuple->mUserData, true );
|
||||
}
|
||||
|
||||
tuple->mTabPanel->setFocus(TRUE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ public:
|
|||
BOOL selectTabPanel( LLPanel* child );
|
||||
BOOL selectTab(S32 which);
|
||||
BOOL selectTabByName(const std::string& title);
|
||||
BOOL setTab(S32 which);
|
||||
|
||||
BOOL getTabPanelFlashing(LLPanel* child);
|
||||
void setTabPanelFlashing(LLPanel* child, BOOL state);
|
||||
|
|
@ -119,6 +120,7 @@ public:
|
|||
S32 getTopBorderHeight() const;
|
||||
|
||||
void setTabChangeCallback(LLPanel* tab, void (*on_tab_clicked)(void*,bool));
|
||||
void setTabPrecommitChangeCallback(LLPanel* tab, void (*on_precommit)(void*, bool));
|
||||
void setTabUserData(LLPanel* tab, void* userdata);
|
||||
|
||||
void setRightTabBtnOffset( S32 offset );
|
||||
|
|
@ -148,12 +150,14 @@ private:
|
|||
struct LLTabTuple
|
||||
{
|
||||
LLTabTuple( LLTabContainer* c, LLPanel* p, LLButton* b,
|
||||
void (*cb)(void*,bool), void* userdata, LLTextBox* placeholder = NULL )
|
||||
void (*cb)(void*,bool), void* userdata, LLTextBox* placeholder = NULL,
|
||||
void (*pcb)(void*,bool) = NULL)
|
||||
:
|
||||
mTabContainer(c),
|
||||
mTabPanel(p),
|
||||
mButton(b),
|
||||
mOnChangeCallback( cb ),
|
||||
mPrecommitChangeCallback( pcb ),
|
||||
mUserData( userdata ),
|
||||
mOldState(FALSE),
|
||||
mPlaceholderText(placeholder),
|
||||
|
|
@ -164,6 +168,9 @@ private:
|
|||
LLPanel* mTabPanel;
|
||||
LLButton* mButton;
|
||||
void (*mOnChangeCallback)(void*, bool);
|
||||
void (*mPrecommitChangeCallback)(void*,bool); // Precommit callback gets called before tab is changed and
|
||||
// can prevent it from being changed. onChangeCallback is called
|
||||
// immediately after tab is actually changed - Nyx
|
||||
void* mUserData;
|
||||
BOOL mOldState;
|
||||
LLTextBox* mPlaceholderText;
|
||||
|
|
@ -200,6 +207,7 @@ private:
|
|||
tuple_list_t mTabList;
|
||||
|
||||
S32 mCurrentTabIdx;
|
||||
S32 mNextTabIdx;
|
||||
BOOL mTabsHidden;
|
||||
|
||||
BOOL mScrolled;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ set(viewer_SOURCE_FILES
|
|||
llfollowcam.cpp
|
||||
llframestats.cpp
|
||||
llframestatview.cpp
|
||||
llgenepool.cpp
|
||||
llgesturemgr.cpp
|
||||
llgivemoney.cpp
|
||||
llglsandbox.cpp
|
||||
|
|
@ -406,6 +405,7 @@ set(viewer_SOURCE_FILES
|
|||
llvlcomposition.cpp
|
||||
llvlmanager.cpp
|
||||
llvoavatar.cpp
|
||||
llvoavatardefines.cpp
|
||||
llvocache.cpp
|
||||
llvoclouds.cpp
|
||||
llvograss.cpp
|
||||
|
|
@ -605,7 +605,6 @@ set(viewer_HEADER_FILES
|
|||
llfollowcam.h
|
||||
llframestats.h
|
||||
llframestatview.h
|
||||
llgenepool.h
|
||||
llgesturemgr.h
|
||||
llgivemoney.h
|
||||
llgroupmgr.h
|
||||
|
|
@ -810,6 +809,7 @@ set(viewer_HEADER_FILES
|
|||
llvlcomposition.h
|
||||
llvlmanager.h
|
||||
llvoavatar.h
|
||||
llvoavatardefines.h
|
||||
llvocache.h
|
||||
llvoclouds.h
|
||||
llvograss.h
|
||||
|
|
|
|||
|
|
@ -561,17 +561,6 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AvatarCompositeLimit</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Maximum number of avatars to display appearance changes on the fly</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>5</integer>
|
||||
</map>
|
||||
<key>AvatarFeathering</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -6152,6 +6141,17 @@
|
|||
<key>Value</key>
|
||||
<integer>35</integer>
|
||||
</map>
|
||||
<key>RenderAvatarInvisible</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Set your avatar as Invisible</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderAvatarVP</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -9921,6 +9921,17 @@
|
|||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>c80260ba-41fd-8a46-768a-6bf236360e3a</string>
|
||||
</map>
|
||||
<key>UploadBakedTexOld</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Forces the baked texture pipeline to upload using the old method.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>UseAltKeyForMenus</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@
|
|||
#include "llviewerjoystick.h"
|
||||
#include "llfollowcam.h"
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
extern LLMenuBarGL* gMenuBarView;
|
||||
|
||||
//drone wandering constants
|
||||
|
|
@ -207,26 +209,6 @@ const F32 MIN_RADIUS_ALPHA_SIZZLE = 0.5f;
|
|||
|
||||
const F64 CHAT_AGE_FAST_RATE = 3.0;
|
||||
|
||||
const S32 MAX_WEARABLES_PER_LAYERSET = 7;
|
||||
|
||||
const EWearableType WEARABLE_BAKE_TEXTURE_MAP[BAKED_TEXTURE_COUNT][MAX_WEARABLES_PER_LAYERSET] =
|
||||
{
|
||||
{ WT_SHAPE, WT_SKIN, WT_HAIR, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID }, // TEX_HEAD_BAKED
|
||||
{ WT_SHAPE, WT_SKIN, WT_SHIRT, WT_JACKET, WT_GLOVES, WT_UNDERSHIRT, WT_INVALID }, // TEX_UPPER_BAKED
|
||||
{ WT_SHAPE, WT_SKIN, WT_PANTS, WT_SHOES, WT_SOCKS, WT_JACKET, WT_UNDERPANTS }, // TEX_LOWER_BAKED
|
||||
{ WT_EYES, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID }, // TEX_EYES_BAKED
|
||||
{ WT_SKIRT, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID, WT_INVALID } // TEX_SKIRT_BAKED
|
||||
};
|
||||
|
||||
const LLUUID BAKED_TEXTURE_HASH[BAKED_TEXTURE_COUNT] =
|
||||
{
|
||||
LLUUID("18ded8d6-bcfc-e415-8539-944c0f5ea7a6"),
|
||||
LLUUID("338c29e3-3024-4dbb-998d-7c04cf4fa88f"),
|
||||
LLUUID("91b4a2c7-1b1a-ba16-9a16-1f8f8dcc1c3f"),
|
||||
LLUUID("b2cf28af-b840-1071-3c6a-78085d8128b5"),
|
||||
LLUUID("ea800387-ea1a-14e0-56cb-24f2022f969a")
|
||||
};
|
||||
|
||||
// The agent instance.
|
||||
LLAgent gAgent;
|
||||
|
||||
|
|
@ -424,8 +406,8 @@ LLAgent::LLAgent() :
|
|||
mControlsTakenPassedOnCount[i] = 0;
|
||||
}
|
||||
|
||||
mActiveCacheQueries = new S32[BAKED_TEXTURE_COUNT];
|
||||
for (i = 0; i < (U32)BAKED_TEXTURE_COUNT; i++)
|
||||
mActiveCacheQueries = new S32[BAKED_NUM_INDICES];
|
||||
for (i = 0; i < (U32)BAKED_NUM_INDICES; i++)
|
||||
{
|
||||
mActiveCacheQueries[i] = 0;
|
||||
}
|
||||
|
|
@ -5756,11 +5738,11 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
|
|||
mesgsys->getU8Fast(_PREHASH_WearableData, _PREHASH_TextureIndex, texture_index, texture_block);
|
||||
|
||||
if (texture_id.notNull()
|
||||
&& (S32)texture_index < BAKED_TEXTURE_COUNT
|
||||
&& (S32)texture_index < BAKED_NUM_INDICES
|
||||
&& gAgent.mActiveCacheQueries[ texture_index ] == query_id)
|
||||
{
|
||||
//llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl;
|
||||
avatarp->setCachedBakedTexture((LLVOAvatar::ETextureIndex)LLVOAvatar::sBakedTextureIndices[texture_index], texture_id);
|
||||
avatarp->setCachedBakedTexture(getTextureIndex((EBakedTextureIndex)texture_index), texture_id);
|
||||
//avatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id );
|
||||
gAgent.mActiveCacheQueries[ texture_index ] = 0;
|
||||
num_results++;
|
||||
|
|
@ -7053,11 +7035,8 @@ void LLAgent::sendAgentSetAppearance()
|
|||
return;
|
||||
}
|
||||
|
||||
llinfos << "TAT: Sent AgentSetAppearance: " <<
|
||||
(( mAvatarObject->getTEImage( LLVOAvatar::TEX_HEAD_BAKED )->getID() != IMG_DEFAULT_AVATAR ) ? "HEAD " : "head " ) <<
|
||||
(( mAvatarObject->getTEImage( LLVOAvatar::TEX_UPPER_BAKED )->getID() != IMG_DEFAULT_AVATAR ) ? "UPPER " : "upper " ) <<
|
||||
(( mAvatarObject->getTEImage( LLVOAvatar::TEX_LOWER_BAKED )->getID() != IMG_DEFAULT_AVATAR ) ? "LOWER " : "lower " ) <<
|
||||
(( mAvatarObject->getTEImage( LLVOAvatar::TEX_EYES_BAKED )->getID() != IMG_DEFAULT_AVATAR ) ? "EYES" : "eyes" ) << llendl;
|
||||
|
||||
llinfos << "TAT: Sent AgentSetAppearance: " << mAvatarObject->getBakedStatusForPrintout() << llendl;
|
||||
//dumpAvatarTEs( "sendAgentSetAppearance()" );
|
||||
|
||||
LLMessageSystem* msg = gMessageSystem;
|
||||
|
|
@ -7071,7 +7050,7 @@ void LLAgent::sendAgentSetAppearance()
|
|||
// NOTE -- when we start correcting all of the other Havok geometry
|
||||
// to compensate for the COLLISION_TOLERANCE ugliness we will have
|
||||
// to tweak this number again
|
||||
LLVector3 body_size = mAvatarObject->mBodySize;
|
||||
const LLVector3 body_size = mAvatarObject->mBodySize;
|
||||
msg->addVector3Fast(_PREHASH_Size, body_size);
|
||||
|
||||
// To guard against out of order packets
|
||||
|
|
@ -7083,19 +7062,18 @@ void LLAgent::sendAgentSetAppearance()
|
|||
// KLW - TAT this will probably need to check the local queue.
|
||||
BOOL textures_current = !mAvatarObject->hasPendingBakedUploads() && mWearablesLoaded;
|
||||
|
||||
S32 baked_texture_index;
|
||||
for( baked_texture_index = 0; baked_texture_index < BAKED_TEXTURE_COUNT; baked_texture_index++ )
|
||||
for(U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++ )
|
||||
{
|
||||
S32 tex_index = LLVOAvatar::sBakedTextureIndices[baked_texture_index];
|
||||
const ETextureIndex texture_index = getTextureIndex((EBakedTextureIndex)baked_index);
|
||||
|
||||
// if we're not wearing a skirt, we don't need the texture to be baked
|
||||
if (tex_index == LLVOAvatar::TEX_SKIRT_BAKED && !mAvatarObject->isWearingWearableType(WT_SKIRT))
|
||||
if (texture_index == TEX_SKIRT_BAKED && !mAvatarObject->isWearingWearableType(WT_SKIRT))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// IMG_DEFAULT_AVATAR means not baked
|
||||
if (mAvatarObject->getTEImage( tex_index)->getID() == IMG_DEFAULT_AVATAR)
|
||||
if (!mAvatarObject->isTextureDefined(texture_index))
|
||||
{
|
||||
textures_current = FALSE;
|
||||
break;
|
||||
|
|
@ -7106,50 +7084,56 @@ void LLAgent::sendAgentSetAppearance()
|
|||
if (textures_current)
|
||||
{
|
||||
llinfos << "TAT: Sending cached texture data" << llendl;
|
||||
for (baked_texture_index = 0; baked_texture_index < BAKED_TEXTURE_COUNT; baked_texture_index++)
|
||||
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
|
||||
{
|
||||
const LLVOAvatarDictionary::WearableDictionaryEntry *wearable_dict = LLVOAvatarDictionary::getInstance()->getWearable((EBakedTextureIndex)baked_index);
|
||||
LLUUID hash;
|
||||
|
||||
for( S32 wearable_num = 0; wearable_num < MAX_WEARABLES_PER_LAYERSET; wearable_num++ )
|
||||
for (U8 i=0; i < wearable_dict->mWearablesVec.size(); i++)
|
||||
{
|
||||
EWearableType wearable_type = WEARABLE_BAKE_TEXTURE_MAP[baked_texture_index][wearable_num];
|
||||
|
||||
LLWearable* wearable = getWearable( wearable_type );
|
||||
// EWearableType wearable_type = gBakedWearableMap[baked_index][wearable_num];
|
||||
const EWearableType wearable_type = wearable_dict->mWearablesVec[i];
|
||||
const LLWearable* wearable = getWearable(wearable_type);
|
||||
if (wearable)
|
||||
{
|
||||
hash ^= wearable->getID();
|
||||
}
|
||||
}
|
||||
|
||||
if (hash.notNull())
|
||||
{
|
||||
hash ^= BAKED_TEXTURE_HASH[baked_texture_index];
|
||||
hash ^= wearable_dict->mHashID;
|
||||
}
|
||||
|
||||
S32 tex_index = LLVOAvatar::sBakedTextureIndices[baked_texture_index];
|
||||
const ETextureIndex texture_index = getTextureIndex((EBakedTextureIndex)baked_index);
|
||||
|
||||
msg->nextBlockFast(_PREHASH_WearableData);
|
||||
msg->addUUIDFast(_PREHASH_CacheID, hash);
|
||||
msg->addU8Fast(_PREHASH_TextureIndex, (U8)tex_index);
|
||||
msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index);
|
||||
}
|
||||
msg->nextBlockFast(_PREHASH_ObjectData);
|
||||
mAvatarObject->packTEMessage( gMessageSystem );
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the textures aren't baked, send NULL for texture IDs
|
||||
// This means the baked texture IDs on the server will be untouched.
|
||||
// Once all textures are baked, another AvatarAppearance message will be sent to update the TEs
|
||||
msg->nextBlockFast(_PREHASH_ObjectData);
|
||||
gMessageSystem->addBinaryDataFast(_PREHASH_TextureEntry, NULL, 0);
|
||||
}
|
||||
|
||||
msg->nextBlockFast(_PREHASH_ObjectData);
|
||||
mAvatarObject->packTEMessage( gMessageSystem );
|
||||
|
||||
S32 transmitted_params = 0;
|
||||
for (LLViewerVisualParam* param = (LLViewerVisualParam*)mAvatarObject->getFirstVisualParam();
|
||||
param;
|
||||
param = (LLViewerVisualParam*)mAvatarObject->getNextVisualParam())
|
||||
{
|
||||
F32 param_value = param->getWeight();
|
||||
|
||||
if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE)
|
||||
{
|
||||
msg->nextBlockFast(_PREHASH_VisualParam );
|
||||
|
||||
// We don't send the param ids. Instead, we assume that the receiver has the same params in the same sequence.
|
||||
U8 new_weight = F32_to_U8(param_value, param->getMinWeight(), param->getMaxWeight());
|
||||
const F32 param_value = param->getWeight();
|
||||
const U8 new_weight = F32_to_U8(param_value, param->getMinWeight(), param->getMaxWeight());
|
||||
msg->addU8Fast(_PREHASH_ParamValue, new_weight );
|
||||
transmitted_params++;
|
||||
}
|
||||
|
|
@ -7388,8 +7372,6 @@ void LLAgent::setWearableOutfit(
|
|||
wearables[i]->writeToAvatar( TRUE );
|
||||
}
|
||||
|
||||
LLFloaterCustomize::setCurrentWearableType( WT_SHAPE );
|
||||
|
||||
// Start rendering & update the server
|
||||
mWearablesLoaded = TRUE;
|
||||
sendAgentWearablesUpdate();
|
||||
|
|
@ -7511,14 +7493,15 @@ void LLAgent::queryWearableCache()
|
|||
gMessageSystem->addS32Fast(_PREHASH_SerialNum, mTextureCacheQueryID);
|
||||
|
||||
S32 num_queries = 0;
|
||||
for (S32 baked_texture_index = 0; baked_texture_index < BAKED_TEXTURE_COUNT; baked_texture_index++)
|
||||
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++ )
|
||||
{
|
||||
const LLVOAvatarDictionary::WearableDictionaryEntry *wearable_dict = LLVOAvatarDictionary::getInstance()->getWearable((EBakedTextureIndex)baked_index);
|
||||
LLUUID hash;
|
||||
for (S32 wearable_num = 0; wearable_num < MAX_WEARABLES_PER_LAYERSET; wearable_num++)
|
||||
for (U8 i=0; i < wearable_dict->mWearablesVec.size(); i++)
|
||||
{
|
||||
EWearableType wearable_type = WEARABLE_BAKE_TEXTURE_MAP[baked_texture_index][wearable_num];
|
||||
|
||||
LLWearable* wearable = getWearable( wearable_type );
|
||||
// EWearableType wearable_type = gBakedWearableMap[baked_index][wearable_num];
|
||||
const EWearableType wearable_type = wearable_dict->mWearablesVec[i];
|
||||
const LLWearable* wearable = getWearable(wearable_type);
|
||||
if (wearable)
|
||||
{
|
||||
hash ^= wearable->getID();
|
||||
|
|
@ -7526,17 +7509,17 @@ void LLAgent::queryWearableCache()
|
|||
}
|
||||
if (hash.notNull())
|
||||
{
|
||||
hash ^= BAKED_TEXTURE_HASH[baked_texture_index];
|
||||
hash ^= wearable_dict->mHashID;
|
||||
num_queries++;
|
||||
// *NOTE: make sure at least one request gets packed
|
||||
|
||||
//llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_texture_index << llendl;
|
||||
//llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl;
|
||||
gMessageSystem->nextBlockFast(_PREHASH_WearableData);
|
||||
gMessageSystem->addUUIDFast(_PREHASH_ID, hash);
|
||||
gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)baked_texture_index);
|
||||
gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)baked_index);
|
||||
}
|
||||
|
||||
mActiveCacheQueries[ baked_texture_index ] = mTextureCacheQueryID;
|
||||
mActiveCacheQueries[ baked_index ] = mTextureCacheQueryID;
|
||||
}
|
||||
|
||||
llinfos << "Requesting texture cache entry for " << num_queries << " baked textures" << llendl;
|
||||
|
|
@ -7563,7 +7546,7 @@ void LLAgent::userRemoveAllClothes( void* userdata )
|
|||
// We have to do this up front to avoid having to deal with the case of multiple wearables being dirty.
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterCustomize->askToSaveAllIfDirty( LLAgent::userRemoveAllClothesStep2, NULL );
|
||||
gFloaterCustomize->askToSaveIfDirty( LLAgent::userRemoveAllClothesStep2, NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ public:
|
|||
void addParam( S32 id, F32 value ) { mParamMap[id] = value; }
|
||||
F32 getParam( S32 id, F32 defval ) { return get_if_there(mParamMap, id, defval ); }
|
||||
|
||||
void addTexture( S32 te, const LLUUID& uuid ) { if( te < LLVOAvatar::TEX_NUM_ENTRIES ) mTextures[te] = uuid; }
|
||||
const LLUUID& getTexture( S32 te ) { return ( te < LLVOAvatar::TEX_NUM_ENTRIES ) ? mTextures[te] : LLUUID::null; }
|
||||
void addTexture( S32 te, const LLUUID& uuid ) { if( te < LLVOAvatarDefines::TEX_NUM_INDICES ) mTextures[te] = uuid; }
|
||||
const LLUUID& getTexture( S32 te ) { return ( te < LLVOAvatarDefines::TEX_NUM_INDICES ) ? mTextures[te] : LLUUID::null; }
|
||||
|
||||
void clear() { mParamMap.clear(); for( S32 i=0; i<LLVOAvatar::TEX_NUM_ENTRIES; i++ ) mTextures[i].setNull(); }
|
||||
void clear() { mParamMap.clear(); for( S32 i=0; i<LLVOAvatarDefines::TEX_NUM_INDICES; i++ ) mTextures[i].setNull(); }
|
||||
|
||||
typedef std::map<S32, F32> param_map_t;
|
||||
param_map_t mParamMap;
|
||||
LLUUID mTextures[LLVOAvatar::TEX_NUM_ENTRIES];
|
||||
LLUUID mTextures[LLVOAvatarDefines::TEX_NUM_INDICES];
|
||||
};
|
||||
|
||||
#endif // LL_LLAPPEARANCE_H
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#include "llviewerobjectlist.h"
|
||||
#include "llviewermenufile.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lltexlayer.h"
|
||||
|
||||
// When uploading multiple files, don't display any of them when uploading more than this number.
|
||||
static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5;
|
||||
|
|
@ -139,6 +140,7 @@ void LLAssetUploadResponder::result(const LLSD& content)
|
|||
if (mFileName.empty())
|
||||
{
|
||||
// rename the file in the VFS to the actual asset id
|
||||
// llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl;
|
||||
gVFS->renameFile(mVFileID, mAssetType, content["new_asset"].asUUID(), mAssetType);
|
||||
}
|
||||
uploadComplete(content);
|
||||
|
|
@ -332,6 +334,48 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
|
|||
}
|
||||
}
|
||||
|
||||
LLSendTexLayerResponder::LLSendTexLayerResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
LLBakedUploadData * baked_upload_data)
|
||||
: LLAssetUploadResponder(post_data, vfile_id, asset_type),
|
||||
mBakedUploadData(baked_upload_data)
|
||||
{
|
||||
}
|
||||
|
||||
LLSendTexLayerResponder::~LLSendTexLayerResponder()
|
||||
{
|
||||
// mBakedUploadData is normally deleted by calls to LLTexLayerSetBuffer::onTextureUploadComplete() below
|
||||
if (mBakedUploadData)
|
||||
{ // ...but delete it in the case where uploadComplete() is never called
|
||||
delete mBakedUploadData;
|
||||
mBakedUploadData = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Baked texture upload completed
|
||||
void LLSendTexLayerResponder::uploadComplete(const LLSD& content)
|
||||
{
|
||||
LLUUID item_id = mPostData["item_id"];
|
||||
|
||||
std::string result = content["state"];
|
||||
LLUUID new_id = content["new_asset"];
|
||||
|
||||
llinfos << "LLSendTexLayerResponder::result from capabilities: " << result << llendl;
|
||||
if (result == "complete"
|
||||
&& mBakedUploadData != NULL)
|
||||
{ // Invoke
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(new_id, (void*) mBakedUploadData, 0, LL_EXSTAT_NONE);
|
||||
mBakedUploadData = NULL; // deleted in onTextureUploadComplete()
|
||||
}
|
||||
else
|
||||
{ // Invoke the original callback with an error result
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete(new_id, (void*) mBakedUploadData, -1, LL_EXSTAT_NONE);
|
||||
mBakedUploadData = NULL; // deleted in onTextureUploadComplete()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
|
|
|
|||
|
|
@ -71,6 +71,22 @@ public:
|
|||
virtual void uploadComplete(const LLSD& content);
|
||||
};
|
||||
|
||||
class LLBakedUploadData;
|
||||
class LLSendTexLayerResponder : public LLAssetUploadResponder
|
||||
{
|
||||
public:
|
||||
LLSendTexLayerResponder(const LLSD& post_data,
|
||||
const LLUUID& vfile_id,
|
||||
LLAssetType::EType asset_type,
|
||||
LLBakedUploadData * baked_upload_data);
|
||||
|
||||
~LLSendTexLayerResponder();
|
||||
|
||||
virtual void uploadComplete(const LLSD& content);
|
||||
|
||||
LLBakedUploadData * mBakedUploadData;
|
||||
};
|
||||
|
||||
class LLUpdateAgentInventoryResponder : public LLAssetUploadResponder
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
avatarp->renderCollisionVolumes();
|
||||
}
|
||||
|
||||
if (avatarp->mIsSelf && LLAgent::sDebugDisplayTarget)
|
||||
if (avatarp->isSelf() && LLAgent::sDebugDisplayTarget)
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLVector3 pos = avatarp->getPositionAgent();
|
||||
|
|
|
|||
|
|
@ -114,7 +114,12 @@ public:
|
|||
static BOOL sSkipTransparent;
|
||||
};
|
||||
|
||||
|
||||
class LLVertexBufferAvatar : public LLVertexBuffer
|
||||
{
|
||||
public:
|
||||
LLVertexBufferAvatar();
|
||||
virtual void setupVertexBuffer(U32 data_mask) const;
|
||||
};
|
||||
|
||||
extern S32 AVATAR_OFFSET_POS;
|
||||
extern S32 AVATAR_OFFSET_NORMAL;
|
||||
|
|
|
|||
|
|
@ -1041,7 +1041,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture
|
|||
mDummyAvatar->updateJointLODs();
|
||||
mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
|
||||
mDummyAvatar->startMotion(ANIM_AGENT_STAND, BASE_ANIM_TIME_OFFSET);
|
||||
mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE);
|
||||
mDummyAvatar->hideSkirt();
|
||||
gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
|
||||
|
||||
// stop extraneous animations
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
#include "llviewerobjectlist.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
LLFloaterAvatarTextures::LLFloaterAvatarTextures(const LLUUID& id) :
|
||||
LLFloater(std::string("avatar_texture_debug")),
|
||||
mID(id)
|
||||
|
|
@ -68,26 +70,11 @@ LLFloaterAvatarTextures* LLFloaterAvatarTextures::show(const LLUUID &id)
|
|||
|
||||
BOOL LLFloaterAvatarTextures::postBuild()
|
||||
{
|
||||
mBakedHead = getChild<LLTextureCtrl>("baked_head");
|
||||
mBakedEyes = getChild<LLTextureCtrl>("baked_eyes");
|
||||
mBakedUpper = getChild<LLTextureCtrl>("baked_upper_body");
|
||||
mBakedLower = getChild<LLTextureCtrl>("baked_lower_body");
|
||||
mBakedSkirt = getChild<LLTextureCtrl>("baked_skirt");
|
||||
mHair = getChild<LLTextureCtrl>("hair");
|
||||
mMakeup = getChild<LLTextureCtrl>("head_bodypaint");
|
||||
mEye = getChild<LLTextureCtrl>("eye_texture");
|
||||
mShirt = getChild<LLTextureCtrl>("shirt");
|
||||
mUpperTattoo = getChild<LLTextureCtrl>("upper_bodypaint");
|
||||
mUpperJacket = getChild<LLTextureCtrl>("upper_jacket");
|
||||
mGloves = getChild<LLTextureCtrl>("gloves");
|
||||
mUndershirt = getChild<LLTextureCtrl>("undershirt");
|
||||
mPants = getChild<LLTextureCtrl>("pants");
|
||||
mLowerTattoo = getChild<LLTextureCtrl>("lower_bodypaint");
|
||||
mShoes = getChild<LLTextureCtrl>("shoes");
|
||||
mSocks = getChild<LLTextureCtrl>("socks");
|
||||
mJacket = getChild<LLTextureCtrl>("jacket");
|
||||
mUnderpants = getChild<LLTextureCtrl>("underpants");
|
||||
mSkirt = getChild<LLTextureCtrl>("skirt_texture");
|
||||
for (U32 i=0; i < TEX_NUM_INDICES; i++)
|
||||
{
|
||||
const std::string tex_name = LLVOAvatarDictionary::getInstance()->getTexture(ETextureIndex(i))->mName;
|
||||
mTextures[i] = getChild<LLTextureCtrl>(tex_name);
|
||||
}
|
||||
mTitle = getTitle();
|
||||
|
||||
childSetAction("Dump", onClickDump, this);
|
||||
|
|
@ -105,7 +92,7 @@ void LLFloaterAvatarTextures::draw()
|
|||
#if !LL_RELEASE_FOR_DOWNLOAD
|
||||
static void update_texture_ctrl(LLVOAvatar* avatarp,
|
||||
LLTextureCtrl* ctrl,
|
||||
LLVOAvatar::ETextureIndex te)
|
||||
ETextureIndex te)
|
||||
{
|
||||
LLUUID id = avatarp->getTE(te)->getID();
|
||||
if (id == IMG_DEFAULT_AVATAR)
|
||||
|
|
@ -148,29 +135,10 @@ void LLFloaterAvatarTextures::refresh()
|
|||
{
|
||||
setTitle(mTitle + ": " + fullname);
|
||||
}
|
||||
update_texture_ctrl(avatarp, mBakedHead, LLVOAvatar::TEX_HEAD_BAKED);
|
||||
update_texture_ctrl(avatarp, mBakedEyes, LLVOAvatar::TEX_EYES_BAKED);
|
||||
update_texture_ctrl(avatarp, mBakedUpper, LLVOAvatar::TEX_UPPER_BAKED);
|
||||
update_texture_ctrl(avatarp, mBakedLower, LLVOAvatar::TEX_LOWER_BAKED);
|
||||
update_texture_ctrl(avatarp, mBakedSkirt, LLVOAvatar::TEX_SKIRT_BAKED);
|
||||
|
||||
update_texture_ctrl(avatarp, mMakeup, LLVOAvatar::TEX_HEAD_BODYPAINT);
|
||||
update_texture_ctrl(avatarp, mHair, LLVOAvatar::TEX_HAIR);
|
||||
update_texture_ctrl(avatarp, mEye, LLVOAvatar::TEX_EYES_IRIS);
|
||||
|
||||
update_texture_ctrl(avatarp, mShirt, LLVOAvatar::TEX_UPPER_SHIRT);
|
||||
update_texture_ctrl(avatarp, mUpperTattoo, LLVOAvatar::TEX_UPPER_BODYPAINT);
|
||||
update_texture_ctrl(avatarp, mUpperJacket, LLVOAvatar::TEX_UPPER_JACKET);
|
||||
update_texture_ctrl(avatarp, mGloves, LLVOAvatar::TEX_UPPER_GLOVES);
|
||||
update_texture_ctrl(avatarp, mUndershirt, LLVOAvatar::TEX_UPPER_UNDERSHIRT);
|
||||
|
||||
update_texture_ctrl(avatarp, mPants, LLVOAvatar::TEX_LOWER_PANTS);
|
||||
update_texture_ctrl(avatarp, mLowerTattoo, LLVOAvatar::TEX_LOWER_BODYPAINT);
|
||||
update_texture_ctrl(avatarp, mShoes, LLVOAvatar::TEX_LOWER_SHOES);
|
||||
update_texture_ctrl(avatarp, mSocks, LLVOAvatar::TEX_LOWER_SOCKS);
|
||||
update_texture_ctrl(avatarp, mJacket, LLVOAvatar::TEX_LOWER_JACKET);
|
||||
update_texture_ctrl(avatarp, mUnderpants, LLVOAvatar::TEX_LOWER_UNDERPANTS);
|
||||
update_texture_ctrl(avatarp, mSkirt, LLVOAvatar::TEX_SKIRT);
|
||||
for (U32 i=0; i < TEX_NUM_INDICES; i++)
|
||||
{
|
||||
update_texture_ctrl(avatarp, mTextures[i], ETextureIndex(i));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include "llfloater.h"
|
||||
#include "lluuid.h"
|
||||
#include "llstring.h"
|
||||
#include "llvoavatardefines.h"
|
||||
|
||||
class LLTextureCtrl;
|
||||
|
||||
|
|
@ -58,26 +59,7 @@ private:
|
|||
private:
|
||||
LLUUID mID;
|
||||
std::string mTitle;
|
||||
LLTextureCtrl* mBakedHead;
|
||||
LLTextureCtrl* mBakedEyes;
|
||||
LLTextureCtrl* mBakedUpper;
|
||||
LLTextureCtrl* mBakedLower;
|
||||
LLTextureCtrl* mBakedSkirt;
|
||||
LLTextureCtrl* mHair;
|
||||
LLTextureCtrl* mMakeup;
|
||||
LLTextureCtrl* mEye;
|
||||
LLTextureCtrl* mShirt;
|
||||
LLTextureCtrl* mUpperTattoo;
|
||||
LLTextureCtrl* mUpperJacket;
|
||||
LLTextureCtrl* mGloves;
|
||||
LLTextureCtrl* mUndershirt;
|
||||
LLTextureCtrl* mPants;
|
||||
LLTextureCtrl* mLowerTattoo;
|
||||
LLTextureCtrl* mShoes;
|
||||
LLTextureCtrl* mSocks;
|
||||
LLTextureCtrl* mJacket;
|
||||
LLTextureCtrl* mUnderpants;
|
||||
LLTextureCtrl* mSkirt;
|
||||
LLTextureCtrl* mTextures[LLVOAvatarDefines::TEX_NUM_INDICES];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1072,16 +1072,20 @@ void LLHUDText::renderAllHUD()
|
|||
LLGLState::checkStates();
|
||||
LLGLState::checkTextureChannels();
|
||||
LLGLState::checkClientArrays();
|
||||
|
||||
LLGLEnable color_mat(GL_COLOR_MATERIAL);
|
||||
LLGLDepthTest depth(GL_FALSE, GL_FALSE);
|
||||
|
||||
VisibleTextObjectIterator text_it;
|
||||
|
||||
for (text_it = sVisibleHUDTextObjects.begin(); text_it != sVisibleHUDTextObjects.end(); ++text_it)
|
||||
{
|
||||
(*text_it)->renderText(FALSE);
|
||||
LLGLEnable color_mat(GL_COLOR_MATERIAL);
|
||||
LLGLDepthTest depth(GL_FALSE, GL_FALSE);
|
||||
|
||||
VisibleTextObjectIterator text_it;
|
||||
|
||||
for (text_it = sVisibleHUDTextObjects.begin(); text_it != sVisibleHUDTextObjects.end(); ++text_it)
|
||||
{
|
||||
(*text_it)->renderText(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
LLVertexBuffer::unbind();
|
||||
|
||||
LLGLState::checkStates();
|
||||
LLGLState::checkTextureChannels();
|
||||
|
|
|
|||
|
|
@ -3883,7 +3883,7 @@ void wear_inventory_category_on_avatar( LLInventoryCategory* category, BOOL appe
|
|||
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterCustomize->askToSaveAllIfDirty(
|
||||
gFloaterCustomize->askToSaveIfDirty(
|
||||
wear_inventory_category_on_avatar_step2,
|
||||
userdata);
|
||||
}
|
||||
|
|
@ -4154,7 +4154,7 @@ void remove_inventory_category_from_avatar( LLInventoryCategory* category )
|
|||
|
||||
if( gFloaterCustomize )
|
||||
{
|
||||
gFloaterCustomize->askToSaveAllIfDirty(
|
||||
gFloaterCustomize->askToSaveIfDirty(
|
||||
remove_inventory_category_from_avatar_step2,
|
||||
uuid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void LLProgressView::onCancelButtonClicked(void*)
|
|||
void LLProgressView::onClickMessage(void* data)
|
||||
{
|
||||
LLProgressView* viewp = (LLProgressView*)data;
|
||||
if ( ! viewp->mMessage.empty() )
|
||||
if ( viewp != NULL && ! viewp->mMessage.empty() )
|
||||
{
|
||||
std::string url_to_open( "" );
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "llvfile.h"
|
||||
#include "llviewerimagelist.h"
|
||||
#include "llviewerimagelist.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewerstats.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "llvoavatar.h"
|
||||
|
|
@ -54,9 +55,12 @@
|
|||
#include "pipeline.h"
|
||||
#include "v4coloru.h"
|
||||
#include "llrender.h"
|
||||
#include "llassetuploadresponders.h"
|
||||
|
||||
//#include "../tools/imdebug/imdebug.h"
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
// static
|
||||
S32 LLTexLayerSetBuffer::sGLByteCount = 0;
|
||||
S32 LLTexLayerSetBuffer::sGLBumpByteCount = 0;
|
||||
|
|
@ -64,11 +68,12 @@ S32 LLTexLayerSetBuffer::sGLBumpByteCount = 0;
|
|||
//-----------------------------------------------------------------------------
|
||||
// LLBakedUploadData()
|
||||
//-----------------------------------------------------------------------------
|
||||
LLBakedUploadData::LLBakedUploadData( LLVOAvatar* avatar, LLTexLayerSetBuffer* layerset_buffer ) :
|
||||
LLBakedUploadData::LLBakedUploadData( LLVOAvatar* avatar, LLTexLayerSetBuffer* layerset_buffer, const LLUUID & id ) :
|
||||
mAvatar( avatar ),
|
||||
mLayerSetBuffer( layerset_buffer )
|
||||
mLayerSetBuffer( layerset_buffer ),
|
||||
mID(id)
|
||||
{
|
||||
mID.generate();
|
||||
mStartTime = LLFrameTimer::getTotalTime(); // Record starting time
|
||||
for( S32 i = 0; i < WT_COUNT; i++ )
|
||||
{
|
||||
LLWearable* wearable = gAgent.getWearable( (EWearableType)i);
|
||||
|
|
@ -221,7 +226,7 @@ BOOL LLTexLayerSetBuffer::needsRender()
|
|||
BOOL needs_update = gAgent.mNumPendingQueries == 0 && (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating;
|
||||
if (needs_update)
|
||||
{
|
||||
BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == LLVOAvatar::TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT);
|
||||
BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT);
|
||||
if (invalid_skirt)
|
||||
{
|
||||
// we were trying to create a skirt texture
|
||||
|
|
@ -393,7 +398,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
|
|||
baked_image_data[5*i + 0] = baked_color_data[4*i + 0];
|
||||
baked_image_data[5*i + 1] = baked_color_data[4*i + 1];
|
||||
baked_image_data[5*i + 2] = baked_color_data[4*i + 2];
|
||||
baked_image_data[5*i + 3] = baked_color_data[4*i + 3] < 255 ? baked_color_data[4*i + 3] : baked_bump_data[4*i];
|
||||
baked_image_data[5*i + 3] = baked_color_data[4*i + 3]; // alpha should be correct for eyelashes.
|
||||
baked_image_data[5*i + 4] = baked_mask_data[i];
|
||||
i++;
|
||||
}
|
||||
|
|
@ -409,7 +414,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
|
|||
baked_image_data[5*i + 0] = baked_color_data[4*i + 0];
|
||||
baked_image_data[5*i + 1] = baked_color_data[4*i + 1];
|
||||
baked_image_data[5*i + 2] = baked_color_data[4*i + 2];
|
||||
baked_image_data[5*i + 3] = baked_bump_data[4*i];
|
||||
baked_image_data[5*i + 3] = 255; // reserve for alpha
|
||||
baked_image_data[5*i + 4] = baked_mask_data[i];
|
||||
i++;
|
||||
}
|
||||
|
|
@ -418,7 +423,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mTexLayerSet->getBodyRegion() == "skirt")
|
||||
if (mTexLayerSet->getBodyRegion() == "skirt" || mTexLayerSet->getBodyRegion() == "hair")
|
||||
{
|
||||
S32 i = 0;
|
||||
for( S32 u = 0; u < mWidth; u++ )
|
||||
|
|
@ -443,7 +448,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
|
|||
baked_image_data[4*i + 0] = baked_color_data[4*i + 0];
|
||||
baked_image_data[4*i + 1] = baked_color_data[4*i + 1];
|
||||
baked_image_data[4*i + 2] = baked_color_data[4*i + 2];
|
||||
baked_image_data[4*i + 3] = baked_mask_data[i];
|
||||
baked_image_data[4*i + 3] = 255; // eyes should have no mask - reserve for alpha
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
@ -479,16 +484,34 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data)
|
|||
|
||||
if( valid )
|
||||
{
|
||||
LLBakedUploadData* baked_upload_data = new LLBakedUploadData( gAgent.getAvatarObject(), this );
|
||||
mUploadID = baked_upload_data->mID;
|
||||
// baked_upload_data is owned by the responder and deleted after the request completes
|
||||
LLBakedUploadData* baked_upload_data = new LLBakedUploadData( gAgent.getAvatarObject(), this, asset_id );
|
||||
mUploadID = asset_id;
|
||||
|
||||
// upload the image
|
||||
std::string url = gAgent.getRegion()->getCapability("UploadBakedTexture");
|
||||
|
||||
gAssetStorage->storeAssetData(tid,
|
||||
LLAssetType::AT_TEXTURE,
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete,
|
||||
baked_upload_data,
|
||||
TRUE, // temp_file
|
||||
FALSE, // is_priority
|
||||
TRUE); // store_local
|
||||
if(!url.empty()
|
||||
&& !LLPipeline::sForceOldBakedUpload) // Toggle the debug setting UploadBakedTexOld to change between the new caps method and old method
|
||||
{
|
||||
llinfos << "Baked texture upload via capability of " << mUploadID << " to " << url << llendl;
|
||||
|
||||
LLSD body = LLSD::emptyMap();
|
||||
LLHTTPClient::post(url, body, new LLSendTexLayerResponder(body, mUploadID, LLAssetType::AT_TEXTURE, baked_upload_data));
|
||||
// Responder will call LLTexLayerSetBuffer::onTextureUploadComplete()
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "Baked texture upload via Asset Store." << llendl;
|
||||
// gAssetStorage->storeAssetData(mTransactionID, LLAssetType::AT_IMAGE_JPEG, &uploadCallback, (void *)this, FALSE);
|
||||
gAssetStorage->storeAssetData(tid,
|
||||
LLAssetType::AT_TEXTURE,
|
||||
LLTexLayerSetBuffer::onTextureUploadComplete,
|
||||
baked_upload_data,
|
||||
TRUE, // temp_file
|
||||
TRUE, // is_priority
|
||||
TRUE); // store_local
|
||||
}
|
||||
|
||||
mNeedsUpload = FALSE;
|
||||
}
|
||||
|
|
@ -541,15 +564,10 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* user
|
|||
|
||||
if( result >= 0 )
|
||||
{
|
||||
LLVOAvatar::ETextureIndex baked_te = avatar->getBakedTE( layerset_buffer->mTexLayerSet );
|
||||
if( !gAgent.cameraCustomizeAvatar() )
|
||||
{
|
||||
avatar->setNewBakedTexture( baked_te, uuid );
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "LLTexLayerSetBuffer::onTextureUploadComplete() when in Customize Avatar" << llendl;
|
||||
}
|
||||
ETextureIndex baked_te = avatar->getBakedTE( layerset_buffer->mTexLayerSet );
|
||||
U64 now = LLFrameTimer::getTotalTime(); // Record starting time
|
||||
llinfos << "Baked texture upload took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl;
|
||||
avatar->setNewBakedTexture( baked_te, uuid );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -800,6 +818,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
|
|||
{
|
||||
LLGLSUIDefault gls_ui;
|
||||
gGL.getTexUnit(0)->bind(image_gl);
|
||||
gGL.getTexUnit(0)->setTextureBlendType( LLTexUnit::TB_REPLACE );
|
||||
gl_rect_2d_simple_tex( width, height );
|
||||
}
|
||||
else
|
||||
|
|
@ -807,9 +826,10 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
|
|||
success = FALSE;
|
||||
}
|
||||
}
|
||||
gGL.flush();
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
gGL.flush();
|
||||
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
|
||||
gGL.setColorMask(true, true);
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
}
|
||||
|
|
@ -895,7 +915,7 @@ void LLTexLayerSet::createComposite()
|
|||
S32 width = mInfo->mWidth;
|
||||
S32 height = mInfo->mHeight;
|
||||
// Composite other avatars at reduced resolution
|
||||
if( !mAvatar->mIsSelf )
|
||||
if( !mAvatar->isSelf() )
|
||||
{
|
||||
width /= 2;
|
||||
height /= 2;
|
||||
|
|
@ -1049,59 +1069,63 @@ BOOL LLTexLayerInfo::parseXml(LLXmlTreeNode* node)
|
|||
|
||||
if( "upper_shirt" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_UPPER_SHIRT;
|
||||
mLocalTexture = TEX_UPPER_SHIRT;
|
||||
}
|
||||
else if( "upper_bodypaint" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_UPPER_BODYPAINT;
|
||||
mLocalTexture = TEX_UPPER_BODYPAINT;
|
||||
}
|
||||
else if( "lower_pants" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_LOWER_PANTS;
|
||||
mLocalTexture = TEX_LOWER_PANTS;
|
||||
}
|
||||
else if( "lower_bodypaint" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_LOWER_BODYPAINT;
|
||||
mLocalTexture = TEX_LOWER_BODYPAINT;
|
||||
}
|
||||
else if( "lower_shoes" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_LOWER_SHOES;
|
||||
mLocalTexture = TEX_LOWER_SHOES;
|
||||
}
|
||||
else if( "head_bodypaint" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_HEAD_BODYPAINT;
|
||||
mLocalTexture = TEX_HEAD_BODYPAINT;
|
||||
}
|
||||
else if( "lower_socks" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_LOWER_SOCKS;
|
||||
mLocalTexture = TEX_LOWER_SOCKS;
|
||||
}
|
||||
else if( "upper_jacket" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_UPPER_JACKET;
|
||||
mLocalTexture = TEX_UPPER_JACKET;
|
||||
}
|
||||
else if( "lower_jacket" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_LOWER_JACKET;
|
||||
mLocalTexture = TEX_LOWER_JACKET;
|
||||
}
|
||||
else if( "upper_gloves" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_UPPER_GLOVES;
|
||||
mLocalTexture = TEX_UPPER_GLOVES;
|
||||
}
|
||||
else if( "upper_undershirt" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_UPPER_UNDERSHIRT;
|
||||
mLocalTexture = TEX_UPPER_UNDERSHIRT;
|
||||
}
|
||||
else if( "lower_underpants" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_LOWER_UNDERPANTS;
|
||||
mLocalTexture = TEX_LOWER_UNDERPANTS;
|
||||
}
|
||||
else if( "eyes_iris" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_EYES_IRIS;
|
||||
mLocalTexture = TEX_EYES_IRIS;
|
||||
}
|
||||
else if( "skirt" == local_texture )
|
||||
{
|
||||
mLocalTexture = LLVOAvatar::LOCTEX_SKIRT;
|
||||
mLocalTexture = TEX_SKIRT;
|
||||
}
|
||||
else if( "hair_grain" == local_texture )
|
||||
{
|
||||
mLocalTexture = TEX_HAIR;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1364,7 +1388,7 @@ BOOL LLTexLayer::render( S32 x, S32 y, S32 width, S32 height )
|
|||
{
|
||||
{
|
||||
LLImageGL* image_gl = NULL;
|
||||
if( mTexLayerSet->getAvatar()->getLocalTextureGL( getInfo()->mLocalTexture, &image_gl ) )
|
||||
if( mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) )
|
||||
{
|
||||
if( image_gl )
|
||||
{
|
||||
|
|
@ -1434,7 +1458,7 @@ BOOL LLTexLayer::render( S32 x, S32 y, S32 width, S32 height )
|
|||
U8* LLTexLayer::getAlphaData()
|
||||
{
|
||||
LLCRC alpha_mask_crc;
|
||||
const LLUUID& uuid = mTexLayerSet->getAvatar()->getLocalTextureID(getInfo()->mLocalTexture);
|
||||
const LLUUID& uuid = mTexLayerSet->getAvatar()->getLocalTextureID((ETextureIndex)getInfo()->mLocalTexture);
|
||||
alpha_mask_crc.update((U8*)(&uuid.mData), UUID_BYTES);
|
||||
|
||||
for( alpha_list_t::iterator iter = mParamAlphaList.begin(); iter != mParamAlphaList.end(); iter++ )
|
||||
|
|
@ -1563,7 +1587,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4
|
|||
{
|
||||
{
|
||||
LLImageGL* image_gl = NULL;
|
||||
if( mTexLayerSet->getAvatar()->getLocalTextureGL( getInfo()->mLocalTexture, &image_gl ) )
|
||||
if( mTexLayerSet->getAvatar()->getLocalTextureGL((ETextureIndex)getInfo()->mLocalTexture, &image_gl ) )
|
||||
{
|
||||
if( image_gl && (image_gl->getComponents() == 4) )
|
||||
{
|
||||
|
|
@ -1627,7 +1651,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4
|
|||
if (!mMorphMasksValid && !mMaskedMorphs.empty())
|
||||
{
|
||||
LLCRC alpha_mask_crc;
|
||||
const LLUUID& uuid = mTexLayerSet->getAvatar()->getLocalTextureID(getInfo()->mLocalTexture);
|
||||
const LLUUID& uuid = mTexLayerSet->getAvatar()->getLocalTextureID((ETextureIndex)getInfo()->mLocalTexture);
|
||||
alpha_mask_crc.update((U8*)(&uuid.mData), UUID_BYTES);
|
||||
|
||||
for( alpha_list_t::iterator iter = mParamAlphaList.begin(); iter != mParamAlphaList.end(); iter++ )
|
||||
|
|
@ -1648,7 +1672,7 @@ BOOL LLTexLayer::renderAlphaMasks( S32 x, S32 y, S32 width, S32 height, LLColor4
|
|||
else
|
||||
{
|
||||
// clear out a slot if we have filled our cache
|
||||
S32 max_cache_entries = getTexLayerSet()->getAvatar()->mIsSelf ? 4 : 1;
|
||||
S32 max_cache_entries = getTexLayerSet()->getAvatar()->isSelf() ? 4 : 1;
|
||||
while ((S32)mAlphaCache.size() >= max_cache_entries)
|
||||
{
|
||||
iter2 = mAlphaCache.begin(); // arbitrarily grab the first entry
|
||||
|
|
@ -1701,7 +1725,7 @@ BOOL LLTexLayer::renderImageRaw( U8* in_data, S32 in_width, S32 in_height, S32 i
|
|||
format = GL_ALPHA;
|
||||
}
|
||||
|
||||
if( (in_width != VOAVATAR_SCRATCH_TEX_WIDTH) || (in_height != VOAVATAR_SCRATCH_TEX_HEIGHT) )
|
||||
if( (in_width != SCRATCH_TEX_WIDTH) || (in_height != SCRATCH_TEX_HEIGHT) )
|
||||
{
|
||||
LLGLSNoAlphaTest gls_no_alpha_test;
|
||||
|
||||
|
|
@ -1918,8 +1942,13 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
|
|||
LLVOAvatar* avatar = mTexLayer->getTexLayerSet()->getAvatar();
|
||||
if( avatar->getSex() & getSex() )
|
||||
{
|
||||
if ( gAgent.cameraCustomizeAvatar() )
|
||||
{
|
||||
set_by_user = FALSE;
|
||||
}
|
||||
avatar->invalidateComposite( mTexLayer->getTexLayerSet(), set_by_user );
|
||||
mTexLayer->invalidateMorphMasks();
|
||||
avatar->updateMeshTextures();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2053,7 +2082,7 @@ BOOL LLTexLayerParamAlpha::render( S32 x, S32 y, S32 width, S32 height )
|
|||
|
||||
// Don't keep the cache for other people's avatars
|
||||
// (It's not really a "cache" in that case, but the logic is the same)
|
||||
if( !mTexLayer->getTexLayerSet()->getAvatar()->mIsSelf )
|
||||
if( !mTexLayer->getTexLayerSet()->getAvatar()->isSelf() )
|
||||
{
|
||||
mCachedProcessedImageGL = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -537,13 +537,14 @@ public:
|
|||
class LLBakedUploadData
|
||||
{
|
||||
public:
|
||||
LLBakedUploadData( LLVOAvatar* avatar, LLTexLayerSetBuffer* layerset_buffer );
|
||||
LLBakedUploadData( LLVOAvatar* avatar, LLTexLayerSetBuffer* layerset_buffer, const LLUUID & id);
|
||||
~LLBakedUploadData() {}
|
||||
|
||||
LLUUID mID;
|
||||
LLVOAvatar* mAvatar; // just backlink, don't LLPointer
|
||||
LLTexLayerSetBuffer* mLayerSetBuffer;
|
||||
LLUUID mWearableAssets[WT_COUNT];
|
||||
U64 mStartTime; // Used to measure time baked texture upload requires
|
||||
};
|
||||
|
||||
extern LLTexStaticImageList gTexStaticImageList;
|
||||
|
|
|
|||
|
|
@ -955,7 +955,7 @@ void LLToolDragAndDrop::pickCallback(const LLPickInfo& pick_info)
|
|||
|
||||
if(hit_obj->isAvatar())
|
||||
{
|
||||
if(((LLVOAvatar*) hit_obj)->mIsSelf)
|
||||
if(((LLVOAvatar*) hit_obj)->isSelf())
|
||||
{
|
||||
target = DT_SELF;
|
||||
hit_face = -1;
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
|
|||
gViewerWindow->getLeftMouseDown() &&
|
||||
!gSavedSettings.getBOOL("FreezeTime") &&
|
||||
(hit_obj == gAgent.getAvatarObject() ||
|
||||
(hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->mIsSelf)))
|
||||
(hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf())))
|
||||
{
|
||||
LLToolCamera::getInstance()->mMouseSteering = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,11 @@ BOOL LLVisualParamHint::render()
|
|||
{
|
||||
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
|
||||
LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE);
|
||||
gGL.setAlphaRejectSettings(LLRender::CF_ALWAYS);
|
||||
gGL.setSceneBlendType(LLRender::BT_REPLACE);
|
||||
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
|
||||
}
|
||||
avatarp->setVisualParamWeight(mVisualParam, mLastParamWeight);
|
||||
gGL.color4f(1,1,1,1);
|
||||
|
|
|
|||
|
|
@ -119,6 +119,12 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool handleSetSelfInvisible( const LLSD& newvalue)
|
||||
{
|
||||
LLVOAvatar::onChangeSelfInvisible( newvalue.asBoolean() );
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleReleaseGLBufferChanged(const LLSD& newvalue)
|
||||
{
|
||||
if (gPipeline.isInit())
|
||||
|
|
@ -205,16 +211,6 @@ static bool handleMaxPartCountChanged(const LLSD& newvalue)
|
|||
return true;
|
||||
}
|
||||
|
||||
const S32 MAX_USER_COMPOSITE_LIMIT = 100;
|
||||
const S32 MIN_USER_COMPOSITE_LIMIT = 0;
|
||||
|
||||
static bool handleCompositeLimitChanged(const LLSD& newvalue)
|
||||
{
|
||||
S32 composite_limit = llmax(MIN_USER_COMPOSITE_LIMIT, llmin((S32)newvalue.asInteger(), MAX_USER_COMPOSITE_LIMIT));
|
||||
LLVOAvatar::sMaxOtherAvatarsToComposite = composite_limit;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool handleVideoMemoryChanged(const LLSD& newvalue)
|
||||
{
|
||||
gImageList.updateMaxResidentTexMem(newvalue.asInteger());
|
||||
|
|
@ -297,6 +293,13 @@ static bool handleUseOcclusionChanged(const LLSD& newvalue)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool handleUploadBakedTexOldChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLPipeline::sForceOldBakedUpload = newvalue.asBoolean();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool handleNumpadControlChanged(const LLSD& newvalue)
|
||||
{
|
||||
if (gKeyboard)
|
||||
|
|
@ -453,6 +456,7 @@ void settings_setup_listeners()
|
|||
gSavedSettings.getControl("WindLightUseAtmosShaders")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
|
||||
gSavedSettings.getControl("RenderGammaFull")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
|
||||
gSavedSettings.getControl("RenderAvatarMaxVisible")->getSignal()->connect(boost::bind(&handleAvatarMaxVisibleChanged, _1));
|
||||
gSavedSettings.getControl("RenderAvatarInvisible")->getSignal()->connect(boost::bind(&handleSetSelfInvisible, _1));
|
||||
gSavedSettings.getControl("RenderVolumeLODFactor")->getSignal()->connect(boost::bind(&handleVolumeLODChanged, _1));
|
||||
gSavedSettings.getControl("RenderAvatarLODFactor")->getSignal()->connect(boost::bind(&handleAvatarLODChanged, _1));
|
||||
gSavedSettings.getControl("RenderTerrainLODFactor")->getSignal()->connect(boost::bind(&handleTerrainLODChanged, _1));
|
||||
|
|
@ -474,11 +478,11 @@ void settings_setup_listeners()
|
|||
gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _1));
|
||||
gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _1));
|
||||
gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _1));
|
||||
gSavedSettings.getControl("AvatarCompositeLimit")->getSignal()->connect(boost::bind(&handleCompositeLimitChanged, _1));
|
||||
gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _1));
|
||||
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&handleChatFontSizeChanged, _1));
|
||||
gSavedSettings.getControl("ChatPersistTime")->getSignal()->connect(boost::bind(&handleChatPersistTimeChanged, _1));
|
||||
gSavedSettings.getControl("ConsoleMaxLines")->getSignal()->connect(boost::bind(&handleConsoleMaxLinesChanged, _1));
|
||||
gSavedSettings.getControl("UploadBakedTexOld")->getSignal()->connect(boost::bind(&handleUploadBakedTexOldChanged, _1));
|
||||
gSavedSettings.getControl("UseOcclusion")->getSignal()->connect(boost::bind(&handleUseOcclusionChanged, _1));
|
||||
gSavedSettings.getControl("AudioLevelMaster")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
|
||||
gSavedSettings.getControl("AudioLevelSFX")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
|
||||
|
|
|
|||
|
|
@ -514,6 +514,16 @@ void LLViewerJoint::setVisible(BOOL visible, BOOL recursive)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void LLViewerJoint::setMeshesToChildren()
|
||||
{
|
||||
removeAllChildren();
|
||||
for (std::vector<LLViewerJointMesh*>::iterator iter = mMeshParts.begin();
|
||||
iter != mMeshParts.end(); iter++)
|
||||
{
|
||||
addChild((LLViewerJointMesh *) *iter);
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLViewerJointCollisionVolume()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "llapr.h"
|
||||
|
||||
class LLFace;
|
||||
class LLViewerJointMesh;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// class LLViewerJoint
|
||||
|
|
@ -133,8 +134,13 @@ public:
|
|||
|
||||
void setVisible( BOOL visible, BOOL recursive );
|
||||
|
||||
// Takes meshes in mMeshParts and sets each one as a child joint
|
||||
void setMeshesToChildren();
|
||||
|
||||
public:
|
||||
static BOOL sDisableLOD;
|
||||
std::vector<LLViewerJointMesh*> mMeshParts;
|
||||
void setMeshID( S32 id ) {mMeshID = id;}
|
||||
|
||||
protected:
|
||||
BOOL mValid;
|
||||
|
|
@ -142,6 +148,7 @@ protected:
|
|||
F32 mMinPixelArea;
|
||||
PickName mPickName;
|
||||
BOOL mVisible;
|
||||
S32 mMeshID;
|
||||
};
|
||||
|
||||
class LLViewerJointCollisionVolume : public LLViewerJoint
|
||||
|
|
|
|||
|
|
@ -558,7 +558,12 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass)
|
|||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Layerset without composite" << llendl;
|
||||
// This warning will always trigger if you've hacked the avatar to show as incomplete.
|
||||
// Ignore the warning if that's the case.
|
||||
if (!gSavedSettings.getBOOL("RenderUnloadedAvatar"))
|
||||
{
|
||||
llwarns << "Layerset without composite" << llendl;
|
||||
}
|
||||
gGL.getTexUnit(0)->bind(gImageList.getImage(IMG_DEFAULT));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@
|
|||
|
||||
#include "lltexlayer.h"
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
void init_client_menu(LLMenuGL* menu);
|
||||
void init_server_menu(LLMenuGL* menu);
|
||||
|
||||
|
|
@ -1313,8 +1314,6 @@ void init_debug_rendering_menu(LLMenuGL* menu)
|
|||
menu->createJumpKeys();
|
||||
}
|
||||
|
||||
extern BOOL gDebugAvatarRotation;
|
||||
|
||||
void init_debug_avatar_menu(LLMenuGL* menu)
|
||||
{
|
||||
LLMenuGL* sub_menu = new LLMenuGL("Grab Baked Texture");
|
||||
|
|
@ -1361,7 +1360,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
|
|||
//menu->append(new LLMenuItemToggleGL("Show Collision Plane", &LLVOAvatar::sShowFootPlane));
|
||||
menu->append(new LLMenuItemToggleGL("Show Collision Skeleton", &LLVOAvatar::sShowCollisionVolumes));
|
||||
menu->append(new LLMenuItemToggleGL( "Display Agent Target", &LLAgent::sDebugDisplayTarget));
|
||||
menu->append(new LLMenuItemToggleGL( "Debug Rotation", &gDebugAvatarRotation));
|
||||
menu->append(new LLMenuItemToggleGL( "Debug Rotation", &LLVOAvatar::sDebugAvatarRotation));
|
||||
menu->append(new LLMenuItemCallGL("Dump Attachments", handle_dump_attachments));
|
||||
menu->append(new LLMenuItemCallGL("Rebake Textures", handle_rebake_textures, NULL, NULL, 'R', MASK_ALT | MASK_CONTROL ));
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
|
|
@ -1373,11 +1372,12 @@ void init_debug_avatar_menu(LLMenuGL* menu)
|
|||
|
||||
void init_debug_baked_texture_menu(LLMenuGL* menu)
|
||||
{
|
||||
menu->append(new LLMenuItemCallGL("Iris", handle_grab_texture, enable_grab_texture, (void*) LLVOAvatar::TEX_EYES_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Head", handle_grab_texture, enable_grab_texture, (void*) LLVOAvatar::TEX_HEAD_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Upper Body", handle_grab_texture, enable_grab_texture, (void*) LLVOAvatar::TEX_UPPER_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Lower Body", handle_grab_texture, enable_grab_texture, (void*) LLVOAvatar::TEX_LOWER_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Skirt", handle_grab_texture, enable_grab_texture, (void*) LLVOAvatar::TEX_SKIRT_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Iris", handle_grab_texture, enable_grab_texture, (void*) TEX_EYES_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Head", handle_grab_texture, enable_grab_texture, (void*) TEX_HEAD_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Upper Body", handle_grab_texture, enable_grab_texture, (void*) TEX_UPPER_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Lower Body", handle_grab_texture, enable_grab_texture, (void*) TEX_LOWER_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Skirt", handle_grab_texture, enable_grab_texture, (void*) TEX_SKIRT_BAKED));
|
||||
menu->append(new LLMenuItemCallGL("Hair", handle_grab_texture, enable_grab_texture, (void*) TEX_HAIR_BAKED));
|
||||
menu->createJumpKeys();
|
||||
}
|
||||
|
||||
|
|
@ -3082,7 +3082,7 @@ void handle_reset_view()
|
|||
if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode()) && gFloaterCustomize )
|
||||
{
|
||||
// Show dialog box if needed.
|
||||
gFloaterCustomize->askToSaveAllIfDirty( reset_view_final, NULL );
|
||||
gFloaterCustomize->askToSaveIfDirty( reset_view_final, NULL );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -6727,12 +6727,12 @@ void handle_debug_avatar_textures(void*)
|
|||
|
||||
void handle_grab_texture(void* data)
|
||||
{
|
||||
LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex)((intptr_t)data);
|
||||
ETextureIndex index = (ETextureIndex)((intptr_t)data);
|
||||
LLVOAvatar* avatar = gAgent.getAvatarObject();
|
||||
if ( avatar )
|
||||
{
|
||||
const LLUUID& asset_id = avatar->grabLocalTexture(index);
|
||||
llinfos << "Adding baked texture " << asset_id << " to inventory." << llendl;
|
||||
LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl;
|
||||
LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE;
|
||||
LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE;
|
||||
LLUUID folder_id(gInventory.findCategoryUUIDForType(asset_type));
|
||||
|
|
@ -6741,21 +6741,24 @@ void handle_grab_texture(void* data)
|
|||
std::string name = "Baked ";
|
||||
switch (index)
|
||||
{
|
||||
case LLVOAvatar::TEX_EYES_BAKED:
|
||||
case TEX_EYES_BAKED:
|
||||
name.append("Iris");
|
||||
break;
|
||||
case LLVOAvatar::TEX_HEAD_BAKED:
|
||||
case TEX_HEAD_BAKED:
|
||||
name.append("Head");
|
||||
break;
|
||||
case LLVOAvatar::TEX_UPPER_BAKED:
|
||||
case TEX_UPPER_BAKED:
|
||||
name.append("Upper Body");
|
||||
break;
|
||||
case LLVOAvatar::TEX_LOWER_BAKED:
|
||||
case TEX_LOWER_BAKED:
|
||||
name.append("Lower Body");
|
||||
break;
|
||||
case LLVOAvatar::TEX_SKIRT_BAKED:
|
||||
case TEX_SKIRT_BAKED:
|
||||
name.append("Skirt");
|
||||
break;
|
||||
case TEX_HAIR_BAKED:
|
||||
name.append("Hair");
|
||||
break;
|
||||
default:
|
||||
name.append("Unknown");
|
||||
break;
|
||||
|
|
@ -6817,7 +6820,7 @@ void handle_grab_texture(void* data)
|
|||
|
||||
BOOL enable_grab_texture(void* data)
|
||||
{
|
||||
LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex)((intptr_t)data);
|
||||
ETextureIndex index = (ETextureIndex)((intptr_t)data);
|
||||
LLVOAvatar* avatar = gAgent.getAvatarObject();
|
||||
if ( avatar )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3671,7 +3671,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
|
|||
|
||||
avatarp->mSignaledAnimations.clear();
|
||||
|
||||
if (avatarp->mIsSelf)
|
||||
if (avatarp->isSelf())
|
||||
{
|
||||
LLUUID object_id;
|
||||
|
||||
|
|
|
|||
|
|
@ -1889,7 +1889,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
|
||||
if ( gShowObjectUpdates )
|
||||
{
|
||||
if (!((mPrimitiveCode == LL_PCODE_LEGACY_AVATAR) && (((LLVOAvatar *) this)->mIsSelf))
|
||||
if (!((mPrimitiveCode == LL_PCODE_LEGACY_AVATAR) && (((LLVOAvatar *) this)->isSelf()))
|
||||
&& mRegionp)
|
||||
{
|
||||
LLViewerObject* object = gObjectList.createObjectViewer(LL_PCODE_LEGACY_TEXT_BUBBLE, mRegionp);
|
||||
|
|
|
|||
|
|
@ -1420,6 +1420,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
|
|||
capabilityNames.append("SendUserReportWithScreenshot");
|
||||
capabilityNames.append("ServerReleaseNotes");
|
||||
capabilityNames.append("StartGroupProposal");
|
||||
capabilityNames.append("UntrustedSimulatorMessage");
|
||||
capabilityNames.append("UpdateAgentLanguage");
|
||||
capabilityNames.append("UpdateGestureAgentInventory");
|
||||
capabilityNames.append("UpdateNotecardAgentInventory");
|
||||
|
|
@ -1427,8 +1428,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
|
|||
capabilityNames.append("UpdateGestureTaskInventory");
|
||||
capabilityNames.append("UpdateNotecardTaskInventory");
|
||||
capabilityNames.append("UpdateScriptTask");
|
||||
capabilityNames.append("UploadBakedTexture");
|
||||
capabilityNames.append("ViewerStartAuction");
|
||||
capabilityNames.append("UntrustedSimulatorMessage");
|
||||
capabilityNames.append("ViewerStats");
|
||||
// Please add new capabilities alphabetically to reduce
|
||||
// merge conflicts.
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,227 @@
|
|||
/**
|
||||
* @file llvoavatar.cpp
|
||||
* @brief Implementation of LLVOAvatar class which is a derivation fo LLViewerObject
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2007, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llvoavatardefines.h"
|
||||
|
||||
const S32 LLVOAvatarDefines::SCRATCH_TEX_WIDTH = 512;
|
||||
const S32 LLVOAvatarDefines::SCRATCH_TEX_HEIGHT = 512;
|
||||
const S32 LLVOAvatarDefines::IMPOSTOR_PERIOD = 2;
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
/*********************************************************************************
|
||||
* Edit this function to add/remove/change textures and mesh definitions for avatars.
|
||||
*/
|
||||
void LLVOAvatarDictionary::initData()
|
||||
{
|
||||
// Textures
|
||||
mTextureMap[TEX_HEAD_BODYPAINT] = new TextureDictionaryEntry("head bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN);
|
||||
mTextureMap[TEX_UPPER_SHIRT] = new TextureDictionaryEntry("shirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShirtUUID", WT_SHIRT);
|
||||
mTextureMap[TEX_LOWER_PANTS] = new TextureDictionaryEntry("pants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultPantsUUID", WT_PANTS);
|
||||
mTextureMap[TEX_EYES_IRIS] = new TextureDictionaryEntry("iris", TRUE, BAKED_NUM_INDICES, "UIImgDefaultEyesUUID", WT_EYES);
|
||||
mTextureMap[TEX_HAIR] = new TextureDictionaryEntry("hair", TRUE, BAKED_NUM_INDICES, "UIImgDefaultHairUUID", WT_HAIR);
|
||||
mTextureMap[TEX_UPPER_BODYPAINT] = new TextureDictionaryEntry("upper bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN);
|
||||
mTextureMap[TEX_LOWER_BODYPAINT] = new TextureDictionaryEntry("lower bodypaint", TRUE, BAKED_NUM_INDICES, "", WT_SKIN);
|
||||
mTextureMap[TEX_LOWER_SHOES] = new TextureDictionaryEntry("shoes", TRUE, BAKED_NUM_INDICES, "UIImgDefaultShoesUUID", WT_SHOES);
|
||||
mTextureMap[TEX_LOWER_SOCKS] = new TextureDictionaryEntry("socks", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSocksUUID", WT_SOCKS);
|
||||
mTextureMap[TEX_UPPER_JACKET] = new TextureDictionaryEntry("upper jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", WT_JACKET);
|
||||
mTextureMap[TEX_LOWER_JACKET] = new TextureDictionaryEntry("lower jacket", TRUE, BAKED_NUM_INDICES, "UIImgDefaultJacketUUID", WT_JACKET);
|
||||
mTextureMap[TEX_UPPER_GLOVES] = new TextureDictionaryEntry("gloves", TRUE, BAKED_NUM_INDICES, "UIImgDefaultGlovesUUID", WT_GLOVES);
|
||||
mTextureMap[TEX_UPPER_UNDERSHIRT] = new TextureDictionaryEntry("undershirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERSHIRT);
|
||||
mTextureMap[TEX_LOWER_UNDERPANTS] = new TextureDictionaryEntry("underpants", TRUE, BAKED_NUM_INDICES, "UIImgDefaultUnderwearUUID", WT_UNDERPANTS);
|
||||
mTextureMap[TEX_SKIRT] = new TextureDictionaryEntry("skirt", TRUE, BAKED_NUM_INDICES, "UIImgDefaultSkirtUUID", WT_SKIRT);
|
||||
mTextureMap[TEX_HEAD_BAKED] = new TextureDictionaryEntry("head-baked", FALSE, BAKED_HEAD);
|
||||
mTextureMap[TEX_UPPER_BAKED] = new TextureDictionaryEntry("upper-baked", FALSE, BAKED_UPPER);
|
||||
mTextureMap[TEX_LOWER_BAKED] = new TextureDictionaryEntry("lower-baked", FALSE, BAKED_LOWER);
|
||||
mTextureMap[TEX_EYES_BAKED] = new TextureDictionaryEntry("eyes-baked", FALSE, BAKED_EYES);
|
||||
mTextureMap[TEX_HAIR_BAKED] = new TextureDictionaryEntry("hair-baked", FALSE, BAKED_HAIR);
|
||||
mTextureMap[TEX_SKIRT_BAKED] = new TextureDictionaryEntry("skirt-baked", FALSE, BAKED_SKIRT);
|
||||
|
||||
// Baked textures
|
||||
mBakedTextureMap[BAKED_HEAD] = new BakedDictionaryEntry(TEX_HEAD_BAKED, "head", 1, TEX_HEAD_BODYPAINT);
|
||||
mBakedTextureMap[BAKED_UPPER] = new BakedDictionaryEntry(TEX_UPPER_BAKED, "upper_body", 5, TEX_UPPER_SHIRT,TEX_UPPER_BODYPAINT,TEX_UPPER_JACKET,TEX_UPPER_GLOVES,TEX_UPPER_UNDERSHIRT);
|
||||
mBakedTextureMap[BAKED_LOWER] = new BakedDictionaryEntry(TEX_LOWER_BAKED, "lower_body", 6, TEX_LOWER_PANTS,TEX_LOWER_BODYPAINT,TEX_LOWER_SHOES,TEX_LOWER_SOCKS,TEX_LOWER_JACKET,TEX_LOWER_UNDERPANTS);
|
||||
mBakedTextureMap[BAKED_EYES] = new BakedDictionaryEntry(TEX_EYES_BAKED, "eyes", 1, TEX_EYES_IRIS);
|
||||
mBakedTextureMap[BAKED_SKIRT] = new BakedDictionaryEntry(TEX_SKIRT_BAKED, "skirt", 1, TEX_SKIRT);
|
||||
mBakedTextureMap[BAKED_HAIR] = new BakedDictionaryEntry(TEX_HAIR_BAKED, "hair", 1, TEX_HAIR);
|
||||
|
||||
// Meshes
|
||||
mMeshMap[MESH_ID_HAIR] = new MeshDictionaryEntry(BAKED_HAIR, "hairMesh", 6, LLViewerJoint::PN_4);
|
||||
mMeshMap[MESH_ID_HEAD] = new MeshDictionaryEntry(BAKED_HEAD, "headMesh", 5, LLViewerJoint::PN_5);
|
||||
mMeshMap[MESH_ID_EYELASH] = new MeshDictionaryEntry(BAKED_HEAD, "eyelashMesh", 1, LLViewerJoint::PN_0); // no baked mesh associated currently
|
||||
mMeshMap[MESH_ID_UPPER_BODY] = new MeshDictionaryEntry(BAKED_UPPER, "upperBodyMesh", 5, LLViewerJoint::PN_1);
|
||||
mMeshMap[MESH_ID_LOWER_BODY] = new MeshDictionaryEntry(BAKED_LOWER, "lowerBodyMesh", 5, LLViewerJoint::PN_2);
|
||||
mMeshMap[MESH_ID_EYEBALL_LEFT] = new MeshDictionaryEntry(BAKED_EYES, "eyeBallLeftMesh", 2, LLViewerJoint::PN_3);
|
||||
mMeshMap[MESH_ID_EYEBALL_RIGHT] = new MeshDictionaryEntry(BAKED_EYES, "eyeBallRightMesh", 2, LLViewerJoint::PN_3);
|
||||
mMeshMap[MESH_ID_SKIRT] = new MeshDictionaryEntry(BAKED_SKIRT, "skirtMesh", 5, LLViewerJoint::PN_5);
|
||||
|
||||
// Wearables
|
||||
mWearableMap[BAKED_HEAD] = new WearableDictionaryEntry("18ded8d6-bcfc-e415-8539-944c0f5ea7a6", 3, WT_SHAPE, WT_SKIN, WT_HAIR);
|
||||
mWearableMap[BAKED_UPPER] = new WearableDictionaryEntry("338c29e3-3024-4dbb-998d-7c04cf4fa88f", 6, WT_SHAPE, WT_SKIN, WT_SHIRT, WT_JACKET, WT_GLOVES, WT_UNDERSHIRT);
|
||||
mWearableMap[BAKED_LOWER] = new WearableDictionaryEntry("91b4a2c7-1b1a-ba16-9a16-1f8f8dcc1c3f", 7, WT_SHAPE, WT_SKIN, WT_PANTS, WT_SHOES, WT_SOCKS, WT_JACKET, WT_UNDERPANTS);
|
||||
mWearableMap[BAKED_EYES] = new WearableDictionaryEntry("b2cf28af-b840-1071-3c6a-78085d8128b5", 1, WT_EYES);
|
||||
mWearableMap[BAKED_SKIRT] = new WearableDictionaryEntry("ea800387-ea1a-14e0-56cb-24f2022f969a", 1, WT_SKIRT);
|
||||
mWearableMap[BAKED_HAIR] = new WearableDictionaryEntry("0af1ef7c-ad24-11dd-8790-001f5bf833e8", 1, WT_HAIR);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*********************************************************************************/
|
||||
|
||||
LLVOAvatarDictionary::LLVOAvatarDictionary()
|
||||
{
|
||||
initData();
|
||||
createAssociations();
|
||||
}
|
||||
|
||||
// Baked textures are composites of textures; for each such composited texture,
|
||||
// map it to the baked texture.
|
||||
void LLVOAvatarDictionary::createAssociations()
|
||||
{
|
||||
for (baked_map_t::const_iterator iter = mBakedTextureMap.begin(); iter != mBakedTextureMap.end(); iter++)
|
||||
{
|
||||
const EBakedTextureIndex baked_index = (iter->first);
|
||||
const BakedDictionaryEntry *dict = (iter->second);
|
||||
|
||||
// For each texture that this baked texture index affects, associate those textures
|
||||
// with this baked texture index.
|
||||
for (texture_vec_t::const_iterator local_texture_iter = dict->mLocalTextures.begin();
|
||||
local_texture_iter != dict->mLocalTextures.end();
|
||||
local_texture_iter++)
|
||||
{
|
||||
const ETextureIndex local_texture_index = (ETextureIndex) *local_texture_iter;
|
||||
mTextureMap[local_texture_index]->mIsUsedByBakedTexture = true;
|
||||
mTextureMap[local_texture_index]->mBakedTextureIndex = baked_index;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
LLVOAvatarDictionary::TextureDictionaryEntry::TextureDictionaryEntry(const std::string &name,
|
||||
bool is_local_texture,
|
||||
EBakedTextureIndex baked_texture_index,
|
||||
const std::string &default_image_name,
|
||||
EWearableType wearable_type) :
|
||||
mName(name),
|
||||
mIsLocalTexture(is_local_texture),
|
||||
mIsBakedTexture(!is_local_texture),
|
||||
mIsUsedByBakedTexture(baked_texture_index != BAKED_NUM_INDICES),
|
||||
mBakedTextureIndex(baked_texture_index),
|
||||
mDefaultImageName(default_image_name),
|
||||
mWearableType(wearable_type)
|
||||
{
|
||||
}
|
||||
|
||||
LLVOAvatarDictionary::MeshDictionaryEntry::MeshDictionaryEntry(EBakedTextureIndex baked_index,
|
||||
const std::string &name,
|
||||
U8 level,
|
||||
LLViewerJoint::PickName pick) :
|
||||
mBakedID(baked_index),
|
||||
mName(name),
|
||||
mLOD(level),
|
||||
mPickName(pick)
|
||||
{
|
||||
}
|
||||
LLVOAvatarDictionary::BakedDictionaryEntry::BakedDictionaryEntry(ETextureIndex tex_index,
|
||||
const std::string &name,
|
||||
U32 num_local_textures, ... ) :
|
||||
mName(name),
|
||||
mTextureIndex(tex_index)
|
||||
|
||||
{
|
||||
va_list argp;
|
||||
va_start(argp, num_local_textures);
|
||||
for (U8 i=0; i < num_local_textures; i++)
|
||||
{
|
||||
ETextureIndex t = (ETextureIndex)va_arg(argp,int);
|
||||
mLocalTextures.push_back(t);
|
||||
}
|
||||
}
|
||||
|
||||
LLVOAvatarDictionary::WearableDictionaryEntry::WearableDictionaryEntry(const std::string &hash_name,
|
||||
U32 num_wearables, ... ) :
|
||||
mHashID(LLUUID(hash_name))
|
||||
{
|
||||
va_list argp;
|
||||
va_start(argp, num_wearables);
|
||||
for (U8 i=0; i < num_wearables; i++)
|
||||
{
|
||||
EWearableType t = (EWearableType)va_arg(argp,int);
|
||||
mWearablesVec.push_back(t);
|
||||
}
|
||||
}
|
||||
|
||||
//virtual
|
||||
LLVOAvatarDictionary::~LLVOAvatarDictionary()
|
||||
{
|
||||
for (mesh_map_t::iterator iter = mMeshMap.begin(); iter != mMeshMap.end(); iter++)
|
||||
delete (iter->second);
|
||||
for (baked_map_t::iterator iter = mBakedTextureMap.begin(); iter != mBakedTextureMap.end(); iter++)
|
||||
delete (iter->second);
|
||||
for (texture_map_t::iterator iter = mTextureMap.begin(); iter != mTextureMap.end(); iter++)
|
||||
delete (iter->second);
|
||||
}
|
||||
|
||||
const LLVOAvatarDictionary::MeshDictionaryEntry *LLVOAvatarDictionary::getMesh(EMeshIndex index) const
|
||||
{
|
||||
mesh_map_t::const_iterator mesh_iter = mMeshMap.find(index);
|
||||
if (mesh_iter == mMeshMap.end()) return NULL;
|
||||
return mesh_iter->second;
|
||||
}
|
||||
|
||||
const LLVOAvatarDictionary::BakedDictionaryEntry *LLVOAvatarDictionary::getBakedTexture(EBakedTextureIndex index) const
|
||||
{
|
||||
baked_map_t::const_iterator baked_iter = mBakedTextureMap.find(index);
|
||||
if (baked_iter == mBakedTextureMap.end()) return NULL;
|
||||
return baked_iter->second;
|
||||
}
|
||||
|
||||
const LLVOAvatarDictionary::TextureDictionaryEntry *LLVOAvatarDictionary::getTexture(ETextureIndex index) const
|
||||
{
|
||||
texture_map_t::const_iterator texture_iter = mTextureMap.find(index);
|
||||
if (texture_iter == mTextureMap.end()) return NULL;
|
||||
return texture_iter->second;
|
||||
}
|
||||
|
||||
const LLVOAvatarDictionary::WearableDictionaryEntry *LLVOAvatarDictionary::getWearable(EBakedTextureIndex index) const
|
||||
{
|
||||
wearable_map_t::const_iterator wearable_iter = mWearableMap.find(index);
|
||||
if (wearable_iter == mWearableMap.end()) return NULL;
|
||||
return wearable_iter->second;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ETextureIndex LLVOAvatarDefines::getTextureIndex(EBakedTextureIndex index)
|
||||
{
|
||||
return LLVOAvatarDictionary::getInstance()->getBakedTexture(index)->mTextureIndex;
|
||||
}
|
||||
|
|
@ -0,0 +1,209 @@
|
|||
/**
|
||||
* @file llvoavatar.h
|
||||
* @brief Declaration of LLVOAvatar class which is a derivation fo
|
||||
* LLViewerObject
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2007, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LLVOAVATAR_DEFINES_H
|
||||
#define LLVOAVATAR_DEFINES_H
|
||||
|
||||
#include <vector>
|
||||
#include "llwearable.h"
|
||||
#include "llviewerjoint.h"
|
||||
|
||||
namespace LLVOAvatarDefines
|
||||
{
|
||||
|
||||
extern const S32 SCRATCH_TEX_WIDTH;
|
||||
extern const S32 SCRATCH_TEX_HEIGHT;
|
||||
extern const S32 IMPOSTOR_PERIOD;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// texture entry assignment
|
||||
//--------------------------------------------------------------------
|
||||
enum ETextureIndex
|
||||
{
|
||||
TEX_HEAD_BODYPAINT = 0,
|
||||
TEX_UPPER_SHIRT,
|
||||
TEX_LOWER_PANTS,
|
||||
TEX_EYES_IRIS,
|
||||
TEX_HAIR,
|
||||
TEX_UPPER_BODYPAINT,
|
||||
TEX_LOWER_BODYPAINT,
|
||||
TEX_LOWER_SHOES,
|
||||
TEX_HEAD_BAKED, // Pre-composited
|
||||
TEX_UPPER_BAKED, // Pre-composited
|
||||
TEX_LOWER_BAKED, // Pre-composited
|
||||
TEX_EYES_BAKED, // Pre-composited
|
||||
TEX_LOWER_SOCKS,
|
||||
TEX_UPPER_JACKET,
|
||||
TEX_LOWER_JACKET,
|
||||
TEX_UPPER_GLOVES,
|
||||
TEX_UPPER_UNDERSHIRT,
|
||||
TEX_LOWER_UNDERPANTS,
|
||||
TEX_SKIRT,
|
||||
TEX_SKIRT_BAKED, // Pre-composited
|
||||
TEX_HAIR_BAKED, // Pre-composited
|
||||
TEX_NUM_INDICES
|
||||
}; // "Note: if TEX_NUM_ENTRIES changes, update AGENT_TEXTURES in llagentinfo.h, mTextureIndexBaked, and BAKED_TEXTURE_COUNT"
|
||||
// Seraph - Above comment about order is probably obsolete.
|
||||
|
||||
typedef std::vector<ETextureIndex> texture_vec_t;
|
||||
|
||||
enum EBakedTextureIndex
|
||||
{
|
||||
BAKED_HEAD = 0,
|
||||
BAKED_UPPER,
|
||||
BAKED_LOWER,
|
||||
BAKED_EYES,
|
||||
BAKED_SKIRT,
|
||||
BAKED_HAIR,
|
||||
BAKED_NUM_INDICES
|
||||
};
|
||||
typedef std::vector<EBakedTextureIndex> bakedtexture_vec_t;
|
||||
|
||||
// Reference IDs for each mesh. Used as indices for vector of joints
|
||||
enum EMeshIndex
|
||||
{
|
||||
MESH_ID_HAIR = 0,
|
||||
MESH_ID_HEAD,
|
||||
MESH_ID_EYELASH,
|
||||
MESH_ID_UPPER_BODY,
|
||||
MESH_ID_LOWER_BODY,
|
||||
MESH_ID_EYEBALL_LEFT,
|
||||
MESH_ID_EYEBALL_RIGHT,
|
||||
MESH_ID_SKIRT,
|
||||
MESH_ID_NUM_INDICES
|
||||
};
|
||||
typedef std::vector<EMeshIndex> mesh_vec_t;
|
||||
|
||||
typedef std::vector<EWearableType> wearables_vec_t;
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Convenience Functions
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
// Convert from baked texture to associated texture; e.g. BAKED_HEAD -> TEX_HEAD_BAKED
|
||||
ETextureIndex getTextureIndex(EBakedTextureIndex t);
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// LLVOAvatarDictionary
|
||||
//
|
||||
// Holds dictionary static entries for textures, baked textures, meshes, etc.; i.e.
|
||||
// information that is common to all avatars.
|
||||
//
|
||||
// This holds const data - it is initialized once and the contents never change after that.
|
||||
//------------------------------------------------------------------------
|
||||
class LLVOAvatarDictionary : public LLSingleton<LLVOAvatarDictionary>
|
||||
{
|
||||
public:
|
||||
LLVOAvatarDictionary();
|
||||
virtual ~LLVOAvatarDictionary();
|
||||
|
||||
struct TextureDictionaryEntry
|
||||
{
|
||||
TextureDictionaryEntry(const std::string &name,
|
||||
bool is_local_texture,
|
||||
EBakedTextureIndex baked_texture_index = BAKED_NUM_INDICES,
|
||||
const std::string &default_image_name = "",
|
||||
EWearableType wearable_type = WT_INVALID);
|
||||
const std::string mName;
|
||||
const std::string mDefaultImageName;
|
||||
const EWearableType mWearableType;
|
||||
// It's either a local texture xor baked
|
||||
BOOL mIsLocalTexture;
|
||||
BOOL mIsBakedTexture;
|
||||
// If it's a local texture, it may be used by a baked texture
|
||||
BOOL mIsUsedByBakedTexture;
|
||||
EBakedTextureIndex mBakedTextureIndex;
|
||||
};
|
||||
|
||||
struct MeshDictionaryEntry
|
||||
{
|
||||
MeshDictionaryEntry(EBakedTextureIndex baked_index,
|
||||
const std::string &name,
|
||||
U8 level,
|
||||
LLViewerJoint::PickName pick);
|
||||
const std::string mName; // names of mesh types as they are used in avatar_lad.xml
|
||||
// Levels of Detail for each mesh. Must match levels of detail present in avatar_lad.xml
|
||||
// Otherwise meshes will be unable to be found, or levels of detail will be ignored
|
||||
const U8 mLOD;
|
||||
const EBakedTextureIndex mBakedID;
|
||||
const LLViewerJoint::PickName mPickName;
|
||||
};
|
||||
|
||||
struct BakedDictionaryEntry
|
||||
{
|
||||
BakedDictionaryEntry(ETextureIndex tex_index,
|
||||
const std::string &name,
|
||||
U32 num_local_textures, ... );
|
||||
const ETextureIndex mTextureIndex;
|
||||
const std::string mName;
|
||||
texture_vec_t mLocalTextures;
|
||||
};
|
||||
|
||||
struct WearableDictionaryEntry
|
||||
{
|
||||
WearableDictionaryEntry(const std::string &hash_name,
|
||||
U32 num_wearables, ... );
|
||||
const LLUUID mHashID;
|
||||
wearables_vec_t mWearablesVec;
|
||||
};
|
||||
|
||||
typedef std::map<EBakedTextureIndex, BakedDictionaryEntry*> baked_map_t;
|
||||
typedef std::map<ETextureIndex, TextureDictionaryEntry*> texture_map_t;
|
||||
typedef std::map<EMeshIndex, MeshDictionaryEntry*> mesh_map_t;
|
||||
typedef std::map<EBakedTextureIndex, WearableDictionaryEntry*> wearable_map_t;
|
||||
|
||||
const MeshDictionaryEntry *getMesh(EMeshIndex index) const;
|
||||
const BakedDictionaryEntry *getBakedTexture(EBakedTextureIndex index) const;
|
||||
const TextureDictionaryEntry *getTexture(ETextureIndex index) const;
|
||||
const WearableDictionaryEntry *getWearable(EBakedTextureIndex index) const;
|
||||
|
||||
const texture_map_t &getTextures() const { return mTextureMap; }
|
||||
const baked_map_t &getBakedTextures() const { return mBakedTextureMap; }
|
||||
const mesh_map_t &getMeshes() const { return mMeshMap; }
|
||||
const wearable_map_t &getWearables() const { return mWearableMap; }
|
||||
|
||||
private:
|
||||
void initData();
|
||||
void createAssociations();
|
||||
|
||||
texture_map_t mTextureMap;
|
||||
baked_map_t mBakedTextureMap;
|
||||
mesh_map_t mMeshMap;
|
||||
wearable_map_t mWearableMap;
|
||||
|
||||
}; // End LLVOAvatarDictionary
|
||||
|
||||
} // End namespace LLVOAvatarDefines
|
||||
|
||||
#endif
|
||||
|
|
@ -49,6 +49,8 @@
|
|||
#include "llvoavatar.h"
|
||||
#include "llwearable.h"
|
||||
|
||||
using namespace LLVOAvatarDefines;
|
||||
|
||||
// static
|
||||
S32 LLWearable::sCurrentDefinitionVersion = 1;
|
||||
|
||||
|
|
@ -392,6 +394,7 @@ BOOL LLWearable::importFile( LLFILE* file )
|
|||
}
|
||||
else
|
||||
{
|
||||
mType = WT_COUNT;
|
||||
llwarns << "Bad Wearable asset: bad type #" << type << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -501,9 +504,9 @@ BOOL LLWearable::isOldVersion()
|
|||
|
||||
|
||||
S32 te_count = 0;
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == mType )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
|
||||
{
|
||||
te_count++;
|
||||
if( !is_in_map(mTEMap, te ) )
|
||||
|
|
@ -555,9 +558,9 @@ BOOL LLWearable::isDirty()
|
|||
}
|
||||
}
|
||||
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == mType )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
|
||||
{
|
||||
LLViewerImage* avatar_image = avatar->getTEImage( te );
|
||||
if( !avatar_image )
|
||||
|
|
@ -565,7 +568,7 @@ BOOL LLWearable::isDirty()
|
|||
llassert( 0 );
|
||||
continue;
|
||||
}
|
||||
const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID( te ) );
|
||||
const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) );
|
||||
if( avatar_image->getID() != image_id )
|
||||
{
|
||||
return TRUE;
|
||||
|
|
@ -607,11 +610,11 @@ void LLWearable::setParamsToDefaults()
|
|||
void LLWearable::setTexturesToDefaults()
|
||||
{
|
||||
mTEMap.clear();
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == mType )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
|
||||
{
|
||||
mTEMap[te] = LLVOAvatar::getDefaultTEImageID( te );
|
||||
mTEMap[te] = LLVOAvatar::getDefaultTEImageID((ETextureIndex) te );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -654,11 +657,11 @@ void LLWearable::writeToAvatar( BOOL set_by_user )
|
|||
}
|
||||
|
||||
// Pull texture entries
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == mType )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
|
||||
{
|
||||
const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID( te ) );
|
||||
const LLUUID& image_id = get_if_there(mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) );
|
||||
LLViewerImage* image = gImageList.getImage( image_id );
|
||||
avatar->setLocTexTE( te, image, set_by_user );
|
||||
}
|
||||
|
|
@ -731,9 +734,9 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL set_by_user )
|
|||
|
||||
// Pull textures
|
||||
LLViewerImage* image = gImageList.getImage( IMG_DEFAULT_AVATAR );
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == type )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == type )
|
||||
{
|
||||
avatar->setLocTexTE( te, image, set_by_user );
|
||||
}
|
||||
|
|
@ -777,9 +780,9 @@ void LLWearable::readFromAvatar()
|
|||
}
|
||||
|
||||
mTEMap.clear();
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == mType )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
|
||||
{
|
||||
LLViewerImage* image = avatar->getTEImage( te );
|
||||
if( image )
|
||||
|
|
@ -828,11 +831,11 @@ void LLWearable::copyDataFrom( LLWearable* src )
|
|||
}
|
||||
|
||||
// Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed)
|
||||
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
|
||||
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
|
||||
{
|
||||
if( LLVOAvatar::getTEWearableType( te ) == mType )
|
||||
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
|
||||
{
|
||||
const LLUUID& image_id = get_if_there(src->mTEMap, te, LLVOAvatar::getDefaultTEImageID( te ) );
|
||||
const LLUUID& image_id = get_if_there(src->mTEMap, te, LLVOAvatar::getDefaultTEImageID((ETextureIndex) te ) );
|
||||
mTEMap[te] = image_id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class LLWearable
|
|||
public:
|
||||
~LLWearable();
|
||||
|
||||
const LLAssetID& getID() { return mAssetID; }
|
||||
const LLTransactionID& getTransactionID() { return mTransactionID; }
|
||||
const LLAssetID& getID() const { return mAssetID; }
|
||||
const LLTransactionID& getTransactionID() const { return mTransactionID; }
|
||||
|
||||
BOOL isDirty();
|
||||
BOOL isOldVersion();
|
||||
|
|
@ -84,16 +84,16 @@ public:
|
|||
void setType( EWearableType type ) { mType = type; }
|
||||
|
||||
void setName( const std::string& name ) { mName = name; }
|
||||
const std::string& getName() { return mName; }
|
||||
const std::string& getName() const { return mName; }
|
||||
|
||||
void setDescription( const std::string& desc ) { mDescription = desc; }
|
||||
const std::string& getDescription() { return mDescription; }
|
||||
const std::string& getDescription() const { return mDescription; }
|
||||
|
||||
void setPermissions( const LLPermissions& p ) { mPermissions = p; }
|
||||
const LLPermissions& getPermissions() { return mPermissions; }
|
||||
const LLPermissions& getPermissions() const { return mPermissions; }
|
||||
|
||||
void setSaleInfo( const LLSaleInfo& info ) { mSaleInfo = info; }
|
||||
const LLSaleInfo& getSaleInfo() { return mSaleInfo; }
|
||||
const LLSaleInfo& getSaleInfo() const { return mSaleInfo; }
|
||||
|
||||
const std::string& getTypeLabel() const { return LLWearable::sTypeLabel[ mType ]; }
|
||||
const std::string& getTypeName() const { return LLWearable::sTypeName[ mType ]; }
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ void LLWearableList::getAsset( const LLAssetID& assetID, const std::string& wear
|
|||
// static
|
||||
void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status )
|
||||
{
|
||||
BOOL isNewWearable = FALSE;
|
||||
LLWearableArrivedData* data = (LLWearableArrivedData*) userdata;
|
||||
LLWearable* wearable = NULL; // NULL indicates failure
|
||||
|
||||
|
|
@ -124,6 +125,10 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
|
|||
bool res = wearable->importFile( fp );
|
||||
if (!res)
|
||||
{
|
||||
if (wearable->getType() == WT_COUNT)
|
||||
{
|
||||
isNewWearable = TRUE;
|
||||
}
|
||||
delete wearable;
|
||||
wearable = NULL;
|
||||
}
|
||||
|
|
@ -184,7 +189,11 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
|
|||
LLSD args;
|
||||
// *TODO:translate
|
||||
args["TYPE"] = LLAssetType::lookupHumanReadable(data->mAssetType);
|
||||
if (data->mName.empty())
|
||||
if (isNewWearable)
|
||||
{
|
||||
LLNotifications::instance().add("InvalidWearable");
|
||||
}
|
||||
else if (data->mName.empty())
|
||||
{
|
||||
LLNotifications::instance().add("FailedToFindWearableUnnamed", args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,6 +232,7 @@ BOOL LLPipeline::sRenderParticleBeacons = FALSE;
|
|||
BOOL LLPipeline::sRenderSoundBeacons = FALSE;
|
||||
BOOL LLPipeline::sRenderBeacons = FALSE;
|
||||
BOOL LLPipeline::sRenderHighlight = TRUE;
|
||||
BOOL LLPipeline::sForceOldBakedUpload = FALSE;
|
||||
S32 LLPipeline::sUseOcclusion = 0;
|
||||
BOOL LLPipeline::sDelayVBUpdate = TRUE;
|
||||
BOOL LLPipeline::sFastAlpha = TRUE;
|
||||
|
|
|
|||
|
|
@ -391,6 +391,7 @@ public:
|
|||
static S32 sCompiles;
|
||||
|
||||
static BOOL sShowHUDAttachments;
|
||||
static BOOL sForceOldBakedUpload; // If true will not use capabilities to upload baked textures.
|
||||
static S32 sUseOcclusion; // 0 = no occlusion, 1 = read only, 2 = read/write
|
||||
static BOOL sDelayVBUpdate;
|
||||
static BOOL sFastAlpha;
|
||||
|
|
|
|||
Loading…
Reference in New Issue