[Opensim-dev] Folder numbers

Diva Canto diva at metaverseink.com
Sun Aug 9 14:15:35 UTC 2015


[This message is particularly important for people developing web 
interfaces and other external tools for OpenSim that touch inventory]

So, to wrap this up:

I've now committed the new version of libomv with the inventory code 
changes, and the necessary changes in OpenSim that use those new enums 
and codes. Initial tests show that everything is ok with current 
viewers, even without changing the DB, but, as usual, more testing needs 
to happen before the changes are sealed.

In the long run, however, it is advised that grid operators adjust the 
DB, specifically inventory folders tables, so that they reflect the 
codes of the "protocol." This protocol is now coded up in a new enum in 
libomv called FolderType, which is pasted below for convenience. This 
new enum follows exactly the one found in the Linden viewer for folder 
types.

Also a warning to note the difference between *folder* types and *asset* 
types, a difference that had been muddied so far. Assets and folders are 
different things. There is a relation between them, of course, and the 
viewer tries to use the same codes in most cases (e.g. Texture assets = 
0, Texture folder = 0). But there is at least one important difference 
when it comes to the root folder. So far, libomv had only one enum 
(AssetType) that tried to code both things at the same time, hence the 
confusion. Now it has two separate enums, FolderType and AssetType. I'm 
also pasting AssetType here for convenience.

If you have a web interface, plugin or external tool that touches 
inventory folders, please follow the codes in the *FolderType* enum.


     /// <summary>
     /// The different types of folder.
     /// </summary>
     public enum FolderType : sbyte
     {
         /// <summary>None folder type (normal user-created 
folder)</summary>
         None = -1,
         /// <summary>Texture folder type</summary>
         Texture = 0,
         /// <summary>Sound folder type</summary>
         Sound = 1,
         /// <summary>Calling card folder type</summary>
         CallingCard = 2,
         /// <summary>Landmark folder type</summary>
         Landmark = 3,
         /// <summary>Clothing folder type</summary>
         Clothing = 5,
         /// <summary>Object folder type</summary>
         Object = 6,
         /// <summary>Notecard folder type</summary>
         Notecard = 7,
         /// <summary>The root folder type</summary>
         Root = 8,
         /// <summary>LSLText folder</summary>
         LSLText = 10,
         /// <summary>Bodyparts folder</summary>
         BodyPart = 13,
         /// <summary>Trash folder</summary>
         Trash = 14,
         /// <summary>Snapshot folder</summary>
         Snapshot = 15,
         /// <summary>Lost And Found folder</summary>
         LostAndFound = 16,
         /// <summary>Animation folder</summary>
         Animation = 20,
         /// <summary>Gesture folder</summary>
         Gesture = 21,
         /// <summary>Favorites folder</summary>
         Favorites = 23,
         /// <summary>Ensemble beginning range</summary>
         EnsembleStart = 26,
         /// <summary>Ensemble ending range</summary>
         EnsembleEnd= 45,
         /// <summary>Current outfit folder</summary>
         CurrentOutfit = 46,
         /// <summary>Outfit folder</summary>
         Outfit = 47,
         /// <summary>My outfits folder</summary>
         MyOutfits = 48,
         /// <summary>Mesh folder</summary>
         Mesh = 49,
         /// <summary>Marketplace direct delivery inbox ("Received 
Items")</summary>
         Inbox = 50,
         /// <summary>Marketplace direct delivery outbox</summary>
         Outbox = 51,
         /// <summary>Basic root folder</summary>
         BasicRoot = 52,
         /// <summary>Marketplace listings folder</summary>
         MarketplaceListings = 53,
         /// <summary>Marketplace stock folder</summary>
         MarkplaceStock = 54,
         /// <summary>Hypergrid Suitcase folder</summary>
         Suitcase = 100
     }

     /// <summary>
     /// The different types of grid assets
     /// </summary>
     public enum AssetType : sbyte
     {
         /// <summary>Unknown asset type</summary>
         Unknown = -1,
         /// <summary>Texture asset, stores in JPEG2000 J2C stream 
format</summary>
         Texture = 0,
         /// <summary>Sound asset</summary>
         Sound = 1,
         /// <summary>Calling card for another avatar</summary>
         CallingCard = 2,
         /// <summary>Link to a location in world</summary>
         Landmark = 3,
         // <summary>Legacy script asset, you should never see one of 
these</summary>
         //[Obsolete]
         //Script = 4,
         /// <summary>Collection of textures and parameters that can be 
worn by an avatar</summary>
         Clothing = 5,
         /// <summary>Primitive that can contain textures, sounds,
         /// scripts and more</summary>
         Object = 6,
         /// <summary>Notecard asset</summary>
         Notecard = 7,
         /// <summary>Holds a collection of inventory items. "Category" 
in the Linden viewer</summary>
         Folder = 8,
         /// <summary>Linden scripting language script</summary>
         LSLText = 10,
         /// <summary>LSO bytecode for a script</summary>
         LSLBytecode = 11,
         /// <summary>Uncompressed TGA texture</summary>
         TextureTGA = 12,
         /// <summary>Collection of textures and shape parameters that 
can be worn</summary>
         Bodypart = 13,
         /// <summary>Uncompressed sound</summary>
         SoundWAV = 17,
         /// <summary>Uncompressed TGA non-square image, not to be used as a
         /// texture</summary>
         ImageTGA = 18,
         /// <summary>Compressed JPEG non-square image, not to be used as a
         /// texture</summary>
         ImageJPEG = 19,
         /// <summary>Animation</summary>
         Animation = 20,
         /// <summary>Sequence of animations, sounds, chat, and 
pauses</summary>
         Gesture = 21,
         /// <summary>Simstate file</summary>
         Simstate = 22,
         /// <summary>Asset is a link to another inventory item</summary>
         Link = 24,
         /// <summary>Asset is a link to another inventory folder</summary>
         LinkFolder = 25,
         /// <summary>Marketplace Folder. Same as an Category but 
different display methods.</summary>
         MarketplaceFolder = 26,
         /// <summary>Linden mesh format</summary>
         Mesh = 49,
     }




More information about the Opensim-dev mailing list