diff options
author | Kitto Flora | 2010-03-19 19:14:09 -0400 |
---|---|---|
committer | Kitto Flora | 2010-03-19 19:14:09 -0400 |
commit | 0f5fb6f1901b0950ac52446702b07c91d16724d7 (patch) | |
tree | 72305ac8d95eccd4e7432538f061429e25e3418d /OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |
parent | Fix AbsolutePosition for autopilot/sit. (diff) | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-0f5fb6f1901b0950ac52446702b07c91d16724d7.zip opensim-SC_OLD-0f5fb6f1901b0950ac52446702b07c91d16724d7.tar.gz opensim-SC_OLD-0f5fb6f1901b0950ac52446702b07c91d16724d7.tar.bz2 opensim-SC_OLD-0f5fb6f1901b0950ac52446702b07c91d16724d7.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 3edb677..0ec3cc3 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -84,9 +84,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
84 | /// <param name="assetUuid">The uuid of the asset for which to gather referenced assets</param> | 84 | /// <param name="assetUuid">The uuid of the asset for which to gather referenced assets</param> |
85 | /// <param name="assetType">The type of the asset for the uuid given</param> | 85 | /// <param name="assetType">The type of the asset for the uuid given</param> |
86 | /// <param name="assetUuids">The assets gathered</param> | 86 | /// <param name="assetUuids">The assets gathered</param> |
87 | public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, int> assetUuids) | 87 | public void GatherAssetUuids(UUID assetUuid, AssetType assetType, IDictionary<UUID, AssetType> assetUuids) |
88 | { | 88 | { |
89 | assetUuids[assetUuid] = 1; | 89 | assetUuids[assetUuid] = assetType; |
90 | 90 | ||
91 | if (AssetType.Bodypart == assetType || AssetType.Clothing == assetType) | 91 | if (AssetType.Bodypart == assetType || AssetType.Clothing == assetType) |
92 | { | 92 | { |
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
116 | /// | 116 | /// |
117 | /// <param name="sceneObject">The scene object for which to gather assets</param> | 117 | /// <param name="sceneObject">The scene object for which to gather assets</param> |
118 | /// <param name="assetUuids">The assets gathered</param> | 118 | /// <param name="assetUuids">The assets gathered</param> |
119 | public void GatherAssetUuids(SceneObjectGroup sceneObject, IDictionary<UUID, int> assetUuids) | 119 | public void GatherAssetUuids(SceneObjectGroup sceneObject, IDictionary<UUID, AssetType> assetUuids) |
120 | { | 120 | { |
121 | // m_log.DebugFormat( | 121 | // m_log.DebugFormat( |
122 | // "[ASSET GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); | 122 | // "[ASSET GATHERER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); |
@@ -129,25 +129,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
129 | try | 129 | try |
130 | { | 130 | { |
131 | Primitive.TextureEntry textureEntry = part.Shape.Textures; | 131 | Primitive.TextureEntry textureEntry = part.Shape.Textures; |
132 | 132 | if (textureEntry != null) | |
133 | // Get the prim's default texture. This will be used for faces which don't have their own texture | ||
134 | assetUuids[textureEntry.DefaultTexture.TextureID] = 1; | ||
135 | |||
136 | // XXX: Not a great way to iterate through face textures, but there's no | ||
137 | // other method available to tell how many faces there actually are | ||
138 | //int i = 0; | ||
139 | foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures) | ||
140 | { | 133 | { |
141 | if (texture != null) | 134 | // Get the prim's default texture. This will be used for faces which don't have their own texture |
135 | if (textureEntry.DefaultTexture != null) | ||
136 | assetUuids[textureEntry.DefaultTexture.TextureID] = AssetType.Texture; | ||
137 | |||
138 | if (textureEntry.FaceTextures != null) | ||
142 | { | 139 | { |
143 | //m_log.DebugFormat("[ARCHIVER]: Got face {0}", i++); | 140 | // Loop through the rest of the texture faces (a non-null face means the face is different from DefaultTexture) |
144 | assetUuids[texture.TextureID] = 1; | 141 | foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures) |
142 | { | ||
143 | if (texture != null) | ||
144 | assetUuids[texture.TextureID] = AssetType.Texture; | ||
145 | } | ||
145 | } | 146 | } |
146 | } | 147 | } |
147 | 148 | ||
148 | // If the prim is a sculpt then preserve this information too | 149 | // If the prim is a sculpt then preserve this information too |
149 | if (part.Shape.SculptTexture != UUID.Zero) | 150 | if (part.Shape.SculptTexture != UUID.Zero) |
150 | assetUuids[part.Shape.SculptTexture] = 1; | 151 | assetUuids[part.Shape.SculptTexture] = AssetType.Texture; |
151 | 152 | ||
152 | TaskInventoryDictionary taskDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone(); | 153 | TaskInventoryDictionary taskDictionary = (TaskInventoryDictionary)part.TaskInventory.Clone(); |
153 | 154 | ||
@@ -217,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
217 | /// </summary> | 218 | /// </summary> |
218 | /// <param name="scriptUuid"></param> | 219 | /// <param name="scriptUuid"></param> |
219 | /// <param name="assetUuids">Dictionary in which to record the references</param> | 220 | /// <param name="assetUuids">Dictionary in which to record the references</param> |
220 | protected void GetScriptAssetUuids(UUID scriptUuid, IDictionary<UUID, int> assetUuids) | 221 | protected void GetScriptAssetUuids(UUID scriptUuid, IDictionary<UUID, AssetType> assetUuids) |
221 | { | 222 | { |
222 | AssetBase scriptAsset = GetAsset(scriptUuid); | 223 | AssetBase scriptAsset = GetAsset(scriptUuid); |
223 | 224 | ||
@@ -232,7 +233,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
232 | { | 233 | { |
233 | UUID uuid = new UUID(uuidMatch.Value); | 234 | UUID uuid = new UUID(uuidMatch.Value); |
234 | //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid); | 235 | //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid); |
235 | assetUuids[uuid] = 1; | 236 | |
237 | // Assume AssetIDs embedded in scripts are textures | ||
238 | assetUuids[uuid] = AssetType.Texture; | ||
236 | } | 239 | } |
237 | } | 240 | } |
238 | } | 241 | } |
@@ -242,7 +245,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
242 | /// </summary> | 245 | /// </summary> |
243 | /// <param name="wearableAssetUuid"></param> | 246 | /// <param name="wearableAssetUuid"></param> |
244 | /// <param name="assetUuids">Dictionary in which to record the references</param> | 247 | /// <param name="assetUuids">Dictionary in which to record the references</param> |
245 | protected void GetWearableAssetUuids(UUID wearableAssetUuid, IDictionary<UUID, int> assetUuids) | 248 | protected void GetWearableAssetUuids(UUID wearableAssetUuid, IDictionary<UUID, AssetType> assetUuids) |
246 | { | 249 | { |
247 | AssetBase assetBase = GetAsset(wearableAssetUuid); | 250 | AssetBase assetBase = GetAsset(wearableAssetUuid); |
248 | 251 | ||
@@ -257,8 +260,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
257 | 260 | ||
258 | foreach (UUID uuid in wearableAsset.Textures.Values) | 261 | foreach (UUID uuid in wearableAsset.Textures.Values) |
259 | { | 262 | { |
260 | //m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid); | 263 | assetUuids[uuid] = AssetType.Texture; |
261 | assetUuids[uuid] = 1; | ||
262 | } | 264 | } |
263 | } | 265 | } |
264 | } | 266 | } |
@@ -270,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
270 | /// </summary> | 272 | /// </summary> |
271 | /// <param name="sceneObject"></param> | 273 | /// <param name="sceneObject"></param> |
272 | /// <param name="assetUuids"></param> | 274 | /// <param name="assetUuids"></param> |
273 | protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary<UUID, int> assetUuids) | 275 | protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary<UUID, AssetType> assetUuids) |
274 | { | 276 | { |
275 | AssetBase objectAsset = GetAsset(sceneObjectUuid); | 277 | AssetBase objectAsset = GetAsset(sceneObjectUuid); |
276 | 278 | ||
@@ -284,7 +286,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
284 | } | 286 | } |
285 | } | 287 | } |
286 | 288 | ||
287 | protected void GetGestureAssetUuids(UUID gestureUuid, IDictionary<UUID, int> assetUuids) | 289 | protected void GetGestureAssetUuids(UUID gestureUuid, IDictionary<UUID, AssetType> assetUuids) |
288 | { | 290 | { |
289 | AssetBase assetBase = GetAsset(gestureUuid); | 291 | AssetBase assetBase = GetAsset(gestureUuid); |
290 | 292 | ||
@@ -316,7 +318,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
316 | // If it can be parsed as a UUID, it is an asset ID | 318 | // If it can be parsed as a UUID, it is an asset ID |
317 | UUID uuid; | 319 | UUID uuid; |
318 | if (UUID.TryParse(id, out uuid)) | 320 | if (UUID.TryParse(id, out uuid)) |
319 | assetUuids[uuid] = 1; | 321 | assetUuids[uuid] = AssetType.Animation; |
320 | } | 322 | } |
321 | } | 323 | } |
322 | } | 324 | } |