diff options
author | Melanie | 2009-12-23 23:10:34 +0000 |
---|---|---|
committer | Melanie | 2009-12-23 23:10:34 +0000 |
commit | 5a653ef96f282a0497d765f869498f2707437611 (patch) | |
tree | 0dce03af6ce1ecdf870210efef45b30a0925f045 /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
parent | Add saving assets from gestures to IAR (diff) | |
download | opensim-SC_OLD-5a653ef96f282a0497d765f869498f2707437611.zip opensim-SC_OLD-5a653ef96f282a0497d765f869498f2707437611.tar.gz opensim-SC_OLD-5a653ef96f282a0497d765f869498f2707437611.tar.bz2 opensim-SC_OLD-5a653ef96f282a0497d765f869498f2707437611.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 930af81..7e3c192 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs | |||
@@ -91,6 +91,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
91 | { | 91 | { |
92 | GetWearableAssetUuids(assetUuid, assetUuids); | 92 | GetWearableAssetUuids(assetUuid, assetUuids); |
93 | } | 93 | } |
94 | else if (AssetType.Gesture == assetType) | ||
95 | { | ||
96 | GetGestureAssetUuids(assetUuid, assetUuids); | ||
97 | } | ||
94 | else if (AssetType.LSLText == assetType) | 98 | else if (AssetType.LSLText == assetType) |
95 | { | 99 | { |
96 | GetScriptAssetUuids(assetUuid, assetUuids); | 100 | GetScriptAssetUuids(assetUuid, assetUuids); |
@@ -278,5 +282,41 @@ namespace OpenSim.Region.Framework.Scenes | |||
278 | GatherAssetUuids(sog, assetUuids); | 282 | GatherAssetUuids(sog, assetUuids); |
279 | } | 283 | } |
280 | } | 284 | } |
285 | |||
286 | protected void GetGestureAssetUuids(UUID gestureUuid, IDictionary<UUID, int> assetUuids) | ||
287 | { | ||
288 | AssetBase assetBase = GetAsset(gestureUuid); | ||
289 | |||
290 | MemoryStream ms = new MemoryStream(assetBase.Data); | ||
291 | StreamReader sr = new StreamReader(ms); | ||
292 | |||
293 | sr.ReadLine(); // Unknown (Version?) | ||
294 | sr.ReadLine(); // Unknown | ||
295 | sr.ReadLine(); // Unknown | ||
296 | sr.ReadLine(); // Name | ||
297 | sr.ReadLine(); // Comment ? | ||
298 | int count = Convert.ToInt32(sr.ReadLine()); // Item count | ||
299 | |||
300 | for (int i = 0 ; i < count ; i++) | ||
301 | { | ||
302 | string type = sr.ReadLine(); | ||
303 | if (type == null) | ||
304 | break; | ||
305 | string name = sr.ReadLine(); | ||
306 | if (name == null) | ||
307 | break; | ||
308 | string id = sr.ReadLine(); | ||
309 | if (id == null) | ||
310 | break; | ||
311 | string unknown = sr.ReadLine(); | ||
312 | if (unknown == null) | ||
313 | break; | ||
314 | |||
315 | // If it can be parsed as a UUID, it is an asset ID | ||
316 | UUID uuid; | ||
317 | if (UUID.Parse(id, out uuid)) | ||
318 | assetUuids[uuid] = 1; | ||
319 | } | ||
320 | } | ||
281 | } | 321 | } |
282 | } \ No newline at end of file | 322 | } |