diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llinventorytype.cpp | 7 | ||||
-rw-r--r-- | indra/llinventory/llinventorytype.h | 4 | ||||
-rw-r--r-- | indra/llinventory/llpermissions.h | 32 |
3 files changed, 20 insertions, 23 deletions
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 303dd8b711..3dd1a5638d 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -83,6 +83,8 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION)); addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); + addEntry(LLInventoryType::IT_GLTF, new InventoryEntry("gltf", "gltf", 1, LLAssetType::AT_GLTF)); + addEntry(LLInventoryType::IT_GLTF_BIN, new InventoryEntry("glbin", "glbin", 1, LLAssetType::AT_GLTF_BIN)); addEntry(LLInventoryType::IT_WIDGET, new InventoryEntry("widget", "widget", 1, LLAssetType::AT_WIDGET)); addEntry(LLInventoryType::IT_PERSON, new InventoryEntry("person", "person", 1, LLAssetType::AT_PERSON)); addEntry(LLInventoryType::IT_SETTINGS, new InventoryEntry("settings", "settings", 1, LLAssetType::AT_SETTINGS)); @@ -153,9 +155,12 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // 52 AT_RESERVED_3 LLInventoryType::IT_NONE, // 53 AT_RESERVED_4 LLInventoryType::IT_NONE, // 54 AT_RESERVED_5 + LLInventoryType::IT_NONE, // 55 AT_RESERVED_6 - LLInventoryType::IT_SETTINGS, // 55 AT_SETTINGS <- why doesnt this match the value in llassettype.h? -brad + LLInventoryType::IT_SETTINGS, // 56 AT_SETTINGS LLInventoryType::IT_MATERIAL, // 57 AT_MATERIAL + LLInventoryType::IT_GLTF, // 58 AT_GLTF + LLInventoryType::IT_GLTF_BIN, // 59 AT_GLTF_BIN }; // static diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index fd80a0be04..c90f8aa107 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -66,7 +66,9 @@ public: IT_PERSON = 24, IT_SETTINGS = 25, IT_MATERIAL = 26, - IT_COUNT = 27, + IT_GLTF = 27, + IT_GLTF_BIN = 28, + IT_COUNT = 29, IT_UNKNOWN = 255, IT_NONE = -1 diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index dfe527f314..a68abcfa34 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -270,6 +270,7 @@ public: inline bool allowModifyBy(const LLUUID &agent_id) const; inline bool allowCopyBy(const LLUUID& agent_id) const; inline bool allowMoveBy(const LLUUID& agent_id) const; + inline bool allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const; inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const; inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const; @@ -278,27 +279,11 @@ public: // current owner is allowed to transfer to the specified agent id. inline bool allowTransferTo(const LLUUID &agent_id) const; - // - // DEPRECATED. - // - // These return true if the given agent can perform the function. - // They also return true if the object isn't owned, or the - // requesting agent is a system agent. See llpermissionsflags.h - // for bits. - //bool allowDeleteBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } - //bool allowEditBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } - // saves last owner and sets current owner - //bool setOwner(const LLUUID& agent, const LLUUID& owner); - // This method saves the last owner, sets the current owner to the - // one provided, and sets the base mask as indicated. - //bool setOwner(const LLUUID& agent, const LLUUID& owner, U32 new_base_mask); - - // Attempt to set or clear the given bitmask. Returns true if you - // are allowed to modify the permissions. If you attempt to turn - // on bits not allowed by the base bits, the function will return - // true, but those bits will not be set. - //bool setGroupBits( const LLUUID& agent, bool set, PermissionMask bits); - //bool setEveryoneBits(const LLUUID& agent, bool set, PermissionMask bits); + // Returns true if the object can exported by the given agent + // (e.g. saved as a local .gltf file) + // The current test should return true if the agent is the owner + // AND the creator of the object. + inline bool allowExportBy(const LLUUID& agent_id) const; // // MISC METHODS and OPERATORS @@ -353,6 +338,11 @@ bool LLPermissions::allowMoveBy(const LLUUID& agent) const return allowOperationBy(PERM_MOVE, agent, LLUUID::null); } +bool LLPermissions::allowExportBy(const LLUUID& agent) const +{ + return agent == mOwner && agent == mCreator; +} + bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const { if (mIsGroupOwned) |