aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMike Mazur2009-02-17 01:36:44 +0000
committerMike Mazur2009-02-17 01:36:44 +0000
commit76c0935ec744f2d230489398f879eb7f42b11d37 (patch)
treea68253554e3899f10b6c341db369ce4a029dfaa5 /OpenSim/Region/Framework
parentMajor change to how appearance is managed, including changes in login and use... (diff)
downloadopensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.zip
opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.gz
opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.bz2
opensim-SC-76c0935ec744f2d230489398f879eb7f42b11d37.tar.xz
- remove the Metadata property from AssetBase and return all previous
properties as before - prefix private variables with m_ in AssetBase.cs - related to Mantis #3122, as mentioned in https://lists.berlios.de/pipermail/opensim-dev/2009-February/005088.html - all services will likely need to be upgraded after this commit
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs54
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
3 files changed, 45 insertions, 45 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
index 1f01fa2..1a3c4c8 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
@@ -120,12 +120,12 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
120 120
121 if (m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset) && (asset != null)) 121 if (m_scene.CommsManager.AssetCache.TryGetCachedAsset(assetID, out asset) && (asset != null))
122 { 122 {
123 m_log.Debug("[HGScene]: Asset made it to asset cache. " + asset.Metadata.Name + " " + assetID); 123 m_log.Debug("[HGScene]: Asset made it to asset cache. " + asset.Name + " " + assetID);
124 // I think I need to store it in the asset DB too. 124 // I think I need to store it in the asset DB too.
125 // For now, let me just do it for textures and scripts 125 // For now, let me just do it for textures and scripts
126 if (((AssetType)asset.Metadata.Type == AssetType.Texture) || 126 if (((AssetType)asset.Type == AssetType.Texture) ||
127 ((AssetType)asset.Metadata.Type == AssetType.LSLBytecode) || 127 ((AssetType)asset.Type == AssetType.LSLBytecode) ||
128 ((AssetType)asset.Metadata.Type == AssetType.LSLText)) 128 ((AssetType)asset.Type == AssetType.LSLText))
129 { 129 {
130 AssetBase asset1 = new AssetBase(); 130 AssetBase asset1 = new AssetBase();
131 Copy(asset, asset1); 131 Copy(asset, asset1);
@@ -149,7 +149,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
149 if (asset1 != null) 149 if (asset1 != null)
150 { 150 {
151 // See long comment in AssetCache.AddAsset 151 // See long comment in AssetCache.AddAsset
152 if (!asset1.Metadata.Temporary || asset1.Metadata.Local) 152 if (!asset1.Temporary || asset1.Local)
153 { 153 {
154 // The asset cache returns instances of subclasses of AssetBase: 154 // The asset cache returns instances of subclasses of AssetBase:
155 // TextureImage or AssetInfo. So in passing them to the remote 155 // TextureImage or AssetInfo. So in passing them to the remote
@@ -170,14 +170,14 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
170 170
171 private void Copy(AssetBase from, AssetBase to) 171 private void Copy(AssetBase from, AssetBase to)
172 { 172 {
173 to.Data = from.Data; 173 to.Data = from.Data;
174 to.Metadata.Description = from.Metadata.Description; 174 to.Description = from.Description;
175 to.Metadata.FullID = from.Metadata.FullID; 175 to.FullID = from.FullID;
176 to.Metadata.ID = from.Metadata.ID; 176 to.ID = from.ID;
177 to.Metadata.Local = from.Metadata.Local; 177 to.Local = from.Local;
178 to.Metadata.Name = from.Metadata.Name; 178 to.Name = from.Name;
179 to.Metadata.Temporary = from.Metadata.Temporary; 179 to.Temporary = from.Temporary;
180 to.Metadata.Type = from.Metadata.Type; 180 to.Type = from.Type;
181 181
182 } 182 }
183 183
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
235 private Dictionary<UUID, bool> SniffUUIDs(AssetBase asset) 235 private Dictionary<UUID, bool> SniffUUIDs(AssetBase asset)
236 { 236 {
237 Dictionary<UUID, bool> uuids = new Dictionary<UUID, bool>(); 237 Dictionary<UUID, bool> uuids = new Dictionary<UUID, bool>();
238 if ((asset != null) && ((AssetType)asset.Metadata.Type == AssetType.Object)) 238 if ((asset != null) && ((AssetType)asset.Type == AssetType.Object))
239 { 239 {
240 string ass_str = Utils.BytesToString(asset.Data); 240 string ass_str = Utils.BytesToString(asset.Data);
241 SceneObjectGroup sog = new SceneObjectGroup(ass_str, true); 241 SceneObjectGroup sog = new SceneObjectGroup(ass_str, true);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index c98629b..2800e9e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -193,11 +193,11 @@ namespace OpenSim.Region.Framework.Scenes
193 CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); 193 CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data);
194 CommsManager.AssetCache.AddAsset(asset); 194 CommsManager.AssetCache.AddAsset(asset);
195 195
196 item.AssetID = asset.Metadata.FullID; 196 item.AssetID = asset.FullID;
197 userInfo.UpdateItem(item); 197 userInfo.UpdateItem(item);
198 198
199 // remoteClient.SendInventoryItemCreateUpdate(item); 199 // remoteClient.SendInventoryItemCreateUpdate(item);
200 return (asset.Metadata.FullID); 200 return (asset.FullID);
201 } 201 }
202 } 202 }
203 } 203 }
@@ -285,7 +285,7 @@ namespace OpenSim.Region.Framework.Scenes
285 } 285 }
286 286
287 // Update item with new asset 287 // Update item with new asset
288 item.AssetID = asset.Metadata.FullID; 288 item.AssetID = asset.FullID;
289 group.UpdateInventoryItem(item); 289 group.UpdateInventoryItem(item);
290 part.GetProperties(remoteClient); 290 part.GetProperties(remoteClient);
291 291
@@ -688,7 +688,7 @@ namespace OpenSim.Region.Framework.Scenes
688 { 688 {
689 if (newName != String.Empty) 689 if (newName != String.Empty)
690 { 690 {
691 asset.Metadata.Name = newName; 691 asset.Name = newName;
692 } 692 }
693 else 693 else
694 { 694 {
@@ -728,10 +728,10 @@ namespace OpenSim.Region.Framework.Scenes
728 private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) 728 private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
729 { 729 {
730 AssetBase asset = new AssetBase(); 730 AssetBase asset = new AssetBase();
731 asset.Metadata.Name = name; 731 asset.Name = name;
732 asset.Metadata.Description = description; 732 asset.Description = description;
733 asset.Metadata.Type = assetType; 733 asset.Type = assetType;
734 asset.Metadata.FullID = UUID.Random(); 734 asset.FullID = UUID.Random();
735 asset.Data = (data == null) ? new byte[1] : data; 735 asset.Data = (data == null) ? new byte[1] : data;
736 736
737 return asset; 737 return asset;
@@ -831,11 +831,11 @@ namespace OpenSim.Region.Framework.Scenes
831 item.Owner = remoteClient.AgentId; 831 item.Owner = remoteClient.AgentId;
832 item.Creator = remoteClient.AgentId; 832 item.Creator = remoteClient.AgentId;
833 item.ID = UUID.Random(); 833 item.ID = UUID.Random();
834 item.AssetID = asset.Metadata.FullID; 834 item.AssetID = asset.FullID;
835 item.Description = asset.Metadata.Description; 835 item.Description = asset.Description;
836 item.Name = name; 836 item.Name = name;
837 item.Flags = flags; 837 item.Flags = flags;
838 item.AssetType = asset.Metadata.Type; 838 item.AssetType = asset.Type;
839 item.InvType = invType; 839 item.InvType = invType;
840 item.Folder = folderID; 840 item.Folder = folderID;
841 item.CurrentPermissions = currentMask; 841 item.CurrentPermissions = currentMask;
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Framework.Scenes
905 AssetBase asset = CreateAsset(name, description, assetType, data); 905 AssetBase asset = CreateAsset(name, description, assetType, data);
906 CommsManager.AssetCache.AddAsset(asset); 906 CommsManager.AssetCache.AddAsset(asset);
907 907
908 CreateNewInventoryItem(remoteClient, folderID, asset.Metadata.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); 908 CreateNewInventoryItem(remoteClient, folderID, asset.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate);
909 } 909 }
910 else 910 else
911 { 911 {
@@ -1553,7 +1553,7 @@ namespace OpenSim.Region.Framework.Scenes
1553 taskItem.Flags = itemBase.Flags; 1553 taskItem.Flags = itemBase.Flags;
1554 taskItem.PermsGranter = UUID.Zero; 1554 taskItem.PermsGranter = UUID.Zero;
1555 taskItem.PermsMask = 0; 1555 taskItem.PermsMask = 0;
1556 taskItem.AssetID = asset.Metadata.FullID; 1556 taskItem.AssetID = asset.FullID;
1557 1557
1558 part.Inventory.AddInventoryItem(taskItem, false); 1558 part.Inventory.AddInventoryItem(taskItem, false);
1559 part.GetProperties(remoteClient); 1559 part.GetProperties(remoteClient);
@@ -1953,16 +1953,16 @@ namespace OpenSim.Region.Framework.Scenes
1953 (sbyte)AssetType.Object, 1953 (sbyte)AssetType.Object,
1954 Utils.StringToBytes(sceneObjectXml)); 1954 Utils.StringToBytes(sceneObjectXml));
1955 CommsManager.AssetCache.AddAsset(asset); 1955 CommsManager.AssetCache.AddAsset(asset);
1956 assetID = asset.Metadata.FullID; 1956 assetID = asset.FullID;
1957 1957
1958 if (DeRezAction.SaveToExistingUserInventoryItem == action) 1958 if (DeRezAction.SaveToExistingUserInventoryItem == action)
1959 { 1959 {
1960 item.AssetID = asset.Metadata.FullID; 1960 item.AssetID = asset.FullID;
1961 userInfo.UpdateItem(item); 1961 userInfo.UpdateItem(item);
1962 } 1962 }
1963 else 1963 else
1964 { 1964 {
1965 item.AssetID = asset.Metadata.FullID; 1965 item.AssetID = asset.FullID;
1966 1966
1967 if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions()) 1967 if (remoteClient != null && (remoteClient.AgentId != objectGroup.RootPart.OwnerID) && Permissions.PropagatePermissions())
1968 { 1968 {
@@ -1995,9 +1995,9 @@ namespace OpenSim.Region.Framework.Scenes
1995 1995
1996 // TODO: add the new fields (Flags, Sale info, etc) 1996 // TODO: add the new fields (Flags, Sale info, etc)
1997 item.CreationDate = Util.UnixTimeSinceEpoch(); 1997 item.CreationDate = Util.UnixTimeSinceEpoch();
1998 item.Description = asset.Metadata.Description; 1998 item.Description = asset.Description;
1999 item.Name = asset.Metadata.Name; 1999 item.Name = asset.Name;
2000 item.AssetType = asset.Metadata.Type; 2000 item.AssetType = asset.Type;
2001 2001
2002 userInfo.AddItem(item); 2002 userInfo.AddItem(item);
2003 2003
@@ -2080,10 +2080,10 @@ namespace OpenSim.Region.Framework.Scenes
2080 Utils.StringToBytes(sceneObjectXml)); 2080 Utils.StringToBytes(sceneObjectXml));
2081 CommsManager.AssetCache.AddAsset(asset); 2081 CommsManager.AssetCache.AddAsset(asset);
2082 2082
2083 item.AssetID = asset.Metadata.FullID; 2083 item.AssetID = asset.FullID;
2084 item.Description = asset.Metadata.Description; 2084 item.Description = asset.Description;
2085 item.Name = asset.Metadata.Name; 2085 item.Name = asset.Name;
2086 item.AssetType = asset.Metadata.Type; 2086 item.AssetType = asset.Type;
2087 item.InvType = (int)InventoryType.Object; 2087 item.InvType = (int)InventoryType.Object;
2088 item.Folder = foundFolder; 2088 item.Folder = foundFolder;
2089 2089
@@ -2121,10 +2121,10 @@ namespace OpenSim.Region.Framework.Scenes
2121 item.Creator = grp.RootPart.CreatorID; 2121 item.Creator = grp.RootPart.CreatorID;
2122 item.Owner = remoteClient.AgentId; 2122 item.Owner = remoteClient.AgentId;
2123 item.ID = UUID.Random(); 2123 item.ID = UUID.Random();
2124 item.AssetID = asset.Metadata.FullID; 2124 item.AssetID = asset.FullID;
2125 item.Description = asset.Metadata.Description; 2125 item.Description = asset.Description;
2126 item.Name = asset.Metadata.Name; 2126 item.Name = asset.Name;
2127 item.AssetType = asset.Metadata.Type; 2127 item.AssetType = asset.Type;
2128 item.InvType = (int)InventoryType.Object; 2128 item.InvType = (int)InventoryType.Object;
2129 2129
2130 item.Folder = UUID.Zero; // Objects folder! 2130 item.Folder = UUID.Zero; // Objects folder!
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5badd2d..1d2f37a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3555,10 +3555,10 @@ namespace OpenSim.Region.Framework.Scenes
3555 3555
3556 item.ID = UUID.Random(); 3556 item.ID = UUID.Random();
3557 item.Owner = remoteClient.AgentId; 3557 item.Owner = remoteClient.AgentId;
3558 item.AssetID = asset.Metadata.FullID; 3558 item.AssetID = asset.FullID;
3559 item.Description = asset.Metadata.Description; 3559 item.Description = asset.Description;
3560 item.Name = asset.Metadata.Name; 3560 item.Name = asset.Name;
3561 item.AssetType = asset.Metadata.Type; 3561 item.AssetType = asset.Type;
3562 item.InvType = (int)InventoryType.Object; 3562 item.InvType = (int)InventoryType.Object;
3563 item.Folder = categoryID; 3563 item.Folder = categoryID;
3564 3564