From 8c99b37ac0480addcf14cb8643cba85bebe822ad Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Tue, 17 Nov 2009 16:22:12 -0500 Subject: EXT-2535 wearables saved in 2.0 don't load in 1.23 Incrementing wearable version number was a bad thing here - we want to keep all wearables reporting as version 22 until we make a breaking change. Reverted the version number and put in a hack to force any version 24 wearables to be re-saved as version 22. The hack can be removed before release, as it should only affect internal testers. Code reviewed by Seraph --HG-- branch : avatar-pipeline --- indra/newview/llwearable.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'indra/newview/llwearable.cpp') diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index e37dffd526..2849cfa20e 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -225,7 +225,13 @@ BOOL LLWearable::importFile( LLFILE* file ) return FALSE; } - if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion ) + + // Temoprary hack to allow wearables with definition version 24 to still load. + // This should only affect lindens and NDA'd testers who have saved wearables in 2.0 + // the extra check for version == 24 can be removed before release, once internal testers + // have loaded these wearables again. See hack pt 2 at bottom of function to ensure that + // these wearables get re-saved with version definition 22. + if( mDefinitionVersion > LLWearable::sCurrentDefinitionVersion && mDefinitionVersion != 24 ) { llwarns << "Wearable asset has newer version (" << mDefinitionVersion << ") than XML (" << LLWearable::sCurrentDefinitionVersion << ")" << llendl; return FALSE; @@ -414,6 +420,18 @@ 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; } -- cgit v1.2.3 From 5dea0791f7087f2ce2bbe2bdce49d62f1a6f1f92 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 18 Nov 2009 14:51:14 -0500 Subject: EXT-2581 : Old items still display as "(worn)" even after I change outfits Added gInventory.notifyObservers to idle callbacks so it gets triggered without explicit notifyObservers synchronization. Added more state tracking for attachments, wearables, and links of those types, so that they're marked as changed properly. --- indra/newview/llwearable.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llwearable.cpp') diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 2849cfa20e..ced0b64896 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -38,6 +38,7 @@ #include "lllocaltextureobject.h" #include "llviewertexturelist.h" #include "llinventorymodel.h" +#include "llinventoryobserver.h" #include "llviewerregion.h" #include "llvoavatar.h" #include "llvoavatarself.h" @@ -1098,6 +1099,12 @@ void LLWearable::destroyTextures() mSavedTEMap.clear(); } + +void LLWearable::setLabelUpdated() const +{ + gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID()); +} + struct LLWearableSaveData { EWearableType mType; -- cgit v1.2.3 From ef63c80766811a86d8ea6ed90d409b6451744e6b Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 23 Nov 2009 11:46:15 -0500 Subject: 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-pipeline --- indra/newview/llwearable.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'indra/newview/llwearable.cpp') diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index ced0b64896..d92da4ef44 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -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; } -- cgit v1.2.3