diff options
author | Justin Clarke Casey | 2008-07-04 20:01:55 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-07-04 20:01:55 +0000 |
commit | 8179b472c3e923603ad54fcd5fbb6d94e9bee9d1 (patch) | |
tree | b35dd273f4baf561611cfc0c745cb0b164d75930 /OpenSim/Region/Environment | |
parent | * refactor: break out archiver's combined sync-async asset request routine re... (diff) | |
download | opensim-SC-8179b472c3e923603ad54fcd5fbb6d94e9bee9d1.zip opensim-SC-8179b472c3e923603ad54fcd5fbb6d94e9bee9d1.tar.gz opensim-SC-8179b472c3e923603ad54fcd5fbb6d94e9bee9d1.tar.bz2 opensim-SC-8179b472c3e923603ad54fcd5fbb6d94e9bee9d1.tar.xz |
* On archiving, analyze body parts and save textures referenced from them
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs index 2e48095..39ab058 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -33,6 +33,7 @@ using OpenSim.Region.Environment.Modules.World.Terrain; | |||
33 | using OpenSim.Region.Environment.Scenes; | 33 | using OpenSim.Region.Environment.Scenes; |
34 | using System.Collections.Generic; | 34 | using System.Collections.Generic; |
35 | using System.Reflection; | 35 | using System.Reflection; |
36 | using System.Text; | ||
36 | using System.Threading; | 37 | using System.Threading; |
37 | using libsecondlife; | 38 | using libsecondlife; |
38 | using log4net; | 39 | using log4net; |
@@ -145,13 +146,31 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
145 | assetUuids[texture.TextureID] = 1; | 146 | assetUuids[texture.TextureID] = 1; |
146 | } | 147 | } |
147 | } | 148 | } |
149 | |||
148 | foreach (TaskInventoryItem tii in part.TaskInventory.Values) | 150 | foreach (TaskInventoryItem tii in part.TaskInventory.Values) |
149 | { | 151 | { |
152 | m_log.DebugFormat("[ARCHIVER]: Analysing item asset type {0}", tii.Type); | ||
153 | |||
150 | if (!assetUuids.ContainsKey(tii.AssetID)) | 154 | if (!assetUuids.ContainsKey(tii.AssetID)) |
151 | { | 155 | { |
152 | assetUuids[tii.AssetID] = 1; | 156 | assetUuids[tii.AssetID] = 1; |
153 | 157 | ||
154 | if ((int)InventoryType.Object == tii.Type) | 158 | if ((int)AssetType.Bodypart == tii.Type) |
159 | { | ||
160 | AssetBase bodypartAsset = GetAsset(tii.AssetID); | ||
161 | m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data)); | ||
162 | AssetBodypart bp = new AssetBodypart(bodypartAsset.Data); | ||
163 | bp.Decode(); | ||
164 | |||
165 | m_log.DebugFormat("[ARCHIVER]: Body part {0} references {1} assets", bp.AssetID, bp.Textures.Count); | ||
166 | |||
167 | foreach (LLUUID uuid in bp.Textures.Values) | ||
168 | { | ||
169 | m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid); | ||
170 | assetUuids[uuid] = 1; | ||
171 | } | ||
172 | } | ||
173 | if ((int)AssetType.Object == tii.Type) | ||
155 | { | 174 | { |
156 | AssetBase objectAsset = GetAsset(tii.AssetID); | 175 | AssetBase objectAsset = GetAsset(tii.AssetID); |
157 | 176 | ||