EXT-2535 wearables created in 2.0 don't load in 1.23
Re-opening issue for a second pass at it. This pass updates the code that was intended to make all loaded wearables auto-save themselves back to wearable version 22 (from 24). Code was not being hit, so relocated it to after wearable had been added to llagentwearables to ensure the save succeeded. Will be post-reviewed before push. --HG-- branch : avatar-pipelinemeow-7.2.2
parent
98c184619b
commit
ef63c80766
|
|
@ -675,7 +675,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab
|
|||
{
|
||||
wearable_vec[index] = wearable;
|
||||
old_wearable->setLabelUpdated();
|
||||
mAvatarObject->wearableUpdated(wearable->getType());
|
||||
wearableUpdated(wearable);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -690,13 +690,32 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
|
|||
if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE)
|
||||
{
|
||||
mWearableDatas[type].push_back(wearable);
|
||||
mAvatarObject->wearableUpdated(wearable->getType());
|
||||
wearable->setLabelUpdated();
|
||||
wearableUpdated(wearable);
|
||||
return mWearableDatas[type].size()-1;
|
||||
}
|
||||
return MAX_WEARABLES_PER_TYPE;
|
||||
}
|
||||
|
||||
void LLAgentWearables::wearableUpdated(LLWearable *wearable)
|
||||
{
|
||||
mAvatarObject->wearableUpdated(wearable->getType());
|
||||
wearable->setLabelUpdated();
|
||||
|
||||
// Hack pt 2. If the wearable we just loaded has definition version 24,
|
||||
// then force a re-save of this wearable after slamming the version number to 22.
|
||||
// This number was incorrectly incremented for internal builds before release, and
|
||||
// this fix will ensure that the affected wearables are re-saved with the right version number.
|
||||
// the versions themselves are compatible. This code can be removed before release.
|
||||
if( wearable->getDefinitionVersion() == 24 )
|
||||
{
|
||||
wearable->setDefinitionVersion(22);
|
||||
U32 index = getWearableIndex(wearable);
|
||||
llinfos << "forcing werable type " << wearable->getType() << " to version 22 from 24" << llendl;
|
||||
saveWearable(wearable->getType(),index,TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void LLAgentWearables::popWearable(LLWearable *wearable)
|
||||
{
|
||||
if (wearable == NULL)
|
||||
|
|
|
|||
|
|
@ -107,6 +107,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 wearableUpdated(LLWearable *wearable);
|
||||
void popWearable(LLWearable *wearable);
|
||||
void popWearable(const EWearableType type, U32 index);
|
||||
|
||||
|
|
|
|||
|
|
@ -421,18 +421,6 @@ BOOL LLWearable::importFile( LLFILE* file )
|
|||
// copy all saved param values to working params
|
||||
revertValues();
|
||||
|
||||
// Hack pt 2. If the wearable we just loaded has definition version 24,
|
||||
// then force a re-save of this wearable after slamming the version number to 22.
|
||||
// This number was incorrectly incremented for internal builds before release, and
|
||||
// this fix will ensure that the affected wearables are re-saved with the right version number.
|
||||
// the versions themselves are compatible. This code can be removed before release.
|
||||
if( mDefinitionVersion == 24 )
|
||||
{
|
||||
mDefinitionVersion = 22;
|
||||
U32 index = gAgentWearables.getWearableIndex(this);
|
||||
gAgentWearables.saveWearable(mType,index,TRUE);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ public:
|
|||
const std::string& getTypeName() const;
|
||||
LLAssetType::EType getAssetType() const;
|
||||
LLLocalTextureObject* getLocalTextureObject(S32 index) const;
|
||||
S32 getDefinitionVersion() const { return mDefinitionVersion; }
|
||||
void setDefinitionVersion( S32 new_version ) { mDefinitionVersion = new_version; }
|
||||
|
||||
public:
|
||||
typedef std::vector<LLVisualParam*> visual_param_vec_t;
|
||||
|
|
|
|||
Loading…
Reference in New Issue