From 8e5d95cba8a65d01ea605ebbfba7d6065cd5bd40 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 25 Feb 2010 10:59:59 -0500 Subject: For EXT-5333: Bodyparts missing from appearance and COF. createStandardWearables() now COF-based --- indra/newview/llagentwearables.cpp | 117 ++++++++++++++++++++++++++++++++----- indra/newview/llappearancemgr.cpp | 1 + indra/newview/llstartup.cpp | 2 +- 3 files changed, 103 insertions(+), 17 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 08cd101b01..11ac103b3a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -245,6 +245,7 @@ void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) // wearables LLAgentWearables::createStandardWearablesAllDoneCallback::~createStandardWearablesAllDoneCallback() { + llinfos << "destructor - all done?" << llendl; gAgentWearables.createStandardWearablesAllDone(); } @@ -271,10 +272,16 @@ LLAgentWearables::addWearableToAgentInventoryCallback::addWearableToAgentInvento mTodo(todo), mCB(cb) { + llinfos << "constructor" << llendl; } void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& inv_item) { + if (mTodo & CALL_CREATESTANDARDDONE) + { + llinfos << "callback fired, inv_item " << inv_item.asString() << llendl; + } + if (inv_item.isNull()) return; @@ -294,6 +301,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i */ if (mTodo & CALL_CREATESTANDARDDONE) { + LLAppearanceManager::instance().addCOFItemLink(inv_item,false); gAgentWearables.createStandardWearablesDone(mType, mIndex); } if (mTodo & CALL_MAKENEWOUTFITDONE) @@ -311,6 +319,8 @@ void LLAgentWearables::addWearabletoAgentInventoryDone(const S32 type, const LLUUID& item_id, LLWearable* wearable) { + llinfos << "type " << type << " index " << index << " item " << item_id.asString() << llendl; + if (item_id.isNull()) return; @@ -1140,6 +1150,80 @@ void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type, wearable->setLocalTextureObject(texture_type, lto); } +class OnWearableItemCreatedCB: public LLInventoryCallback +{ +public: + OnWearableItemCreatedCB(): + mWearablesAwaitingItems(WT_COUNT,NULL) + { + llinfos << "created callback" << llendl; + } + /* virtual */ void fire(const LLUUID& inv_item) + { + llinfos << "One item created " << inv_item.asString() << llendl; + LLViewerInventoryItem *item = gInventory.getItem(inv_item); + mItemsToLink.put(item); + updatePendingWearable(inv_item); + } + ~OnWearableItemCreatedCB() + { + llinfos << "All items created" << llendl; + LLPointer link_waiter = new LLUpdateAppearanceOnDestroy; + LLAppearanceManager::instance().linkAll(LLAppearanceManager::instance().getCOF(), + mItemsToLink, + link_waiter); + } + void addPendingWearable(LLWearable *wearable) + { + if (!wearable) + { + llwarns << "no wearable" << llendl; + return; + } + EWearableType type = wearable->getType(); + if (typeisWearableType()) + { + llwarns << "non-wearable item found" << llendl; + return; + } + if (item && item->isWearableType()) + { + EWearableType type = item->getWearableType(); + if (type < WT_COUNT) + { + LLWearable *wearable = mWearablesAwaitingItems[type]; + if (wearable) + wearable->setItemID(inv_item); + } + else + { + llwarns << "invalid wearable type " << type << llendl; + } + } + } + +private: + LLInventoryModel::item_array_t mItemsToLink; + std::vector mWearablesAwaitingItems; +}; + void LLAgentWearables::createStandardWearables(BOOL female) { llwarns << "Creating Standard " << (female ? "female" : "male") @@ -1169,35 +1253,34 @@ void LLAgentWearables::createStandardWearables(BOOL female) FALSE //WT_SKIRT }; + LLPointer cb = new OnWearableItemCreatedCB; for (S32 i=0; i < WT_COUNT; i++) { - bool once = false; - LLPointer donecb = NULL; if (create[i]) { - if (!once) - { - once = true; - donecb = new createStandardWearablesAllDoneCallback; - } llassert(getWearableCount((EWearableType)i) == 0); LLWearable* wearable = LLWearableList::instance().createNewWearable((EWearableType)i); - U32 index = pushWearable((EWearableType)i,wearable); + ((OnWearableItemCreatedCB*)(&(*cb)))->addPendingWearable(wearable); // no need to update here... - LLPointer cb = - new addWearableToAgentInventoryCallback( - donecb, - i, - index, - wearable, - addWearableToAgentInventoryCallback::CALL_CREATESTANDARDDONE); - addWearableToAgentInventory(cb, wearable, LLUUID::null, FALSE); + LLUUID category_id = LLUUID::null; + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + category_id, + wearable->getTransactionID(), + wearable->getName(), + wearable->getDescription(), + wearable->getAssetType(), + LLInventoryType::IT_WEARABLE, + wearable->getType(), + wearable->getPermissions().getMaskNextOwner(), + cb); } } } void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index) { + llinfos << "type " << type << " index " << index << llendl; if (mAvatarObject) { mAvatarObject->updateVisualParams(); @@ -1208,6 +1291,8 @@ void LLAgentWearables::createStandardWearablesAllDone() { // ... because sendAgentWearablesUpdate will notify inventory // observers. + llinfos << "all done?" << llendl; + mWearablesLoaded = TRUE; checkWearablesLoaded(); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c9da08701d..71df064236 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -565,6 +565,7 @@ public: { llinfos << "Recovered item for type " << mType << llendl; LLViewerInventoryItem *itemp = gInventory.getItem(item_id); + mWearable->setItemID(item_id); LLPointer cb = new RecoveredItemLinkCB(mType,mWearable,mHolder); mHolder->mTypesToRecover.erase(mType); link_inventory_item( gAgent.getID(), diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 83f773fadc..1f829458e9 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2554,7 +2554,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, LLUUID cat_id = findDescendentCategoryIDByName( gInventory.getLibraryRootFolderID(), outfit_folder_name); - if (cat_id.isNull()) + if (true || (cat_id.isNull())) { gAgentWearables.createStandardWearables(gender); } -- cgit v1.2.3 From 10058c982f60140915b7b83e32f26d8700658c6c Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 25 Feb 2010 11:04:46 -0500 Subject: For EXT-5333: Bodyparts missing from appearance and COF. --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1f829458e9..83f773fadc 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2554,7 +2554,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, LLUUID cat_id = findDescendentCategoryIDByName( gInventory.getLibraryRootFolderID(), outfit_folder_name); - if (true || (cat_id.isNull())) + if (cat_id.isNull()) { gAgentWearables.createStandardWearables(gender); } -- cgit v1.2.3 From 27c83bf399f2ca91f0444aa97a98af00a2483c30 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 25 Feb 2010 17:37:38 -0500 Subject: For EXT-5333: Bodyparts missing from appearance and COF. Fixed invisible to self after first login via createStandardWearables(). (Patch from Nyx) --- indra/newview/llvoavatar.cpp | 12 ++++++++++++ indra/newview/llvoavatarself.cpp | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 72b9c6df98..9c3ef2672f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2121,6 +2121,10 @@ static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { + if (isSelf()) + { + llinfos << "self idle update" << llendl; + } LLMemType mt(LLMemType::MTYPE_AVATAR); LLFastTimer t(FTM_AVATAR_UPDATE); @@ -2535,6 +2539,10 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) void LLVOAvatar::idleUpdateLoadingEffect() { + if (isSelf()) + { + llinfos << "self idle update loading effect" << llendl; + } // update visibility when avatar is partially loaded if (updateIsFullyLoaded()) // changed? { @@ -5883,6 +5891,10 @@ void LLVOAvatar::updateRuthTimer(bool loading) BOOL LLVOAvatar::processFullyLoadedChange(bool loading) { + if (isSelf()) + { + llinfos << "isSelf, loading " << loading << llendl; + } // we wait a little bit before giving the all clear, // to let textures settle down const F32 PAUSE = 1.f; diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 00998b300a..a93cf780b8 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1653,8 +1653,11 @@ BOOL LLVOAvatarSelf::updateIsFullyLoaded() { BOOL loading = FALSE; - // do we have a shape? - if (visualParamWeightsAreDefault()) + // do we have our body parts? + if (gAgentWearables.getWearableCount(WT_SHAPE) == 0 || + gAgentWearables.getWearableCount(WT_HAIR) == 0 || + gAgentWearables.getWearableCount(WT_EYES) == 0 || + gAgentWearables.getWearableCount(WT_SKIN) == 0) { loading = TRUE; } -- cgit v1.2.3 From 3a6af93e6be0c7a07cc0c0b0a225893c01ac5340 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 26 Feb 2010 13:59:41 -0500 Subject: log spam cleanup. --- indra/newview/llvoavatar.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9c3ef2672f..72b9c6df98 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2121,10 +2121,6 @@ static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { - if (isSelf()) - { - llinfos << "self idle update" << llendl; - } LLMemType mt(LLMemType::MTYPE_AVATAR); LLFastTimer t(FTM_AVATAR_UPDATE); @@ -2539,10 +2535,6 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) void LLVOAvatar::idleUpdateLoadingEffect() { - if (isSelf()) - { - llinfos << "self idle update loading effect" << llendl; - } // update visibility when avatar is partially loaded if (updateIsFullyLoaded()) // changed? { @@ -5891,10 +5883,6 @@ void LLVOAvatar::updateRuthTimer(bool loading) BOOL LLVOAvatar::processFullyLoadedChange(bool loading) { - if (isSelf()) - { - llinfos << "isSelf, loading " << loading << llendl; - } // we wait a little bit before giving the all clear, // to let textures settle down const F32 PAUSE = 1.f; -- cgit v1.2.3 From a681fc5b2b52871afc7578a1ef530f3770cd7061 Mon Sep 17 00:00:00 2001 From: Chuck Linden Date: Fri, 26 Feb 2010 16:03:10 -0500 Subject: Removed typo. http://jira.secondlife.com/browse/EXT-5821 --- indra/newview/skins/default/xui/en/panel_teleport_history.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index a628e76bc0..0d4f67f94c 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -53,7 +53,7 @@ top="0" width="380"> - 5 + Date: Fri, 26 Feb 2010 16:07:11 -0600 Subject: VWR-17462 Fix for some updates not getting applied properly. --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index f1b27fb4df..86d8204473 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1412,7 +1412,7 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) return res; } - dirtySpatialGroup(); + dirtySpatialGroup(drawable->isState(LLDrawable::IN_REBUILD_Q1)); BOOL compiled = FALSE; -- cgit v1.2.3 From b84ae2164b641567e443a7c7f9c620887baae700 Mon Sep 17 00:00:00 2001 From: Chuck Linden Date: Fri, 26 Feb 2010 17:17:21 -0500 Subject: Cleanup pass on environment editor floaters for consistency and to eliminate widget overlapping. https://jira.secondlife.com/browse/EXT-4552 --- .../skins/default/xui/en/floater_env_settings.xml | 12 +- .../newview/skins/default/xui/en/floater_water.xml | 109 +-- .../default/xui/en/floater_windlight_options.xml | 741 +++++++++++---------- 3 files changed, 440 insertions(+), 422 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_env_settings.xml b/indra/newview/skins/default/xui/en/floater_env_settings.xml index 8c87bd42dd..14f9e2db95 100644 --- a/indra/newview/skins/default/xui/en/floater_env_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_env_settings.xml @@ -135,28 +135,28 @@ width="210" />