Actually use LLWearable::mDescription.
Set LLWearable::mDescription and keep it up to date. This allows to export (and import) the description of wearables.
This commit is contained in:
@@ -473,7 +473,7 @@ void LLAgentWearables::saveWearable(const LLWearableType::EType type, const U32
|
|||||||
LLViewerWearable* LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
|
LLViewerWearable* LLAgentWearables::saveWearableAs(const LLWearableType::EType type,
|
||||||
const U32 index,
|
const U32 index,
|
||||||
const std::string& new_name,
|
const std::string& new_name,
|
||||||
const std::string& description,
|
const std::string& new_description,
|
||||||
BOOL save_in_lost_and_found)
|
BOOL save_in_lost_and_found)
|
||||||
{
|
{
|
||||||
if (!isWearableCopyable(type, index))
|
if (!isWearableCopyable(type, index))
|
||||||
@@ -496,9 +496,12 @@ LLViewerWearable* LLAgentWearables::saveWearableAs(const LLWearableType::EType t
|
|||||||
}
|
}
|
||||||
std::string trunc_name(new_name);
|
std::string trunc_name(new_name);
|
||||||
LLStringUtil::truncate(trunc_name, DB_INV_ITEM_NAME_STR_LEN);
|
LLStringUtil::truncate(trunc_name, DB_INV_ITEM_NAME_STR_LEN);
|
||||||
|
std::string trunc_description(new_description);
|
||||||
|
LLStringUtil::truncate(trunc_description, DB_INV_ITEM_DESC_STR_LEN);
|
||||||
LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(
|
LLViewerWearable* new_wearable = LLWearableList::instance().createCopy(
|
||||||
old_wearable,
|
old_wearable,
|
||||||
trunc_name);
|
trunc_name,
|
||||||
|
trunc_description);
|
||||||
LLPointer<LLInventoryCallback> cb =
|
LLPointer<LLInventoryCallback> cb =
|
||||||
new addWearableToAgentInventoryCallback(
|
new addWearableToAgentInventoryCallback(
|
||||||
LLPointer<LLRefCount>(NULL),
|
LLPointer<LLRefCount>(NULL),
|
||||||
@@ -506,7 +509,7 @@ LLViewerWearable* LLAgentWearables::saveWearableAs(const LLWearableType::EType t
|
|||||||
index,
|
index,
|
||||||
new_wearable,
|
new_wearable,
|
||||||
addWearableToAgentInventoryCallback::CALL_WEARITEM,
|
addWearableToAgentInventoryCallback::CALL_WEARITEM,
|
||||||
description
|
trunc_description
|
||||||
);
|
);
|
||||||
LLUUID category_id;
|
LLUUID category_id;
|
||||||
if (save_in_lost_and_found)
|
if (save_in_lost_and_found)
|
||||||
@@ -595,6 +598,25 @@ void LLAgentWearables::setWearableName(const LLUUID& item_id, const std::string&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLAgentWearables::descriptionChanged(LLUUID const& item_id)
|
||||||
|
{
|
||||||
|
for (S32 i=0; i < LLWearableType::WT_COUNT; i++)
|
||||||
|
{
|
||||||
|
for (U32 j=0; j < getWearableCount((LLWearableType::EType)i); j++)
|
||||||
|
{
|
||||||
|
LLUUID curr_item_id = getWearableItemID((LLWearableType::EType)i,j);
|
||||||
|
if (curr_item_id == item_id)
|
||||||
|
{
|
||||||
|
LLViewerWearable* wearable = getViewerWearable((LLWearableType::EType)i,j);
|
||||||
|
llassert(wearable);
|
||||||
|
if (!wearable) continue;
|
||||||
|
|
||||||
|
wearable->refreshNameAndDescription();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const
|
BOOL LLAgentWearables::isWearableModifiable(LLWearableType::EType type, U32 index) const
|
||||||
{
|
{
|
||||||
@@ -751,7 +773,7 @@ void LLAgentWearables::wearableUpdated(LLWearable *wearable, BOOL removed)
|
|||||||
if (!removed)
|
if (!removed)
|
||||||
{
|
{
|
||||||
LLViewerWearable* viewer_wearable = dynamic_cast<LLViewerWearable*>(wearable);
|
LLViewerWearable* viewer_wearable = dynamic_cast<LLViewerWearable*>(wearable);
|
||||||
viewer_wearable->refreshName();
|
viewer_wearable->refreshNameAndDescription();
|
||||||
|
|
||||||
// Hack pt 2. If the wearable we just loaded has definition version 24,
|
// 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.
|
// then force a re-save of this wearable after slamming the version number to 22.
|
||||||
@@ -1334,6 +1356,7 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it
|
|||||||
const LLWearableType::EType type = new_wearable->getType();
|
const LLWearableType::EType type = new_wearable->getType();
|
||||||
|
|
||||||
new_wearable->setName(new_item->getName());
|
new_wearable->setName(new_item->getName());
|
||||||
|
new_wearable->setDescription(new_item->getDescription());
|
||||||
new_wearable->setItemID(new_item->getUUID());
|
new_wearable->setItemID(new_item->getUUID());
|
||||||
|
|
||||||
if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART)
|
if (LLWearableType::getAssetType(type) == LLAssetType::AT_BODYPART)
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ public:
|
|||||||
// void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
|
// void setWearableItem(LLInventoryItem* new_item, LLViewerWearable* wearable, bool do_append = false);
|
||||||
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& wearables, BOOL remove);
|
void setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLViewerWearable* >& wearables, BOOL remove);
|
||||||
void setWearableName(const LLUUID& item_id, const std::string& new_name);
|
void setWearableName(const LLUUID& item_id, const std::string& new_name);
|
||||||
|
void descriptionChanged(LLUUID const& item_id);
|
||||||
// *TODO: Move this into llappearance/LLWearableData ?
|
// *TODO: Move this into llappearance/LLWearableData ?
|
||||||
void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index);
|
void addLocalTextureObject(const LLWearableType::EType wearable_type, const LLAvatarAppearanceDefines::ETextureIndex texture_type, U32 wearable_index);
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ public:
|
|||||||
virtual void showProperties(void) = 0;
|
virtual void showProperties(void) = 0;
|
||||||
virtual BOOL isItemRenameable() const = 0;
|
virtual BOOL isItemRenameable() const = 0;
|
||||||
virtual BOOL renameItem(const std::string& new_name) = 0;
|
virtual BOOL renameItem(const std::string& new_name) = 0;
|
||||||
|
virtual void descriptionChanged(void) const = 0;
|
||||||
virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder
|
virtual BOOL isItemMovable( void ) const = 0; // Can be moved to another folder
|
||||||
virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed
|
virtual BOOL isItemRemovable( void ) const = 0; // Can be destroyed
|
||||||
virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual.
|
virtual BOOL isItemInTrash( void) const { return FALSE; } // TODO: make into pure virtual.
|
||||||
|
|||||||
@@ -615,6 +615,15 @@ void LLFolderViewItem::rename(const std::string& new_name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLFolderViewItem::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// We don't have a description, but the listener does!
|
||||||
|
if( mListener )
|
||||||
|
{
|
||||||
|
mListener->descriptionChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LLFolderViewItem::updateSearchLabelType()
|
void LLFolderViewItem::updateSearchLabelType()
|
||||||
{
|
{
|
||||||
mSearchType = mRoot->getSearchType();
|
mSearchType = mRoot->getSearchType();
|
||||||
@@ -2872,3 +2881,4 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,6 +277,8 @@ public:
|
|||||||
|
|
||||||
// just rename the object.
|
// just rename the object.
|
||||||
void rename(const std::string& new_name);
|
void rename(const std::string& new_name);
|
||||||
|
// Alert mListener that the description of this item changed.
|
||||||
|
void descriptionChanged(void) const;
|
||||||
|
|
||||||
// open
|
// open
|
||||||
virtual void openItem( void );
|
virtual void openItem( void );
|
||||||
|
|||||||
@@ -1724,6 +1724,10 @@ BOOL LLItemBridge::renameItem(const std::string& new_name)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLItemBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLItemBridge::removeItem()
|
BOOL LLItemBridge::removeItem()
|
||||||
{
|
{
|
||||||
@@ -2966,6 +2970,12 @@ BOOL LLFolderBridge::renameItem(const std::string& new_name)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLFolderBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// A folder has no description.
|
||||||
|
llerrs << "Calling LLFolderBridge::descriptionChanged" << llendl;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLFolderBridge::removeItem()
|
BOOL LLFolderBridge::removeItem()
|
||||||
{
|
{
|
||||||
if(!isItemRemovable())
|
if(!isItemRemovable())
|
||||||
@@ -5470,6 +5480,11 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLObjectBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
// +=================================================+
|
// +=================================================+
|
||||||
// | LLLSLTextBridge |
|
// | LLLSLTextBridge |
|
||||||
// +=================================================+
|
// +=================================================+
|
||||||
@@ -5628,6 +5643,14 @@ BOOL LLWearableBridge::renameItem(const std::string& new_name)
|
|||||||
return LLItemBridge::renameItem(new_name);
|
return LLItemBridge::renameItem(new_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLWearableBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
if (get_is_item_worn(mUUID))
|
||||||
|
{
|
||||||
|
gAgentWearables.descriptionChanged(mUUID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string LLWearableBridge::getLabelSuffix() const
|
std::string LLWearableBridge::getLabelSuffix() const
|
||||||
{
|
{
|
||||||
if (get_is_item_worn(mUUID))
|
if (get_is_item_worn(mUUID))
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ public:
|
|||||||
virtual time_t getCreationDate() const;
|
virtual time_t getCreationDate() const;
|
||||||
virtual BOOL isItemRenameable() const;
|
virtual BOOL isItemRenameable() const;
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
virtual BOOL removeItem();
|
virtual BOOL removeItem();
|
||||||
virtual BOOL isItemCopyable() const;
|
virtual BOOL isItemCopyable() const;
|
||||||
virtual BOOL hasChildren() const { return FALSE; }
|
virtual BOOL hasChildren() const { return FALSE; }
|
||||||
@@ -257,6 +258,7 @@ public:
|
|||||||
static LLUIImagePtr getIcon(LLFolderType::EType preferred_type);
|
static LLUIImagePtr getIcon(LLFolderType::EType preferred_type);
|
||||||
|
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
|
|
||||||
virtual BOOL removeItem();
|
virtual BOOL removeItem();
|
||||||
BOOL removeSystemFolder();
|
BOOL removeSystemFolder();
|
||||||
@@ -466,6 +468,7 @@ public:
|
|||||||
virtual std::string getLabelSuffix() const;
|
virtual std::string getLabelSuffix() const;
|
||||||
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
LLInventoryObject* getObject() const;
|
LLInventoryObject* getObject() const;
|
||||||
protected:
|
protected:
|
||||||
static LLUUID sContextMenuItemID; // Only valid while the context menu is open.
|
static LLUUID sContextMenuItemID; // Only valid while the context menu is open.
|
||||||
@@ -499,6 +502,7 @@ public:
|
|||||||
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
||||||
virtual std::string getLabelSuffix() const;
|
virtual std::string getLabelSuffix() const;
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
virtual LLWearableType::EType getWearableType() const { return mWearableType; }
|
virtual LLWearableType::EType getWearableType() const { return mWearableType; }
|
||||||
|
|
||||||
static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu
|
static void onWearOnAvatar( void* userdata ); // Access to wearOnAvatar() from menu
|
||||||
|
|||||||
@@ -854,6 +854,10 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item)
|
|||||||
{
|
{
|
||||||
mask |= LLInventoryObserver::LABEL;
|
mask |= LLInventoryObserver::LABEL;
|
||||||
}
|
}
|
||||||
|
if(old_item->getDescription() != item->getDescription())
|
||||||
|
{
|
||||||
|
mask |= LLInventoryObserver::DESCRIPTION;
|
||||||
|
}
|
||||||
old_item->copyViewerItem(item);
|
old_item->copyViewerItem(item);
|
||||||
mask |= LLInventoryObserver::INTERNAL;
|
mask |= LLInventoryObserver::INTERNAL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public:
|
|||||||
GESTURE = 64,
|
GESTURE = 64,
|
||||||
REBUILD = 128, // Item UI changed (e.g. item type different)
|
REBUILD = 128, // Item UI changed (e.g. item type different)
|
||||||
SORT = 256, // Folder needs to be resorted.
|
SORT = 256, // Folder needs to be resorted.
|
||||||
|
DESCRIPTION = 0x10000, // Singu extension to keep track of description changes.
|
||||||
ALL = 0xffffffff
|
ALL = 0xffffffff
|
||||||
};
|
};
|
||||||
LLInventoryObserver();
|
LLInventoryObserver();
|
||||||
|
|||||||
@@ -484,6 +484,17 @@ void LLInventoryPanel::modelChanged(U32 mask)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////
|
||||||
|
// DESCRIPTION Operation (singu only)
|
||||||
|
// Alert listener.
|
||||||
|
if ((mask & LLInventoryObserver::DESCRIPTION))
|
||||||
|
{
|
||||||
|
if (view_item)
|
||||||
|
{
|
||||||
|
view_item->descriptionChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////
|
//////////////////////////////
|
||||||
// REBUILD Operation
|
// REBUILD Operation
|
||||||
// Destroy and regenerate the UI.
|
// Destroy and regenerate the UI.
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ public:
|
|||||||
virtual void selectItem() {}
|
virtual void selectItem() {}
|
||||||
virtual BOOL isItemRenameable() const;
|
virtual BOOL isItemRenameable() const;
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
virtual BOOL isItemMovable() const;
|
virtual BOOL isItemMovable() const;
|
||||||
virtual BOOL isItemRemovable() const;
|
virtual BOOL isItemRemovable() const;
|
||||||
virtual BOOL removeItem();
|
virtual BOOL removeItem();
|
||||||
@@ -430,6 +431,11 @@ BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLTaskInvFVBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLTaskInvFVBridge::isItemMovable() const
|
BOOL LLTaskInvFVBridge::isItemMovable() const
|
||||||
{
|
{
|
||||||
//LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
|
//LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID());
|
||||||
@@ -814,6 +820,7 @@ public:
|
|||||||
virtual BOOL isItemRenameable() const;
|
virtual BOOL isItemRenameable() const;
|
||||||
// virtual BOOL isItemCopyable() const { return FALSE; }
|
// virtual BOOL isItemCopyable() const { return FALSE; }
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
virtual BOOL isItemRemovable() const;
|
virtual BOOL isItemRemovable() const;
|
||||||
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
virtual void buildContextMenu(LLMenuGL& menu, U32 flags);
|
||||||
virtual BOOL hasChildren() const;
|
virtual BOOL hasChildren() const;
|
||||||
@@ -854,6 +861,12 @@ BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLTaskCategoryBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// A category has no description.
|
||||||
|
llerrs << "Calling LLTaskCategoryBridge::descriptionChanged" << llendl;
|
||||||
|
}
|
||||||
|
|
||||||
BOOL LLTaskCategoryBridge::isItemRemovable() const
|
BOOL LLTaskCategoryBridge::isItemRemovable() const
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -1169,6 +1182,7 @@ public:
|
|||||||
|
|
||||||
virtual BOOL isItemRenameable() const;
|
virtual BOOL isItemRenameable() const;
|
||||||
virtual BOOL renameItem(const std::string& new_name);
|
virtual BOOL renameItem(const std::string& new_name);
|
||||||
|
virtual void descriptionChanged(void) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOL LLTaskCallingCardBridge::isItemRenameable() const
|
BOOL LLTaskCallingCardBridge::isItemRenameable() const
|
||||||
@@ -1181,6 +1195,10 @@ BOOL LLTaskCallingCardBridge::renameItem(const std::string& new_name)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLTaskCallingCardBridge::descriptionChanged(void) const
|
||||||
|
{
|
||||||
|
// Nothing to do.
|
||||||
|
}
|
||||||
|
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
/// Class LLTaskScriptBridge
|
/// Class LLTaskScriptBridge
|
||||||
|
|||||||
@@ -554,13 +554,14 @@ void LLViewerWearable::setUpdated() const
|
|||||||
gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID());
|
gInventory.addChangedMask(LLInventoryObserver::LABEL, getItemID());
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLViewerWearable::refreshName()
|
void LLViewerWearable::refreshNameAndDescription()
|
||||||
{
|
{
|
||||||
LLUUID item_id = getItemID();
|
LLUUID item_id = getItemID();
|
||||||
LLInventoryItem* item = gInventory.getItem(item_id);
|
LLInventoryItem* item = gInventory.getItem(item_id);
|
||||||
if( item )
|
if( item )
|
||||||
{
|
{
|
||||||
mName = item->getName();
|
mName = item->getName();
|
||||||
|
mDescription = item->getDescription();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ public:
|
|||||||
// Something happened that requires the wearable's label to be updated (e.g. worn/unworn).
|
// Something happened that requires the wearable's label to be updated (e.g. worn/unworn).
|
||||||
void setUpdated() const;
|
void setUpdated() const;
|
||||||
|
|
||||||
// the wearable was worn. make sure the name of the wearable object matches the LLViewerInventoryItem,
|
// the wearable was worn. make sure the name and description of the wearable object matches the LLViewerInventoryItem,
|
||||||
// not the wearable asset itself.
|
// not the wearable asset itself.
|
||||||
void refreshName();
|
void refreshNameAndDescription();
|
||||||
|
|
||||||
// Update the baked texture hash.
|
// Update the baked texture hash.
|
||||||
/*virtual*/void addToBakedTextureHash(LLMD5& hash) const;
|
/*virtual*/void addToBakedTextureHash(LLMD5& hash) const;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearable, const std::string& new_name)
|
LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearable, const std::string& new_name, const std::string& new_description)
|
||||||
{
|
{
|
||||||
lldebugs << "LLWearableList::createCopy()" << llendl;
|
lldebugs << "LLWearableList::createCopy()" << llendl;
|
||||||
|
|
||||||
@@ -227,6 +227,7 @@ LLViewerWearable* LLWearableList::createCopy(const LLViewerWearable* old_wearabl
|
|||||||
wearable->setPermissions(perm);
|
wearable->setPermissions(perm);
|
||||||
|
|
||||||
if (!new_name.empty()) wearable->setName(new_name);
|
if (!new_name.empty()) wearable->setName(new_name);
|
||||||
|
if (!new_description.empty()) wearable->setDescription(new_description);
|
||||||
|
|
||||||
// Send to the dataserver
|
// Send to the dataserver
|
||||||
wearable->saveNewAsset();
|
wearable->saveNewAsset();
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
void(*asset_arrived_callback)(LLViewerWearable*, void* userdata),
|
void(*asset_arrived_callback)(LLViewerWearable*, void* userdata),
|
||||||
void* userdata);
|
void* userdata);
|
||||||
|
|
||||||
LLViewerWearable* createCopy(const LLViewerWearable* old_wearable, const std::string& new_name = std::string());
|
LLViewerWearable* createCopy(const LLViewerWearable* old_wearable, const std::string& new_name = std::string(), const std::string& new_description = std::string());
|
||||||
LLViewerWearable* createNewWearable(LLWearableType::EType type, LLAvatarAppearance *avatarp);
|
LLViewerWearable* createNewWearable(LLWearableType::EType type, LLAvatarAppearance *avatarp);
|
||||||
|
|
||||||
// Callback
|
// Callback
|
||||||
|
|||||||
Reference in New Issue
Block a user