EXT-1822 changing textures in appearance not immediate
Texture changes in appearance editor were not taking effect immediately. Changed texture setting code to refresh local bake of textures. Code reviewed by Virmeow-7.2.2
parent
e5484e56b3
commit
4e6fd496ee
|
|
@ -668,9 +668,17 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
|
|||
return MAX_WEARABLES_PER_TYPE;
|
||||
}
|
||||
|
||||
void LLAgentWearables::popWearable(const EWearableType type, LLWearable *wearable)
|
||||
void LLAgentWearables::popWearable(LLWearable *wearable)
|
||||
{
|
||||
U32 index = getWearableIndex(type, wearable);
|
||||
if (wearable == NULL)
|
||||
{
|
||||
// nothing to do here. move along.
|
||||
return;
|
||||
}
|
||||
|
||||
U32 index = getWearableIndex(wearable);
|
||||
EWearableType type = wearable->getType();
|
||||
|
||||
if (index < MAX_WEARABLES_PER_TYPE && index < getWearableCount(type))
|
||||
{
|
||||
popWearable(type, index);
|
||||
|
|
@ -685,8 +693,14 @@ void LLAgentWearables::popWearable(const EWearableType type, U32 index)
|
|||
}
|
||||
}
|
||||
|
||||
U32 LLAgentWearables::getWearableIndex(const EWearableType type, LLWearable *wearable)
|
||||
U32 LLAgentWearables::getWearableIndex(LLWearable *wearable)
|
||||
{
|
||||
if (wearable == NULL)
|
||||
{
|
||||
return MAX_WEARABLES_PER_TYPE;
|
||||
}
|
||||
|
||||
const EWearableType type = wearable->getType();
|
||||
wearableentry_map_t::const_iterator wearable_iter = mWearableDatas.find(type);
|
||||
if (wearable_iter == mWearableDatas.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ private:
|
|||
// Low-level data structure setter - public access is via setWearableItem, etc.
|
||||
void setWearable(const EWearableType type, U32 index, LLWearable *wearable);
|
||||
U32 pushWearable(const EWearableType type, LLWearable *wearable);
|
||||
void popWearable(const EWearableType type, LLWearable *wearable);
|
||||
void popWearable(LLWearable *wearable);
|
||||
void popWearable(const EWearableType type, U32 index);
|
||||
|
||||
public:
|
||||
|
|
@ -114,7 +114,7 @@ public:
|
|||
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove);
|
||||
void setWearableName(const LLUUID& item_id, const std::string& new_name);
|
||||
void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index);
|
||||
U32 getWearableIndex(const EWearableType type, LLWearable *wearable);
|
||||
U32 getWearableIndex(LLWearable *wearable);
|
||||
protected:
|
||||
void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false);
|
||||
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable);
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ void LLPanelEditWearable::saveChanges()
|
|||
return;
|
||||
}
|
||||
|
||||
U32 index = gAgentWearables.getWearableIndex(mWearablePtr->getType(), mWearablePtr);
|
||||
U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
|
||||
|
||||
if (mWearablePtr->getName().compare(mTextEditor->getText()) != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -187,8 +187,8 @@ public:
|
|||
void setLocalTextureTE(U8 te, LLViewerTexture* image, BOOL set_by_user, U32 index);
|
||||
const LLUUID& grabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const;
|
||||
BOOL canGrabLocalTexture(LLVOAvatarDefines::ETextureIndex type, U32 index) const;
|
||||
protected:
|
||||
/*virtual*/ void setLocalTexture(LLVOAvatarDefines::ETextureIndex type, LLViewerTexture* tex, BOOL baked_version_exits, U32 index);
|
||||
protected:
|
||||
/*virtual*/ void setBakedReady(LLVOAvatarDefines::ETextureIndex type, BOOL baked_version_exists, U32 index);
|
||||
void localTextureLoaded(BOOL succcess, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata);
|
||||
void getLocalTextureByteCount(S32* gl_byte_count) const;
|
||||
|
|
|
|||
|
|
@ -537,6 +537,7 @@ BOOL LLWearable::isDirty() const
|
|||
const LLUUID& saved_image_id = saved_iter->second->getID();
|
||||
if (saved_image_id != current_image_id)
|
||||
{
|
||||
// saved vs current images are different, wearable is dirty
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue