Wearable export improvements.
Add grid nick to default filename. Add grid nick and date to exported XML. Add inventory path, name and description of item to exported XML.
This commit is contained in:
@@ -111,6 +111,37 @@ void append_path(const LLUUID& id, std::string& path)
|
||||
path.append(temp);
|
||||
}
|
||||
|
||||
// Path should already end on '/' if it is not empty.
|
||||
void append_path_short(LLUUID const& id, std::string& path)
|
||||
{
|
||||
LLInventoryObject const* obj = gInventory.getObject(id);
|
||||
if (!obj) return;
|
||||
|
||||
LLUUID const root_id = gInventory.getRootFolderID();
|
||||
std::string const forward_slash("/");
|
||||
|
||||
std::string result;
|
||||
while(1)
|
||||
{
|
||||
LLUUID parent_id = obj->getParentUUID();
|
||||
if (parent_id == root_id ||
|
||||
!(obj = gInventory.getCategory(parent_id)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
std::string temp;
|
||||
temp.swap(result);
|
||||
result = obj->getName();
|
||||
if (!temp.empty())
|
||||
{
|
||||
result.append(forward_slash);
|
||||
result.append(temp);
|
||||
}
|
||||
}
|
||||
|
||||
path.append(result);
|
||||
}
|
||||
|
||||
void rename_category(LLInventoryModel* model, const LLUUID& cat_id, const std::string& new_name)
|
||||
{
|
||||
LLViewerInventoryCategory* cat;
|
||||
|
||||
Reference in New Issue
Block a user