aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UuidGatherer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/UuidGatherer.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
index 0e83781..586b59d 100644
--- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
+++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs
@@ -212,7 +212,6 @@ namespace OpenSim.Region.Framework.Scenes
212// } 212// }
213// } 213// }
214 214
215
216 /// <summary> 215 /// <summary>
217 /// Gather all of the texture asset UUIDs used to reference "Materials" such as normal and specular maps 216 /// Gather all of the texture asset UUIDs used to reference "Materials" such as normal and specular maps
218 /// </summary> 217 /// </summary>
@@ -221,20 +220,23 @@ namespace OpenSim.Region.Framework.Scenes
221 public void GatherMaterialsUuids(SceneObjectPart part, IDictionary<UUID, AssetType> assetUuids) 220 public void GatherMaterialsUuids(SceneObjectPart part, IDictionary<UUID, AssetType> assetUuids)
222 { 221 {
223 // scan thru the dynAttrs map of this part for any textures used as materials 222 // scan thru the dynAttrs map of this part for any textures used as materials
224 OSDMap OSMaterials = null; 223 OSD osdMaterials = null;
225 224
226 lock (part.DynAttrs) 225 lock (part.DynAttrs)
227 { 226 {
228 if (part.DynAttrs.ContainsKey("OS:Materials")) 227 if (part.DynAttrs.ContainsStore("OpenSim", "Materials"))
229 OSMaterials = part.DynAttrs["OS:Materials"]; 228 {
230 if (OSMaterials != null && OSMaterials.ContainsKey("Materials")) 229 OSDMap materialsStore = part.DynAttrs.GetStore("OpenSim", "Materials");
230 materialsStore.TryGetValue("Materials", out osdMaterials);
231 }
232
233 if (osdMaterials != null)
231 { 234 {
232 OSD osd = OSMaterials["Materials"];
233 //m_log.Info("[UUID Gatherer]: found Materials: " + OSDParser.SerializeJsonString(osd)); 235 //m_log.Info("[UUID Gatherer]: found Materials: " + OSDParser.SerializeJsonString(osd));
234 236
235 if (osd is OSDArray) 237 if (osdMaterials is OSDArray)
236 { 238 {
237 OSDArray matsArr = osd as OSDArray; 239 OSDArray matsArr = osdMaterials as OSDArray;
238 foreach (OSDMap matMap in matsArr) 240 foreach (OSDMap matMap in matsArr)
239 { 241 {
240 try 242 try