Attachment Protocols

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Direct UDP messages)
 
(2 intermediate revisions by one user not shown)
Line 7: Line 7:
 
On viewers without a "Current Outfit" folder (version 1 viewers and some version 2 viewers), this is the primary way in which a viewer is notified as to what is attached.
 
On viewers without a "Current Outfit" folder (version 1 viewers and some version 2 viewers), this is the primary way in which a viewer is notified as to what is attached.
  
On viewers that do have a "Current Outfit" folder, they will issues RezMultipleAttachmentFromInventory UDP requests to re-rez the objects.  However, OpenSimulator will ignore these and use it's record of the attached objects from the avatar service instead in order to maintain compatibility with version 1 viewersThis should make no difference as both records should be identical.
+
On viewers that do have a "Current Outfit" folder, they will issues RezMultipleAttachmentFromInventory UDP requests to re-rez the objects.  However, OpenSimulator will also use the data in the [[avatar service]] to wear items.  Hence, if for some reason an item is registered as worn in the avatar service then it will be worn even if it's not in the current outfit folder.  Conversely, if an item is worn in the current outfit folder but for some reason is not registered in the avatar service then it will still be wornIn the later case, the two will come into sync as the current outfit folder item will be added to the avatar service.
  
 
= Protocol =
 
= Protocol =
Line 43: Line 43:
  
 
=== KillObject ===
 
=== KillObject ===
Simulator -> Viewer.  Sent by the simulator to tell the viewer that an object has been detached.  For a V3 viewer, this will trigger a subsequent RemoveInventoryItem to remove the item's link in the Current Outfit folder.
+
Simulator -> Viewer.   
 +
 
 +
Sent by the simulator to tell the viewer that an object has been detached.  For a V3 viewer, this will trigger a subsequent RemoveInventoryItem to remove the item's link in the Current Outfit folder.
  
 
=== ObjectUpdate ===
 
=== ObjectUpdate ===
Simulator -> Viewer.  Tells the viewer about the properties of the new attachment (position, attachment point, etc.).  Also conveys the attachment point, the position and which item this attachment comes from (if appropriate).
+
Simulator -> Viewer.   
 +
 
 +
Tells the viewer about the properties of the new attachment (position, attachment point, etc.).  Also conveys the attachment point, the position and which item this attachment comes from (if appropriate).
  
 
=== UpdateCreateInventoryItem ===
 
=== UpdateCreateInventoryItem ===
Simulator -> Viewer.  Tells the viewer that a new inventory item is present for a newly received attachment.  For a V3 viewer, this will trigger a further LinkInventoryItem message to create a link for that item in the Current Outfit folder.
+
Simulator -> Viewer.   
 +
 
 +
Tells the viewer that a new inventory item is present for a newly received attachment.  For a V3 viewer, this will trigger a further LinkInventoryItem message to create a link for that item in the Current Outfit folder.
 +
 
 +
= Current Outfit Folder =
 +
As discussed above, viewer 2/3 onwards (i.e. all modern viewers) have a "Current Outfit" folder which lists the clothing, body parts and objects that the avatar is currently wearing.  These are actually links to other inventory items.  In turn, these reference assets as do all other inventory items.  For instance
 +
 
 +
Current Outfit/Default Eyes => Body Parts/Default Eyes => eyes asset

Latest revision as of 13:16, 7 January 2015

Contents

[edit] Introduction

WIP: These are rough notes on some aspects of attachments - will be filled out as time goes on -- Justincc 22:50, 4 April 2013 (UTC)

On login, the simulator sends information to the viewer about the current attachments and rezzes them attached to the avatar in the region. This information is pulled from the avatar service.

On viewers without a "Current Outfit" folder (version 1 viewers and some version 2 viewers), this is the primary way in which a viewer is notified as to what is attached.

On viewers that do have a "Current Outfit" folder, they will issues RezMultipleAttachmentFromInventory UDP requests to re-rez the objects. However, OpenSimulator will also use the data in the avatar service to wear items. Hence, if for some reason an item is registered as worn in the avatar service then it will be worn even if it's not in the current outfit folder. Conversely, if an item is worn in the current outfit folder but for some reason is not registered in the avatar service then it will still be worn. In the later case, the two will come into sync as the current outfit folder item will be added to the avatar service.

[edit] Protocol

Below is a list of the UDP messages involved in attachment manipulation that flow between the viewer and the simulator. This list may not be complete.

[edit] Direct UDP messages

[edit] ObjectAttach

Viewer -> Simulator.

Attachment an object in the scene.

[edit] ObjectDetach

Viewer -> Simulator.

Detach an attachment into the user's inventory.

[edit] ObjectDrop

Viewer -> Simulator.

Detach an attachment into the scene.

[edit] RezSingleAttachmentFromInv

Viewer -> Simulator.

Attach an object from the user's inventory.

[edit] RezMultipleAttachmentsFromInv

Viewer -> Simulator.

Rez multiple attachments at once from the user's inventory.

[edit] Associated UDP messages

[edit] KillObject

Simulator -> Viewer.

Sent by the simulator to tell the viewer that an object has been detached. For a V3 viewer, this will trigger a subsequent RemoveInventoryItem to remove the item's link in the Current Outfit folder.

[edit] ObjectUpdate

Simulator -> Viewer.

Tells the viewer about the properties of the new attachment (position, attachment point, etc.). Also conveys the attachment point, the position and which item this attachment comes from (if appropriate).

[edit] UpdateCreateInventoryItem

Simulator -> Viewer.

Tells the viewer that a new inventory item is present for a newly received attachment. For a V3 viewer, this will trigger a further LinkInventoryItem message to create a link for that item in the Current Outfit folder.

[edit] Current Outfit Folder

As discussed above, viewer 2/3 onwards (i.e. all modern viewers) have a "Current Outfit" folder which lists the clothing, body parts and objects that the avatar is currently wearing. These are actually links to other inventory items. In turn, these reference assets as do all other inventory items. For instance

Current Outfit/Default Eyes => Body Parts/Default Eyes => eyes asset
Personal tools
General
About This Wiki