STORM-702 FIXED Made it possible to wear partial outfits
Enabled the "Replace Current Outfit" option for incomplete outfits (i.e. those that don't contain full set of body parts).master
parent
cc3f0d287c
commit
05c14aa558
|
|
@ -1300,8 +1300,16 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check whether the outfit contains the full set of body parts (shape+skin+hair+eyes).
|
||||
return getCanMakeFolderIntoOutfit(outfit_cat_id);
|
||||
// Check whether the outfit contains any wearables we aren't wearing already (STORM-702).
|
||||
LLInventoryModel::cat_array_t cats;
|
||||
LLInventoryModel::item_array_t items;
|
||||
LLFindWearablesEx is_worn(/*is_worn=*/ false, /*include_body_parts=*/ true);
|
||||
gInventory.collectDescendentsIf(outfit_cat_id,
|
||||
cats,
|
||||
items,
|
||||
LLInventoryModel::EXCLUDE_TRASH,
|
||||
is_worn);
|
||||
return items.size() > 0;
|
||||
}
|
||||
|
||||
void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category)
|
||||
|
|
|
|||
|
|
@ -686,6 +686,12 @@ bool LLFindWearablesEx::operator()(LLInventoryCategory* cat, LLInventoryItem* it
|
|||
return false;
|
||||
}
|
||||
|
||||
// Skip broken links.
|
||||
if (vitem->getIsBrokenLink())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool) get_is_item_worn(item->getUUID()) == mIsWorn;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue