summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Tulla <tulla@lindenlab.com>2009-10-16 20:11:51 +0000
committerEric Tulla <tulla@lindenlab.com>2009-10-16 20:11:51 +0000
commit850c0f1e33ed5188b5346a7aeb3099ca29e0d2d0 (patch)
tree107b7c906cc689987f43c61c90fc74cd2cfe6306
parentadaae9e082fb9200e2ea1c7cbc6e26cb5de35fa1 (diff)
Merge of latest avatar pipeline working branch into viewer2.0 branch.
Result of: (NO CONFLICTS) svn merge -r 135985:136503 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/currently-worn-folder-11 .
-rw-r--r--indra/llcommon/llassettype.cpp10
-rw-r--r--indra/newview/llappearancemgr.cpp88
-rw-r--r--indra/newview/llappearancemgr.h5
-rw-r--r--indra/newview/llfloaterinventory.cpp165
-rw-r--r--indra/newview/llfloaterinventory.h14
-rw-r--r--indra/newview/llfolderview.h2
-rw-r--r--indra/newview/llinventorybridge.cpp14
-rw-r--r--indra/newview/llviewerinventory.cpp20
-rw-r--r--indra/newview/llviewerinventory.h2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_landmarks.xml1
11 files changed, 217 insertions, 112 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index 5d7672b378..0b016b81fb 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -112,12 +112,12 @@ LLAssetDictionary::LLAssetDictionary()
ensemble_num <= S32(LLAssetType::AT_FOLDER_ENSEMBLE_END);
ensemble_num++)
{
- addEntry(LLAssetType::EType(ensemble_num), new AssetEntry("ENSEMBLE", "ensemble", "ensemble", "New Folder", DAD_CATEGORY, TRUE, FALSE));
+ addEntry(LLAssetType::EType(ensemble_num), new AssetEntry("ENSEMBLE", "ensemble", "ensemble", "New Folder", DAD_CATEGORY, FALSE, FALSE));
}
- addEntry(LLAssetType::AT_CURRENT_OUTFIT, new AssetEntry("CURRENT", "current", "current outfit", "Current Outfit", DAD_CATEGORY, FALSE, TRUE));
- addEntry(LLAssetType::AT_OUTFIT, new AssetEntry("OUTFIT", "outfit", "outfit", "New Outfit", DAD_CATEGORY, TRUE, FALSE));
- addEntry(LLAssetType::AT_MY_OUTFITS, new AssetEntry("MY_OUTFITS", "my_otfts", "my outfits", "My Outfits", DAD_CATEGORY, FALSE, TRUE));
+ addEntry(LLAssetType::AT_CURRENT_OUTFIT, new AssetEntry("CURRENT", "current", "current outfit", "Current Look", DAD_CATEGORY, FALSE, TRUE));
+ addEntry(LLAssetType::AT_OUTFIT, new AssetEntry("OUTFIT", "outfit", "outfit", "New Look", DAD_CATEGORY, FALSE, FALSE));
+ addEntry(LLAssetType::AT_MY_OUTFITS, new AssetEntry("MY_OUTFITS", "my_otfts", "my outfits", "My Looks", DAD_CATEGORY, FALSE, TRUE));
addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, "New Folder", DAD_NONE, FALSE, FALSE));
};
@@ -211,7 +211,7 @@ LLAssetType::EType LLAssetType::lookupHumanReadable(const std::string& readable_
iter++)
{
const AssetEntry *entry = iter->second;
- if (readable_name == entry->mHumanName)
+ if (entry->mHumanName && (readable_name == entry->mHumanName))
{
return iter->first;
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index cf8d852dfe..0cf28f590a 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -418,11 +418,7 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
if (!append && total_links > 0)
{
- for (S32 i = 0; i < cof_items.count(); ++i)
- {
- gInventory.purgeObject(cof_items.get(i)->getUUID());
- }
- gInventory.notifyObservers();
+ purgeCOFBeforeRebuild(category);
}
LLPointer<LLUpdateAppearanceOnDestroy> link_waiter = new LLUpdateAppearanceOnDestroy;
@@ -521,6 +517,68 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
}
}
+/* static */ bool LLAppearanceManager::isMandatoryWearableType(EWearableType type)
+{
+ return (type==WT_SHAPE) || (type==WT_SKIN) || (type== WT_HAIR) || (type==WT_EYES);
+}
+
+// For mandatory body parts.
+/* static */ void LLAppearanceManager::checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found)
+{
+ LLInventoryModel::cat_array_t new_cats;
+ LLInventoryModel::item_array_t new_items;
+ gInventory.collectDescendents(category, new_cats, new_items,
+ LLInventoryModel::EXCLUDE_TRASH);
+ std::set<EWearableType> wt_types_found;
+ for (S32 i = 0; i < new_items.count(); ++i)
+ {
+ LLViewerInventoryItem *itemp = new_items.get(i);
+ if (itemp->isWearableType())
+ {
+ EWearableType type = itemp->getWearableType();
+ if (isMandatoryWearableType(type))
+ {
+ types_found.insert(type);
+ }
+ }
+ }
+}
+
+// Remove everything from the COF that we safely can before replacing
+// with contents of new category. This means preserving any mandatory
+// body parts that aren't present in the new category, and getting rid
+// of everything else.
+/* static */ void LLAppearanceManager::purgeCOFBeforeRebuild(const LLUUID& category)
+{
+ // See which mandatory body types are present in the new category.
+ std::set<EWearableType> wt_types_found;
+ checkMandatoryWearableTypes(category,wt_types_found);
+
+ LLInventoryModel::cat_array_t cof_cats;
+ LLInventoryModel::item_array_t cof_items;
+ gInventory.collectDescendents(getCOF(), cof_cats, cof_items,
+ LLInventoryModel::EXCLUDE_TRASH);
+ for (S32 i = 0; i < cof_items.count(); ++i)
+ {
+ LLViewerInventoryItem *itemp = cof_items.get(i);
+ if (itemp->isWearableType())
+ {
+ EWearableType type = itemp->getWearableType();
+ if (!isMandatoryWearableType(type) || (wt_types_found.find(type) != wt_types_found.end()))
+ {
+ // Not mandatory or supplied by the new category - OK to delete
+ gInventory.purgeObject(cof_items.get(i)->getUUID());
+ }
+ }
+ else
+ {
+ // Not a wearable - always purge
+ gInventory.purgeObject(cof_items.get(i)->getUUID());
+ }
+ }
+ gInventory.notifyObservers();
+}
+
// Replace COF contents from a given outfit folder.
/* static */ void LLAppearanceManager::rebuildCOFFromOutfit(const LLUUID& category)
{
@@ -539,29 +597,17 @@ void removeDuplicateItems(LLInventoryModel::item_array_t& dst, const LLInventory
return;
}
- const LLUUID &current_outfit_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_CURRENT_OUTFIT);
// Processes that take time should show the busy cursor
//inc_busy_count();
- LLInventoryModel::cat_array_t cof_cats;
- LLInventoryModel::item_array_t cof_items;
- gInventory.collectDescendents(current_outfit_id, cof_cats, cof_items,
- LLInventoryModel::EXCLUDE_TRASH);
-
//dumpCat(current_outfit_id,"COF before remove:");
- if (items.count() > 0)
- {
- for (S32 i = 0; i < cof_items.count(); ++i)
- {
- gInventory.purgeObject(cof_items.get(i)->getUUID());
- }
- gInventory.notifyObservers();
- }
-
//dumpCat(current_outfit_id,"COF after remove:");
+ purgeCOFBeforeRebuild(category);
+
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
+ LLUUID current_outfit_id = getCOF();
LLAppearanceManager::shallowCopyCategory(category, current_outfit_id, link_waiter);
//dumpCat(current_outfit_id,"COF after shallow copy:");
@@ -907,6 +953,7 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )
/* static */
void LLAppearanceManager::wearEnsemble( LLInventoryCategory* cat, bool do_update )
{
+#if SUPPORT_ENSEMBLES
// BAP add check for already in COF.
LLPointer<LLInventoryCallback> cb = do_update ? new ModifiedCOFCallback : 0;
link_inventory_item( gAgent.getID(),
@@ -915,6 +962,7 @@ void LLAppearanceManager::wearEnsemble( LLInventoryCategory* cat, bool do_update
cat->getName(),
LLAssetType::AT_LINK_FOLDER,
cb);
+#endif
}
/* static */
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index fe24696182..928b5f2bcd 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -78,6 +78,11 @@ private:
bool follow_folder_links);
static void onWearableAssetFetch(LLWearable* wearable, void* data);
static void updateAgentWearables(LLWearableHoldingPattern* holder, bool append);
+ static bool isMandatoryWearableType(EWearableType type);
+ static void checkMandatoryWearableTypes(const LLUUID& category, std::set<EWearableType>& types_found);
+ static void purgeCOFBeforeRebuild(const LLUUID& category);
};
+#define SUPPORT_ENSEMBLES 0
+
#endif
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index d9cd929606..126dcc6f76 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -1170,7 +1170,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p)
mSortOrderSetting(p.sort_order_setting),
mInventory(p.inventory),
mAllowMultiSelect(p.allow_multi_select),
- mHasInventoryConnection(false)
+ mHasInventoryConnection(false),
+ mStartFolderString(p.start_folder)
{
// contex menu callbacks
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2));
@@ -1230,15 +1231,21 @@ BOOL LLInventoryPanel::postBuild()
// build everything.
mInventoryObserver = new LLInventoryPanelObserver(this);
mInventory->addObserver(mInventoryObserver);
+
+ // determine the root folder, if any, so inventory contents show just the children
+ // of that folder (i.e. not including the folder itself).
+ const LLAssetType::EType preferred_type = LLAssetType::lookupHumanReadable(mStartFolderString);
+ mStartFolderID = (preferred_type != LLAssetType::AT_NONE ? gInventory.findCategoryUUIDForType(preferred_type) : LLUUID::null);
+
// build view of inventory if inventory ready, otherwise wait for modelChanged() callback
if (mInventory->isInventoryUsable() && !mHasInventoryConnection)
{
- rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD);
+ rebuildViewsFor(mStartFolderID);
mHasInventoryConnection = true;
}
// bit of a hack to make sure the inventory is open.
- mFolders->openFolder(std::string("My Inventory"));
+ mFolders->openFolder(preferred_type != LLAssetType::AT_NONE ? LLAssetType::lookupCategoryName(preferred_type) : "My Inventory");
if (mSortOrderSetting != INHERIT_SORT_ORDER)
{
@@ -1271,7 +1278,7 @@ LLInventoryPanel::~LLInventoryPanel()
mScroller = NULL;
}
- LLMemType mt(LLMemType::MTYPE_INVENTORY_FROM_XML);
+LLMemType mt(LLMemType::MTYPE_INVENTORY_FROM_XML); // ! BUG ! Should this be removed?
void LLInventoryPanel::draw()
{
// select the desired item (in case it wasn't loaded when the selection was requested)
@@ -1336,7 +1343,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
// inventory just initialized, do complete build
if ((mask & LLInventoryObserver::ADD) && gInventory.getChangedIDs().empty() && !mHasInventoryConnection)
{
- rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD);
+ rebuildViewsFor(mStartFolderID);
mHasInventoryConnection = true;
return;
}
@@ -1449,7 +1456,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
-void LLInventoryPanel::rebuildViewsFor(const LLUUID& id, U32 mask)
+void LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
{
LLFolderViewItem* old_view = NULL;
@@ -1467,81 +1474,99 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id)
{
LLMemType mt(LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS);
LLFolderViewItem* itemp = NULL;
- LLInventoryObject* objectp = gInventory.getObject(id);
+ LLInventoryObject* objectp = NULL;
- if (objectp)
- {
- if (objectp->getType() <= LLAssetType::AT_NONE ||
- objectp->getType() >= LLAssetType::AT_COUNT)
- {
- llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
- << ((S32) objectp->getType())
- << " (shouldn't happen)" << llendl;
- }
- else if (objectp->getType() == LLAssetType::AT_CATEGORY &&
- objectp->getActualType() != LLAssetType::AT_LINK_FOLDER)
- {
- LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
- objectp->getType(),
- LLInventoryType::IT_CATEGORY,
- this,
- objectp->getUUID());
-
- if (new_listener)
+ // Don't add the start folder (the inventory panel will show contents
+ // beginning with the children of the starting folder, excluding the starting folder itself).
+ if (id != mStartFolderID)
+ {
+ objectp = gInventory.getObject(id);
+ if (objectp)
+ {
+ if (objectp->getType() <= LLAssetType::AT_NONE ||
+ objectp->getType() >= LLAssetType::AT_COUNT)
{
- LLFolderViewFolder::Params p;
- p.name = new_listener->getDisplayName();
- p.icon = LLUI::getUIImage("Inv_FolderClosed");
- p.icon_open = LLUI::getUIImage("Inv_FolderOpen");
- p.root = mFolders;
- p.listener = new_listener;
- LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(p);
-
- folderp->setItemSortOrder(mFolders->getSortOrder());
- itemp = folderp;
+ llwarns << "LLInventoryPanel::buildNewViews called with objectp->mType == "
+ << ((S32) objectp->getType())
+ << " (shouldn't happen)" << llendl;
}
- }
- else
- {
- // Build new view for item
- LLInventoryItem* item = (LLInventoryItem*)objectp;
- LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(item->getType(),
- item->getActualType(),
- item->getInventoryType(),
- this,
- item->getUUID(),
- item->getFlags());
-
- if (new_listener)
+ else if (objectp->getType() == LLAssetType::AT_CATEGORY &&
+ objectp->getActualType() != LLAssetType::AT_LINK_FOLDER)
{
- LLFolderViewItem::Params params;
- params.name(new_listener->getDisplayName());
- params.icon(new_listener->getIcon());
- params.creation_date(new_listener->getCreationDate());
- params.root(mFolders);
- params.listener(new_listener);
- params.rect(LLRect (0, 0, 0, 0));
- itemp = LLUICtrlFactory::create<LLFolderViewItem> (params);
- }
- }
-
- LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(objectp->getParentUUID());
+ LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(objectp->getType(),
+ objectp->getType(),
+ LLInventoryType::IT_CATEGORY,
+ this,
+ objectp->getUUID());
- if (itemp)
- {
- if (parent_folder)
+ if (new_listener)
+ {
+ LLFolderViewFolder::Params p;
+ p.name = new_listener->getDisplayName();
+ p.icon = new_listener->getIcon();
+ p.root = mFolders;
+ p.listener = new_listener;
+ LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(p);
+
+ folderp->setItemSortOrder(mFolders->getSortOrder());
+ itemp = folderp;
+ }
+ }
+ else
{
- itemp->addToFolder(parent_folder, mFolders);
+ // Build new view for item
+ LLInventoryItem* item = (LLInventoryItem*)objectp;
+ LLInvFVBridge* new_listener = LLInvFVBridge::createBridge(item->getType(),
+ item->getActualType(),
+ item->getInventoryType(),
+ this,
+ item->getUUID(),
+ item->getFlags());
+
+ if (new_listener)
+ {
+ LLFolderViewItem::Params params;
+ params.name(new_listener->getDisplayName());
+ params.icon(new_listener->getIcon());
+ params.creation_date(new_listener->getCreationDate());
+ params.root(mFolders);
+ params.listener(new_listener);
+ params.rect(LLRect (0, 0, 0, 0));
+ itemp = LLUICtrlFactory::create<LLFolderViewItem> (params);
+ }
}
- else
+
+ if (itemp)
{
- llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
- delete itemp;
+
+ const LLUUID &parent_id = objectp->getParentUUID();
+ LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(parent_id);
+
+ // If this item's parent is the starting folder, then just add it to the top level (recall that
+ // the starting folder isn't actually represented in the view, parent_folder would be NULL in
+ // this case otherwise).
+ if (parent_id == mStartFolderID)
+ {
+ parent_folder = mFolders;
+ }
+
+ if (parent_folder)
+ {
+ itemp->addToFolder(parent_folder, mFolders);
+ }
+ else
+ {
+ llwarns << "Couldn't find parent folder for child " << itemp->getLabel() << llendl;
+ delete itemp;
+ }
}
}
}
- if ((id.isNull() ||
- (objectp && objectp->getType() == LLAssetType::AT_CATEGORY)))
+
+ // If this is a folder, add the children of the folder and recursively add any
+ // child folders.
+ if ((id == mStartFolderID) ||
+ (objectp && objectp->getType() == LLAssetType::AT_CATEGORY))
{
LLViewerInventoryCategory::cat_array_t* categories;
LLViewerInventoryItem::item_array_t* items;
diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h
index 1aaac74c87..33b1a3b6c9 100644
--- a/indra/newview/llfloaterinventory.h
+++ b/indra/newview/llfloaterinventory.h
@@ -94,12 +94,14 @@ public:
Optional<LLInventoryModel*> inventory;
Optional<bool> allow_multi_select;
Optional<Filter> filter;
+ Optional<std::string> start_folder;
Params()
: sort_order_setting("sort_order_setting"),
inventory("", &gInventory),
allow_multi_select("allow_multi_select", true),
- filter("filter")
+ filter("filter"),
+ start_folder("start_folder")
{}
};
@@ -169,16 +171,20 @@ public:
protected:
// Given the id and the parent, build all of the folder views.
- void rebuildViewsFor(const LLUUID& id, U32 mask);
+ void rebuildViewsFor(const LLUUID& id);
void buildNewViews(const LLUUID& id);
protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
- LLFolderView* mFolders;
- LLScrollContainer* mScroller;
BOOL mAllowMultiSelect;
std::string mSortOrderSetting;
+
+private:
+ LLFolderView* mFolders;
+ std::string mStartFolderString;
+ LLUUID mStartFolderID;
+ LLScrollContainer* mScroller;
bool mHasInventoryConnection;
};
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 69c0c5b132..c95dc6e5bd 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -104,8 +104,6 @@ public:
Mandatory<LLPanel*> parent_panel;
Optional<LLUUID> task_id;
};
- LLFolderView( const std::string& name, LLUIImagePtr root_folder_icon, const LLRect& rect,
- const LLUUID& source_id, LLPanel *parent_view );
LLFolderView(const Params&);
virtual ~LLFolderView( void );
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1880a574a7..5067f88e58 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -487,6 +487,11 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const
return FALSE;
}
}
+ const LLViewerInventoryCategory *cat = model->getCategory(objects.get(i));
+ if (cat && !LLAssetType::lookupCanLink(cat->getPreferredType()))
+ {
+ return FALSE;
+ }
}
return TRUE;
}
@@ -1581,6 +1586,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
// if target is an outfit or current outfit folder we use link
if (move_is_into_current_outfit || move_is_into_outfit)
{
+#if SUPPORT_ENSEMBLES
// BAP - should skip if dup.
if (move_is_into_current_outfit)
{
@@ -1597,6 +1603,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
LLAssetType::AT_LINK_FOLDER,
cb);
}
+#endif
}
else
{
@@ -1978,6 +1985,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
modifyOutfit(FALSE);
return;
}
+#if SUPPORT_ENSEMBLES
else if ("wearasensemble" == action)
{
LLInventoryModel* model = getInventoryModel();
@@ -1987,6 +1995,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model
LLAppearanceManager::wearEnsemble(cat,true);
return;
}
+#endif
else if ("addtooutfit" == action)
{
modifyOutfit(TRUE);
@@ -2205,6 +2214,7 @@ void LLFolderBridge::pasteLinkFromClipboard()
for(S32 i = 0; i < count; i++)
{
const LLUUID &object_id = objects.get(i);
+#if SUPPORT_ENSEMBLES
if (LLInventoryCategory *cat = model->getCategory(object_id))
{
link_inventory_item(
@@ -2215,7 +2225,9 @@ void LLFolderBridge::pasteLinkFromClipboard()
LLAssetType::AT_LINK_FOLDER,
LLPointer<LLInventoryCallback>(NULL));
}
- else if (LLInventoryItem *item = model->getItem(object_id))
+ else
+#endif
+ if (LLInventoryItem *item = model->getItem(object_id))
{
link_inventory_item(
gAgent.getID(),
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index c34517d104..7e88320f49 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -612,9 +612,9 @@ void LLViewerInventoryCategory::determineFolderType()
const LLViewerInventoryItem *item = (*item_iter);
if (item->getIsLinkType())
return;
- if (item->getInventoryType() == LLInventoryType::IT_WEARABLE)
+ if (item->isWearableType())
{
- const EWearableType wearable_type = EWearableType(item->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
+ const EWearableType wearable_type = item->getWearableType();
const std::string& wearable_name = LLWearableDictionary::getTypeName(wearable_type);
U64 valid_folder_types = LLFolderType::lookupValidFolderTypes(wearable_name);
folder_valid |= valid_folder_types;
@@ -1278,6 +1278,22 @@ U32 LLViewerInventoryItem::getFlags() const
return LLInventoryItem::getFlags();
}
+bool LLViewerInventoryItem::isWearableType() const
+{
+ return (getInventoryType() == LLInventoryType::IT_WEARABLE);
+}
+
+EWearableType LLViewerInventoryItem::getWearableType() const
+{
+ if (!isWearableType())
+ {
+ llwarns << "item is not a wearable" << llendl;
+ return WT_INVALID;
+ }
+ return EWearableType(getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
+}
+
+
time_t LLViewerInventoryItem::getCreationDate() const
{
return LLInventoryItem::getCreationDate();
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 5692875ec6..f55a695652 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -74,6 +74,8 @@ public:
virtual const std::string& getDescription() const;
virtual const LLSaleInfo& getSaleInfo() const;
virtual LLInventoryType::EType getInventoryType() const;
+ virtual bool isWearableType() const;
+ virtual EWearableType getWearableType() const;
virtual U32 getFlags() const;
virtual time_t getCreationDate() const;
virtual U32 getCRC32() const; // really more of a checksum.
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 04c7186b5f..6dc08ad3ef 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -457,14 +457,6 @@
function="Inventory.DoToSelected"
parameter="replaceoutfit" />
</menu_item_call>
- <menu_item_call
- label="Wear As Ensemble"
- layout="topleft"
- name="Wear As Ensemble">
- <menu_item_call.on_click
- function="Inventory.DoToSelected"
- parameter="wearasensemble" />
- </menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call
diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml
index 9ee80a37d7..ae33d6da3e 100644
--- a/indra/newview/skins/default/xui/en/panel_landmarks.xml
+++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml
@@ -18,6 +18,7 @@
left="0"
mouse_opaque="true"
name="landmarks_list"
+ start_folder="landmark"
width="380"/>
<button
bottom="0"