diff options
author | BlueWall | 2011-04-13 17:03:30 -0400 |
---|---|---|
committer | BlueWall | 2011-04-13 17:03:30 -0400 |
commit | c0fcc430fe12184038f0d46f992d507885295834 (patch) | |
tree | dcc517adcc10049054a4fe2b02aac3182c78db49 /OpenSim | |
parent | remove packet monitoring debugging code (diff) | |
parent | Add ColladaMesh switch (diff) | |
download | opensim-SC_OLD-c0fcc430fe12184038f0d46f992d507885295834.zip opensim-SC_OLD-c0fcc430fe12184038f0d46f992d507885295834.tar.gz opensim-SC_OLD-c0fcc430fe12184038f0d46f992d507885295834.tar.bz2 opensim-SC_OLD-c0fcc430fe12184038f0d46f992d507885295834.tar.xz |
Merge branch 'master' of /home/git/repo/OpenSim into queuetest
Diffstat (limited to 'OpenSim')
5 files changed, 85 insertions, 32 deletions
diff --git a/OpenSim/Data/Null/NullEstateData.cs b/OpenSim/Data/Null/NullEstateData.cs index 0cebff5..8db8064 100755 --- a/OpenSim/Data/Null/NullEstateData.cs +++ b/OpenSim/Data/Null/NullEstateData.cs | |||
@@ -38,9 +38,9 @@ namespace OpenSim.Data.Null | |||
38 | { | 38 | { |
39 | public class NullEstateStore : IEstateDataStore | 39 | public class NullEstateStore : IEstateDataStore |
40 | { | 40 | { |
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 41 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 42 | ||
43 | private string m_connectionString; | 43 | // private string m_connectionString; |
44 | 44 | ||
45 | protected virtual Assembly Assembly | 45 | protected virtual Assembly Assembly |
46 | { | 46 | { |
@@ -58,7 +58,7 @@ namespace OpenSim.Data.Null | |||
58 | 58 | ||
59 | public void Initialise(string connectionString) | 59 | public void Initialise(string connectionString) |
60 | { | 60 | { |
61 | m_connectionString = connectionString; | 61 | // m_connectionString = connectionString; |
62 | } | 62 | } |
63 | 63 | ||
64 | private string[] FieldList | 64 | private string[] FieldList |
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs index 878242a..d2278bc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetMeshModule.cs | |||
@@ -54,6 +54,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
54 | 54 | ||
55 | private Scene m_scene; | 55 | private Scene m_scene; |
56 | private IAssetService m_assetService; | 56 | private IAssetService m_assetService; |
57 | private bool m_enabled = true; | ||
57 | 58 | ||
58 | #region IRegionModuleBase Members | 59 | #region IRegionModuleBase Members |
59 | 60 | ||
@@ -65,7 +66,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
65 | 66 | ||
66 | public void Initialise(IConfigSource source) | 67 | public void Initialise(IConfigSource source) |
67 | { | 68 | { |
68 | 69 | IConfig startupConfig = source.Configs["Startup"]; | |
70 | if (startupConfig == null) | ||
71 | return; | ||
72 | |||
73 | if (!startupConfig.GetBoolean("ColladaMesh",true)) | ||
74 | m_enabled = false; | ||
69 | } | 75 | } |
70 | 76 | ||
71 | public void AddRegion(Scene pScene) | 77 | public void AddRegion(Scene pScene) |
@@ -101,16 +107,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
101 | 107 | ||
102 | public void RegisterCaps(UUID agentID, Caps caps) | 108 | public void RegisterCaps(UUID agentID, Caps caps) |
103 | { | 109 | { |
110 | if(!m_enabled) | ||
111 | return; | ||
112 | |||
104 | UUID capID = UUID.Random(); | 113 | UUID capID = UUID.Random(); |
105 | 114 | ||
106 | // m_log.Info("[GETMESH]: /CAPS/" + capID); | 115 | // m_log.Info("[GETMESH]: /CAPS/" + capID); |
116 | |||
107 | caps.RegisterHandler("GetMesh", | 117 | caps.RegisterHandler("GetMesh", |
108 | new RestHTTPHandler("GET", "/CAPS/" + capID, | 118 | new RestHTTPHandler("GET", "/CAPS/" + capID, |
109 | delegate(Hashtable m_dhttpMethod) | 119 | delegate(Hashtable m_dhttpMethod) |
110 | { | 120 | { |
111 | return ProcessGetMesh(m_dhttpMethod, agentID, caps); | 121 | return ProcessGetMesh(m_dhttpMethod, agentID, caps); |
112 | })); | 122 | })); |
113 | |||
114 | } | 123 | } |
115 | 124 | ||
116 | #endregion | 125 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs index 4a42c93..fb07cc9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Assets/NewFileAgentInventoryVariablePriceModule.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
56 | private Scene m_scene; | 56 | private Scene m_scene; |
57 | // private IAssetService m_assetService; | 57 | // private IAssetService m_assetService; |
58 | private bool m_dumpAssetsToFile = false; | 58 | private bool m_dumpAssetsToFile = false; |
59 | private bool m_enabled = true; | ||
59 | 60 | ||
60 | #region IRegionModuleBase Members | 61 | #region IRegionModuleBase Members |
61 | 62 | ||
@@ -67,7 +68,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
67 | 68 | ||
68 | public void Initialise(IConfigSource source) | 69 | public void Initialise(IConfigSource source) |
69 | { | 70 | { |
70 | 71 | IConfig startupConfig = source.Configs["Startup"]; | |
72 | if (startupConfig == null) | ||
73 | return; | ||
74 | |||
75 | if (!startupConfig.GetBoolean("ColladaMesh",true)) | ||
76 | m_enabled = false; | ||
71 | } | 77 | } |
72 | 78 | ||
73 | public void AddRegion(Scene pScene) | 79 | public void AddRegion(Scene pScene) |
@@ -103,6 +109,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Assets | |||
103 | 109 | ||
104 | public void RegisterCaps(UUID agentID, Caps caps) | 110 | public void RegisterCaps(UUID agentID, Caps caps) |
105 | { | 111 | { |
112 | if(!m_enabled) | ||
113 | return; | ||
114 | |||
106 | UUID capID = UUID.Random(); | 115 | UUID capID = UUID.Random(); |
107 | 116 | ||
108 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); | 117 | // m_log.Debug("[NEW FILE AGENT INVENTORY VARIABLE PRICE]: /CAPS/" + capID); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 9fbfc34..73b0a35 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -552,8 +552,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
552 | /// <summary> | 552 | /// <summary> |
553 | /// Rez an object into the scene from the user's inventory | 553 | /// Rez an object into the scene from the user's inventory |
554 | /// </summary> | 554 | /// </summary> |
555 | /// <remarks> | ||
555 | /// FIXME: It would be really nice if inventory access modules didn't also actually do the work of rezzing | 556 | /// FIXME: It would be really nice if inventory access modules didn't also actually do the work of rezzing |
556 | /// things to the scene. The caller should be doing that, I think. | 557 | /// things to the scene. The caller should be doing that, I think. |
558 | /// </remarks> | ||
557 | /// <param name="remoteClient"></param> | 559 | /// <param name="remoteClient"></param> |
558 | /// <param name="itemID"></param> | 560 | /// <param name="itemID"></param> |
559 | /// <param name="RayEnd"></param> | 561 | /// <param name="RayEnd"></param> |
@@ -570,21 +572,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
570 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | 572 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, |
571 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) | 573 | bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) |
572 | { | 574 | { |
573 | // Work out position details | 575 | // m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID); |
574 | byte bRayEndIsIntersection = (byte)0; | 576 | |
575 | 577 | byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); | |
576 | if (RayEndIsIntersection) | ||
577 | { | ||
578 | bRayEndIsIntersection = (byte)1; | ||
579 | } | ||
580 | else | ||
581 | { | ||
582 | bRayEndIsIntersection = (byte)0; | ||
583 | } | ||
584 | |||
585 | Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); | 578 | Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); |
586 | |||
587 | |||
588 | Vector3 pos = m_Scene.GetNewRezLocation( | 579 | Vector3 pos = m_Scene.GetNewRezLocation( |
589 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, | 580 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, |
590 | BypassRayCast, bRayEndIsIntersection, true, scale, false); | 581 | BypassRayCast, bRayEndIsIntersection, true, scale, false); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 73dd531..0f85925 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1955,11 +1955,49 @@ namespace OpenSim.Region.Framework.Scenes | |||
1955 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, | 1955 | UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, |
1956 | bool RezSelected, bool RemoveItem, UUID fromTaskID) | 1956 | bool RezSelected, bool RemoveItem, UUID fromTaskID) |
1957 | { | 1957 | { |
1958 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); | 1958 | // m_log.DebugFormat( |
1959 | if (invAccess != null) | 1959 | // "[PRIM INVENTORY]: RezObject from {0} for item {1} from task id {2}", |
1960 | invAccess.RezObject( | 1960 | // remoteClient.Name, itemID, fromTaskID); |
1961 | remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, | 1961 | |
1962 | RezSelected, RemoveItem, fromTaskID, false); | 1962 | if (fromTaskID == UUID.Zero) |
1963 | { | ||
1964 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); | ||
1965 | if (invAccess != null) | ||
1966 | invAccess.RezObject( | ||
1967 | remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, | ||
1968 | RezSelected, RemoveItem, fromTaskID, false); | ||
1969 | } | ||
1970 | else | ||
1971 | { | ||
1972 | SceneObjectPart part = GetSceneObjectPart(fromTaskID); | ||
1973 | if (part == null) | ||
1974 | { | ||
1975 | m_log.ErrorFormat( | ||
1976 | "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such scene object", | ||
1977 | remoteClient.Name, itemID, fromTaskID); | ||
1978 | |||
1979 | return; | ||
1980 | } | ||
1981 | |||
1982 | TaskInventoryItem item = part.Inventory.GetInventoryItem(itemID); | ||
1983 | if (item == null) | ||
1984 | { | ||
1985 | m_log.ErrorFormat( | ||
1986 | "[TASK INVENTORY]: {0} tried to rez item id {1} from object id {2} but there is no such item", | ||
1987 | remoteClient.Name, itemID, fromTaskID); | ||
1988 | |||
1989 | return; | ||
1990 | } | ||
1991 | |||
1992 | byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); | ||
1993 | Vector3 scale = new Vector3(0.5f, 0.5f, 0.5f); | ||
1994 | Vector3 pos | ||
1995 | = GetNewRezLocation( | ||
1996 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, | ||
1997 | BypassRayCast, bRayEndIsIntersection, true, scale, false); | ||
1998 | |||
1999 | RezObject(part, item, pos, null, Vector3.Zero, 0); | ||
2000 | } | ||
1963 | } | 2001 | } |
1964 | 2002 | ||
1965 | /// <summary> | 2003 | /// <summary> |
@@ -1967,14 +2005,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1967 | /// </summary> | 2005 | /// </summary> |
1968 | /// <param name="sourcePart"></param> | 2006 | /// <param name="sourcePart"></param> |
1969 | /// <param name="item"></param> | 2007 | /// <param name="item"></param> |
1970 | /// <param name="pos"></param> | 2008 | /// <param name="pos">The position of the rezzed object.</param> |
1971 | /// <param name="rot"></param> | 2009 | /// <param name="rot">The rotation of the rezzed object. If null, then the rotation stored with the object |
1972 | /// <param name="vel"></param> | 2010 | /// will be used if it exists.</param> |
2011 | /// <param name="vel">The velocity of the rezzed object.</param> | ||
1973 | /// <param name="param"></param> | 2012 | /// <param name="param"></param> |
1974 | /// <returns>The SceneObjectGroup rezzed or null if rez was unsuccessful</returns> | 2013 | /// <returns>The SceneObjectGroup rezzed or null if rez was unsuccessful</returns> |
1975 | public virtual SceneObjectGroup RezObject( | 2014 | public virtual SceneObjectGroup RezObject( |
1976 | SceneObjectPart sourcePart, TaskInventoryItem item, | 2015 | SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion? rot, Vector3 vel, int param) |
1977 | Vector3 pos, Quaternion rot, Vector3 vel, int param) | ||
1978 | { | 2016 | { |
1979 | if (null == item) | 2017 | if (null == item) |
1980 | return null; | 2018 | return null; |
@@ -1992,8 +2030,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1992 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 2030 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
1993 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); | 2031 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); |
1994 | } | 2032 | } |
1995 | 2033 | ||
1996 | AddNewSceneObject(group, true, pos, rot, vel); | 2034 | AddNewSceneObject(group, true); |
2035 | |||
2036 | group.AbsolutePosition = pos; | ||
2037 | group.Velocity = vel; | ||
2038 | |||
2039 | if (rot != null) | ||
2040 | group.UpdateGroupRotationR((Quaternion)rot); | ||
1997 | 2041 | ||
1998 | // We can only call this after adding the scene object, since the scene object references the scene | 2042 | // We can only call this after adding the scene object, since the scene object references the scene |
1999 | // to find out if scripts should be activated at all. | 2043 | // to find out if scripts should be activated at all. |