diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UuidGatherer.cs | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 3882b45..945745e 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1290,7 +1290,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1290 | if (sop.MediaUrl != null) | 1290 | if (sop.MediaUrl != null) |
1291 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); | 1291 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); |
1292 | 1292 | ||
1293 | if (sop.DynAttrs.Count > 0) | 1293 | if (sop.DynAttrs.CountNamespaces > 0) |
1294 | { | 1294 | { |
1295 | writer.WriteStartElement("DynAttrs"); | 1295 | writer.WriteStartElement("DynAttrs"); |
1296 | sop.DynAttrs.WriteXml(writer); | 1296 | sop.DynAttrs.WriteXml(writer); |
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 |