THE BIGGIE.
Holy hell, this was an interesting one to implement. I wish I understood it better. Unfortunately I think this marks the end of trying to re-implement the Local Inventory for Temp and Local textures. It's just not feasible now that the entire inventory system has been whipped into a code shitstorm. Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
@@ -126,6 +126,25 @@ const std::string& LLInventoryObject::getName() const
|
||||
return mName;
|
||||
}
|
||||
|
||||
// To bypass linked items, since llviewerinventory's getType
|
||||
// will return the linked-to item's type instead of this object's type.
|
||||
LLAssetType::EType LLInventoryObject::getActualType() const
|
||||
{
|
||||
return mType;
|
||||
}
|
||||
|
||||
BOOL LLInventoryObject::getIsLinkType() const
|
||||
{
|
||||
return LLAssetType::lookupIsLinkType(mType);
|
||||
}
|
||||
|
||||
// See LLInventoryItem override.
|
||||
// virtual
|
||||
const LLUUID& LLInventoryObject::getLinkedUUID() const
|
||||
{
|
||||
return mUUID;
|
||||
}
|
||||
|
||||
LLAssetType::EType LLInventoryObject::getType() const
|
||||
{
|
||||
return mType;
|
||||
@@ -342,6 +361,19 @@ void LLInventoryItem::cloneItem(LLPointer<LLInventoryItem>& newitem) const
|
||||
newitem->mUUID.generate();
|
||||
}
|
||||
|
||||
// If this is a linked item, then the UUID of the base object is
|
||||
// this item's assetID.
|
||||
// virtual
|
||||
const LLUUID& LLInventoryItem::getLinkedUUID() const
|
||||
{
|
||||
if (LLAssetType::lookupIsLinkType(getActualType()))
|
||||
{
|
||||
return mAssetUUID;
|
||||
}
|
||||
|
||||
return LLInventoryObject::getLinkedUUID();
|
||||
}
|
||||
|
||||
const LLPermissions& LLInventoryItem::getPermissions() const
|
||||
{
|
||||
return mPermissions;
|
||||
|
||||
@@ -89,14 +89,17 @@ public:
|
||||
void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
|
||||
|
||||
// accessors
|
||||
const LLUUID& getUUID() const;
|
||||
virtual const LLUUID& getUUID() const;
|
||||
const LLUUID& getParentUUID() const;
|
||||
const std::string& getName() const;
|
||||
LLAssetType::EType getType() const;
|
||||
virtual const LLUUID& getLinkedUUID() const; // get the inventoryID that this item points to, else this item's inventoryID
|
||||
virtual const std::string& getName() const;
|
||||
virtual LLAssetType::EType getType() const;
|
||||
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
|
||||
BOOL getIsLinkType() const;
|
||||
|
||||
// mutators - will not call updateServer();
|
||||
void setUUID(const LLUUID& new_uuid);
|
||||
void rename(const std::string& new_name);
|
||||
virtual void rename(const std::string& new_name);
|
||||
void setParent(const LLUUID& new_parent);
|
||||
void setType(LLAssetType::EType type);
|
||||
|
||||
@@ -231,15 +234,16 @@ public:
|
||||
virtual void cloneItem(LLPointer<LLInventoryItem>& newitem) const;
|
||||
|
||||
// accessors
|
||||
const LLPermissions& getPermissions() const;
|
||||
const LLUUID& getCreatorUUID() const;
|
||||
const LLUUID& getAssetUUID() const;
|
||||
const std::string& getDescription() const;
|
||||
const LLSaleInfo& getSaleInfo() const;
|
||||
LLInventoryType::EType getInventoryType() const;
|
||||
U32 getFlags() const;
|
||||
time_t getCreationDate() const;
|
||||
U32 getCRC32() const; // really more of a checksum.
|
||||
virtual const LLUUID& getLinkedUUID() const;
|
||||
virtual const LLPermissions& getPermissions() const;
|
||||
virtual const LLUUID& getCreatorUUID() const;
|
||||
virtual const LLUUID& getAssetUUID() const;
|
||||
virtual const std::string& getDescription() const;
|
||||
virtual const LLSaleInfo& getSaleInfo() const;
|
||||
virtual LLInventoryType::EType getInventoryType() const;
|
||||
virtual U32 getFlags() const;
|
||||
virtual time_t getCreationDate() const;
|
||||
virtual U32 getCRC32() const; // really more of a checksum.
|
||||
|
||||
// mutators - will not call updateServer(), and will never fail
|
||||
// (though it may correct to sane values)
|
||||
|
||||
@@ -120,6 +120,10 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
|
||||
LLInventoryType::IT_NONE, // AT_IMAGE_JPEG
|
||||
LLInventoryType::IT_ANIMATION, // AT_ANIMATION
|
||||
LLInventoryType::IT_GESTURE, // AT_GESTURE
|
||||
LLInventoryType::IT_NONE, // AT_SIMSTATE
|
||||
LLInventoryType::IT_NONE, // (null entry)
|
||||
LLInventoryType::IT_NONE, // AT_LINK
|
||||
LLInventoryType::IT_NONE, // AT_LINK_FOLDER
|
||||
};
|
||||
|
||||
static const int MAX_POSSIBLE_ASSET_TYPES = 2;
|
||||
|
||||
Reference in New Issue
Block a user