diff options
author | Justin Clarke Casey | 2009-02-16 19:15:16 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-02-16 19:15:16 +0000 |
commit | 93837807ffb24e5811368063b9231a9d8b018d9d (patch) | |
tree | 5da8dcbc3fd6e6e4c7003e486f0ad26bd7c43d87 /OpenSim/Region/Framework/Scenes | |
parent | * Iniital inventory archive test code. Doesn't actually do any testing yet (diff) | |
download | opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.zip opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.tar.gz opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.tar.bz2 opensim-SC_OLD-93837807ffb24e5811368063b9231a9d8b018d9d.tar.xz |
* refactor: remove AssetCache field hanging off Scene
* This is always available at Scene.CommsManager.AssetCache
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
9 files changed, 24 insertions, 30 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs index 4039288..1f01fa2 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs | |||
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
129 | { | 129 | { |
130 | AssetBase asset1 = new AssetBase(); | 130 | AssetBase asset1 = new AssetBase(); |
131 | Copy(asset, asset1); | 131 | Copy(asset, asset1); |
132 | m_scene.AssetCache.AssetServer.StoreAsset(asset1); | 132 | m_scene.CommsManager.AssetCache.AssetServer.StoreAsset(asset1); |
133 | } | 133 | } |
134 | return true; | 134 | return true; |
135 | } | 135 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs index ea03cf9..423acc1 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs | |||
@@ -49,10 +49,10 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
49 | 49 | ||
50 | public HGScene(RegionInfo regInfo, AgentCircuitManager authen, | 50 | public HGScene(RegionInfo regInfo, AgentCircuitManager authen, |
51 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 51 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
52 | IAssetCache assetCach, StorageManager storeManager, | 52 | StorageManager storeManager, |
53 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 53 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
54 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 54 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
55 | : base(regInfo, authen, commsMan, sceneGridService, assetCach, storeManager, moduleLoader, | 55 | : base(regInfo, authen, commsMan, sceneGridService, storeManager, moduleLoader, |
56 | dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) | 56 | dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) |
57 | { | 57 | { |
58 | m_log.Info("[HGScene]: Starting HGScene."); | 58 | m_log.Info("[HGScene]: Starting HGScene."); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0c6ad0d..c98629b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
191 | 191 | ||
192 | AssetBase asset = | 192 | AssetBase asset = |
193 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); | 193 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); |
194 | AssetCache.AddAsset(asset); | 194 | CommsManager.AssetCache.AddAsset(asset); |
195 | 195 | ||
196 | item.AssetID = asset.Metadata.FullID; | 196 | item.AssetID = asset.Metadata.FullID; |
197 | userInfo.UpdateItem(item); | 197 | userInfo.UpdateItem(item); |
@@ -277,7 +277,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
277 | } | 277 | } |
278 | 278 | ||
279 | AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data); | 279 | AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data); |
280 | AssetCache.AddAsset(asset); | 280 | CommsManager.AssetCache.AddAsset(asset); |
281 | 281 | ||
282 | if (isScriptRunning) | 282 | if (isScriptRunning) |
283 | { | 283 | { |
@@ -681,7 +681,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
681 | } | 681 | } |
682 | 682 | ||
683 | AssetBase asset | 683 | AssetBase asset |
684 | = AssetCache.GetAsset( | 684 | = CommsManager.AssetCache.GetAsset( |
685 | item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false)); | 685 | item.AssetID, (item.AssetType == (int)AssetType.Texture ? true : false)); |
686 | 686 | ||
687 | if (asset != null) | 687 | if (asset != null) |
@@ -903,7 +903,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
903 | } | 903 | } |
904 | 904 | ||
905 | AssetBase asset = CreateAsset(name, description, assetType, data); | 905 | AssetBase asset = CreateAsset(name, description, assetType, data); |
906 | 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.Metadata.Name, 0, callbackID, asset, invType, nextOwnerMask, creationDate); |
909 | } | 909 | } |
@@ -1530,7 +1530,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1530 | return; | 1530 | return; |
1531 | 1531 | ||
1532 | AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); | 1532 | AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); |
1533 | AssetCache.AddAsset(asset); | 1533 | CommsManager.AssetCache.AddAsset(asset); |
1534 | 1534 | ||
1535 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 1535 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
1536 | 1536 | ||
@@ -1952,7 +1952,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1952 | objectGroup.GetPartDescription(objectGroup.RootPart.LocalId), | 1952 | objectGroup.GetPartDescription(objectGroup.RootPart.LocalId), |
1953 | (sbyte)AssetType.Object, | 1953 | (sbyte)AssetType.Object, |
1954 | Utils.StringToBytes(sceneObjectXml)); | 1954 | Utils.StringToBytes(sceneObjectXml)); |
1955 | AssetCache.AddAsset(asset); | 1955 | CommsManager.AssetCache.AddAsset(asset); |
1956 | assetID = asset.Metadata.FullID; | 1956 | assetID = asset.Metadata.FullID; |
1957 | 1957 | ||
1958 | if (DeRezAction.SaveToExistingUserInventoryItem == action) | 1958 | if (DeRezAction.SaveToExistingUserInventoryItem == action) |
@@ -2078,7 +2078,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2078 | objectGroup.GetPartDescription(objectGroup.LocalId), | 2078 | objectGroup.GetPartDescription(objectGroup.LocalId), |
2079 | (sbyte)AssetType.Object, | 2079 | (sbyte)AssetType.Object, |
2080 | Utils.StringToBytes(sceneObjectXml)); | 2080 | Utils.StringToBytes(sceneObjectXml)); |
2081 | AssetCache.AddAsset(asset); | 2081 | CommsManager.AssetCache.AddAsset(asset); |
2082 | 2082 | ||
2083 | item.AssetID = asset.Metadata.FullID; | 2083 | item.AssetID = asset.Metadata.FullID; |
2084 | item.Description = asset.Metadata.Description; | 2084 | item.Description = asset.Metadata.Description; |
@@ -2115,7 +2115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2115 | grp.GetPartDescription(grp.LocalId), | 2115 | grp.GetPartDescription(grp.LocalId), |
2116 | (sbyte)AssetType.Object, | 2116 | (sbyte)AssetType.Object, |
2117 | Utils.StringToBytes(sceneObjectXml)); | 2117 | Utils.StringToBytes(sceneObjectXml)); |
2118 | AssetCache.AddAsset(asset); | 2118 | CommsManager.AssetCache.AddAsset(asset); |
2119 | 2119 | ||
2120 | InventoryItemBase item = new InventoryItemBase(); | 2120 | InventoryItemBase item = new InventoryItemBase(); |
2121 | item.Creator = grp.RootPart.CreatorID; | 2121 | item.Creator = grp.RootPart.CreatorID; |
@@ -2239,7 +2239,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2239 | 2239 | ||
2240 | if (item != null) | 2240 | if (item != null) |
2241 | { | 2241 | { |
2242 | AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); | 2242 | AssetBase rezAsset = CommsManager.AssetCache.GetAsset(item.AssetID, false); |
2243 | 2243 | ||
2244 | if (rezAsset != null) | 2244 | if (rezAsset != null) |
2245 | { | 2245 | { |
@@ -2407,7 +2407,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2407 | { | 2407 | { |
2408 | UUID ownerID = item.OwnerID; | 2408 | UUID ownerID = item.OwnerID; |
2409 | 2409 | ||
2410 | AssetBase rezAsset = AssetCache.GetAsset(item.AssetID, false); | 2410 | AssetBase rezAsset = CommsManager.AssetCache.GetAsset(item.AssetID, false); |
2411 | 2411 | ||
2412 | if (rezAsset != null) | 2412 | if (rezAsset != null) |
2413 | { | 2413 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0f57b7c..c3ab5e9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -268,7 +268,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
268 | 268 | ||
269 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, | 269 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, |
270 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, | 270 | CommunicationsManager commsMan, SceneCommunicationService sceneGridService, |
271 | IAssetCache assetCach, StorageManager storeManager, | 271 | StorageManager storeManager, |
272 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 272 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
273 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 273 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
274 | { | 274 | { |
@@ -281,7 +281,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
281 | CommsManager = commsMan; | 281 | CommsManager = commsMan; |
282 | m_sceneGridService = sceneGridService; | 282 | m_sceneGridService = sceneGridService; |
283 | m_storageManager = storeManager; | 283 | m_storageManager = storeManager; |
284 | AssetCache = assetCach; | ||
285 | m_regInfo = regInfo; | 284 | m_regInfo = regInfo; |
286 | m_regionHandle = m_regInfo.RegionHandle; | 285 | m_regionHandle = m_regInfo.RegionHandle; |
287 | m_regionName = m_regInfo.RegionName; | 286 | m_regionName = m_regInfo.RegionName; |
@@ -3543,7 +3542,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3543 | group.GetPartDescription(localID), | 3542 | group.GetPartDescription(localID), |
3544 | (sbyte)AssetType.Object, | 3543 | (sbyte)AssetType.Object, |
3545 | Utils.StringToBytes(sceneObjectXml)); | 3544 | Utils.StringToBytes(sceneObjectXml)); |
3546 | AssetCache.AddAsset(asset); | 3545 | CommsManager.AssetCache.AddAsset(asset); |
3547 | 3546 | ||
3548 | InventoryItemBase item = new InventoryItemBase(); | 3547 | InventoryItemBase item = new InventoryItemBase(); |
3549 | item.Creator = part.CreatorID; | 3548 | item.Creator = part.CreatorID; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 3f5c781..3695b21 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -126,14 +126,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
126 | 126 | ||
127 | protected string m_datastore; | 127 | protected string m_datastore; |
128 | 128 | ||
129 | private IAssetCache m_assetCache; | ||
130 | |||
131 | public IAssetCache AssetCache | ||
132 | { | ||
133 | get { return m_assetCache; } | ||
134 | set { m_assetCache = value; } | ||
135 | } | ||
136 | |||
137 | protected RegionStatus m_regStatus; | 129 | protected RegionStatus m_regStatus; |
138 | 130 | ||
139 | public RegionStatus Region_Status | 131 | public RegionStatus Region_Status |
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index fe37dae..00b49a1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs | |||
@@ -642,7 +642,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
642 | { | 642 | { |
643 | for (int i=0;i<arrassets.Length;i++) | 643 | for (int i=0;i<arrassets.Length;i++) |
644 | { | 644 | { |
645 | AssetBase ab = sn.AssetCache.GetAsset(arrassets[i], true); | 645 | AssetBase ab = sn.CommsManager.AssetCache.GetAsset(arrassets[i], true); |
646 | if (ab != null && ab.Data != null) | 646 | if (ab != null && ab.Data != null) |
647 | { | 647 | { |
648 | j2kdecode.syncdecode(arrassets[i], ab.Data); | 648 | j2kdecode.syncdecode(arrassets[i], ab.Data); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 4b165ce..1b7ae16 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2983,7 +2983,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2983 | { | 2983 | { |
2984 | if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero) | 2984 | if (part.Shape.SculptEntry && part.Shape.SculptTexture != UUID.Zero) |
2985 | { | 2985 | { |
2986 | m_scene.AssetCache.GetAsset(part.Shape.SculptTexture, part.SculptTextureCallback, true); | 2986 | m_scene.CommsManager.AssetCache.GetAsset( |
2987 | part.Shape.SculptTexture, part.SculptTextureCallback, true); | ||
2987 | } | 2988 | } |
2988 | } | 2989 | } |
2989 | } | 2990 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index dfa9318..ec3fdf1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1422,8 +1422,10 @@ if (m_shape != null) { | |||
1422 | { | 1422 | { |
1423 | if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero) | 1423 | if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero) |
1424 | { | 1424 | { |
1425 | m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true); | 1425 | m_parentGroup.Scene.CommsManager.AssetCache.GetAsset( |
1426 | dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true); | ||
1426 | } | 1427 | } |
1428 | |||
1427 | bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0); | 1429 | bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0); |
1428 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); | 1430 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); |
1429 | } | 1431 | } |
@@ -3232,8 +3234,8 @@ if (m_shape != null) { | |||
3232 | { | 3234 | { |
3233 | if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) | 3235 | if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) |
3234 | { | 3236 | { |
3235 | //AssetBase tx = m_parentGroup.Scene.getase | 3237 | m_parentGroup.Scene.CommsManager.AssetCache.GetAsset( |
3236 | m_parentGroup.Scene.AssetCache.GetAsset(m_shape.SculptTexture, SculptTextureCallback, true); | 3238 | m_shape.SculptTexture, SculptTextureCallback, true); |
3237 | } | 3239 | } |
3238 | } | 3240 | } |
3239 | 3241 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index c15ac47..c625a72 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -251,7 +251,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
251 | m_part.ScheduleFullUpdate(); | 251 | m_part.ScheduleFullUpdate(); |
252 | return; | 252 | return; |
253 | } | 253 | } |
254 | IAssetCache cache = m_part.ParentGroup.Scene.AssetCache; | 254 | IAssetCache cache = m_part.ParentGroup.Scene.CommsManager.AssetCache; |
255 | 255 | ||
256 | cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset) | 256 | cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset) |
257 | { | 257 | { |