diff options
author | Sean Dague | 2007-11-30 20:16:40 +0000 |
---|---|---|
committer | Sean Dague | 2007-11-30 20:16:40 +0000 |
commit | b167507e323a2f0162aa3106ab63d8cf2a5f57ae (patch) | |
tree | 420d2bedeb40a9f7b6e4b3da8d98af91d59f15f3 /OpenSim | |
parent | *Refactored the initial raytracer so it doesn't use the Parent reference. (diff) | |
download | opensim-SC-b167507e323a2f0162aa3106ab63d8cf2a5f57ae.zip opensim-SC-b167507e323a2f0162aa3106ab63d8cf2a5f57ae.tar.gz opensim-SC-b167507e323a2f0162aa3106ab63d8cf2a5f57ae.tar.bz2 opensim-SC-b167507e323a2f0162aa3106ab63d8cf2a5f57ae.tar.xz |
Patch for mantis 0000015: Textures don't display in the object
properties window
From Justin Casey (IBM)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolder.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCache.cs | 23 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 2 |
5 files changed, 45 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs index 3495e55..6161c5a 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolder.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolder.cs | |||
@@ -36,6 +36,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
36 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); | 36 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); |
37 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); | 37 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); |
38 | 38 | ||
39 | // Accessors | ||
40 | public int SubFoldersCount | ||
41 | { | ||
42 | get { return SubFolders.Count; } | ||
43 | } | ||
44 | |||
45 | // Constructors | ||
39 | public InventoryFolderImpl(InventoryFolderBase folderbase) | 46 | public InventoryFolderImpl(InventoryFolderBase folderbase) |
40 | { | 47 | { |
41 | agentID = folderbase.agentID; | 48 | agentID = folderbase.agentID; |
@@ -132,4 +139,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
132 | return itemList; | 139 | return itemList; |
133 | } | 140 | } |
134 | } | 141 | } |
135 | } \ No newline at end of file | 142 | } |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs index 117ed36..379ac9d 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCache.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCache.cs | |||
@@ -111,6 +111,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | /// <summary> | ||
115 | /// Tell the client about the various child items and folders contained in the requested folder. | ||
116 | /// </summary> | ||
117 | /// <param name="remoteClient"></param> | ||
118 | /// <param name="folderID"></param> | ||
119 | /// <param name="ownerID"></param> | ||
120 | /// <param name="fetchFolders"></param> | ||
121 | /// <param name="fetchItems"></param> | ||
122 | /// <param name="sortOrder"></param> | ||
114 | public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, | 123 | public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, |
115 | bool fetchFolders, bool fetchItems, int sortOrder) | 124 | bool fetchFolders, bool fetchItems, int sortOrder) |
116 | { | 125 | { |
@@ -118,14 +127,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
118 | if (folderID == libraryRoot.folderID) | 127 | if (folderID == libraryRoot.folderID) |
119 | { | 128 | { |
120 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, libraryRoot.folderID, | 129 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, libraryRoot.folderID, |
121 | libraryRoot.RequestListOfItems()); | 130 | libraryRoot.RequestListOfItems(), libraryRoot.SubFoldersCount); |
122 | 131 | ||
123 | return; | 132 | return; |
124 | } | 133 | } |
125 | 134 | ||
126 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) | 135 | if ((fold = libraryRoot.HasSubFolder(folderID)) != null) |
127 | { | 136 | { |
128 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems()); | 137 | remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems(), fold.SubFoldersCount); |
129 | 138 | ||
130 | return; | 139 | return; |
131 | } | 140 | } |
@@ -140,16 +149,16 @@ namespace OpenSim.Framework.Communications.Cache | |||
140 | if (fetchItems) | 149 | if (fetchItems) |
141 | { | 150 | { |
142 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, | 151 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, |
143 | userProfile.RootFolder.RequestListOfItems()); | 152 | userProfile.RootFolder.RequestListOfItems(), userProfile.RootFolder.SubFoldersCount); |
144 | } | 153 | } |
145 | } | 154 | } |
146 | else | 155 | else |
147 | { | 156 | { |
148 | InventoryFolderImpl folder = userProfile.RootFolder.HasSubFolder(folderID); | 157 | InventoryFolderImpl folder = userProfile.RootFolder.HasSubFolder(folderID); |
149 | if ((folder != null) && fetchItems) | 158 | |
159 | if (fetchItems && folder != null) | ||
150 | { | 160 | { |
151 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, | 161 | remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, folder.RequestListOfItems(), folder.SubFoldersCount); |
152 | folder.RequestListOfItems()); | ||
153 | } | 162 | } |
154 | } | 163 | } |
155 | } | 164 | } |
@@ -184,4 +193,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
184 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); | 193 | m_parent.InventoryService.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive); |
185 | } | 194 | } |
186 | } | 195 | } |
187 | } \ No newline at end of file | 196 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 0068761..1427516 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -449,7 +449,7 @@ namespace OpenSim.Framework | |||
449 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, | 449 | void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, |
450 | LLQuaternion rotation,LLVector3 velocity, LLVector3 rotationalvelocity); | 450 | LLQuaternion rotation,LLVector3 velocity, LLVector3 rotationalvelocity); |
451 | 451 | ||
452 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items); | 452 | void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, int subFoldersCount); |
453 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); | 453 | void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item); |
454 | void SendInventoryItemUpdate(InventoryItemBase Item); | 454 | void SendInventoryItemUpdate(InventoryItemBase Item); |
455 | void SendRemoveInventoryItem(LLUUID itemID); | 455 | void SendRemoveInventoryItem(LLUUID itemID); |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 90002c3..86efac1 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -1031,7 +1031,16 @@ namespace OpenSim.Region.ClientStack | |||
1031 | OutPacket(kill, ThrottleOutPacketType.Task); | 1031 | OutPacket(kill, ThrottleOutPacketType.Task); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) | 1034 | /// <summary> |
1035 | /// Send information about the items contained in a folder to the client. | ||
1036 | /// </summary> | ||
1037 | /// <param name="ownerID">The owner of the folder</param> | ||
1038 | /// <param name="folderID">The id of the folder</param> | ||
1039 | /// <param name="items">The items contained in the folder identified by folderID</param> | ||
1040 | /// <param name="subFoldersCount">The number of subfolders contained in the given folder. This is necessary since | ||
1041 | /// the client is expecting inventory packets which incorporate this number into the descendents field, even though | ||
1042 | /// we send back no details of the folders themselves (only the items).</param> | ||
1043 | public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, int subFoldersCount) | ||
1035 | { | 1044 | { |
1036 | Encoding enc = Encoding.ASCII; | 1045 | Encoding enc = Encoding.ASCII; |
1037 | uint FULL_MASK_PERMISSIONS = 2147483647; | 1046 | uint FULL_MASK_PERMISSIONS = 2147483647; |
@@ -1041,13 +1050,20 @@ namespace OpenSim.Region.ClientStack | |||
1041 | if (items.Count < 40) | 1050 | if (items.Count < 40) |
1042 | { | 1051 | { |
1043 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count]; | 1052 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count]; |
1044 | descend.AgentData.Descendents = items.Count; | 1053 | // In the very first packet, also include the sub folders count so that the total descendents the |
1054 | // client receives matches its expectations. Subsequent inventory packets need contain only the count | ||
1055 | // of the number of items actually in them. | ||
1056 | descend.AgentData.Descendents = items.Count + subFoldersCount; | ||
1045 | } | 1057 | } |
1046 | else | 1058 | else |
1047 | { | 1059 | { |
1048 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[40]; | 1060 | descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[40]; |
1049 | descend.AgentData.Descendents = 40; | 1061 | // In the very first packet, also include the sub folders count so that the total descendents the |
1062 | // client receives matches its expectations. Subsequent inventory packets need contain only the count | ||
1063 | // of the number of items actually in them. | ||
1064 | descend.AgentData.Descendents = 40 + subFoldersCount; | ||
1050 | } | 1065 | } |
1066 | |||
1051 | int i = 0; | 1067 | int i = 0; |
1052 | foreach (InventoryItemBase item in items) | 1068 | foreach (InventoryItemBase item in items) |
1053 | { | 1069 | { |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index 56316e6..77a287a 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | |||
@@ -301,7 +301,7 @@ namespace SimpleApp | |||
301 | { | 301 | { |
302 | } | 302 | } |
303 | 303 | ||
304 | public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) | 304 | public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, int subFoldersCount) |
305 | { | 305 | { |
306 | } | 306 | } |
307 | 307 | ||