Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

This commit is contained in:
Diva Canto
2013-06-12 17:48:48 -07:00
15 changed files with 229 additions and 124 deletions

View File

@@ -42,7 +42,7 @@ using OpenSim.Tests.Common;
namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
{
[TestFixture]
public class AssetConnectorsTests : OpenSimTestCase
public class AssetConnectorTests : OpenSimTestCase
{
[Test]
public void TestAddAsset()
@@ -77,7 +77,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
// TODO: Add cache and check that this does receive a copy of the asset
}
[Test]
public void TestAddTemporaryAsset()
{
TestHelpers.InMethod();
@@ -93,34 +92,23 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
lasc.Initialise(config);
// If it is local, it should not be stored
AssetBase a1 = AssetHelpers.CreateNotecardAsset();
a1.Local = true;
a1.Temporary = true;
lasc.Store(a1);
Assert.That(lasc.Get(a1.ID), Is.Null);
Assert.That(lasc.GetData(a1.ID), Is.Null);
Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
// If it is remote, it should be stored
// AssetBase a2 = AssetHelpers.CreateNotecardAsset();
// a2.Local = false;
// a2.Temporary = true;
AssetBase a2 = AssetHelpers.CreateNotecardAsset();
a2.Local = false;
a2.Temporary = true;
// lasc.Store(a2);
lasc.Store(a2);
// AssetBase retreivedA2 = lasc.Get(a2.ID);
// Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
// Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
// Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
AssetBase retreivedA2 = lasc.Get(a2.ID);
Assert.That(retreivedA2.ID, Is.EqualTo(a2.ID));
Assert.That(retreivedA2.Metadata.ID, Is.EqualTo(a2.Metadata.ID));
Assert.That(retreivedA2.Data.Length, Is.EqualTo(a2.Data.Length));
// AssetMetadata retrievedA2Metadata = lasc.GetMetadata(a2.ID);
// Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
AssetMetadata retrievedA2Metadata = lasc.GetMetadata(a2.ID);
Assert.That(retrievedA2Metadata.ID, Is.EqualTo(a2.ID));
// byte[] retrievedA2Data = lasc.GetData(a2.ID);
// Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
byte[] retrievedA2Data = lasc.GetData(a2.ID);
Assert.That(retrievedA2Data.Length, Is.EqualTo(a2.Data.Length));
// TODO: Add cache and check that this does receive a copy of the asset
}
@@ -152,5 +140,35 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset.Tests
// TODO: Add cache and check that this does receive a copy of the asset
}
[Test]
public void TestAddTemporaryLocalAsset()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
IConfigSource config = new IniConfigSource();
config.AddConfig("Modules");
config.Configs["Modules"].Set("AssetServices", "LocalAssetServicesConnector");
config.AddConfig("AssetService");
config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Services.AssetService.dll:AssetService");
config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll");
LocalAssetServicesConnector lasc = new LocalAssetServicesConnector();
lasc.Initialise(config);
// If it is local, it should not be stored
AssetBase a1 = AssetHelpers.CreateNotecardAsset();
a1.Local = true;
a1.Temporary = true;
lasc.Store(a1);
Assert.That(lasc.Get(a1.ID), Is.Null);
Assert.That(lasc.GetData(a1.ID), Is.Null);
Assert.That(lasc.GetMetadata(a1.ID), Is.Null);
// TODO: Add cache and check that this does receive a copy of the asset
}
}
}

View File

@@ -312,18 +312,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
buff.Append("dflt=");
buff.Append(DefaultAnimation.ToString());
buff.Append(",iDflt=");
if (DefaultAnimation == ImplicitDefaultAnimation)
if (DefaultAnimation.Equals(ImplicitDefaultAnimation))
buff.Append("same");
else
buff.Append(ImplicitDefaultAnimation.ToString());
if (m_animations.Count > 0)
{
buff.Append(",anims=");
bool firstTime = true;
foreach (OpenSim.Framework.Animation anim in m_animations)
{
if (!firstTime)
buff.Append(",");
buff.Append("<");
buff.Append(anim.ToString());
buff.Append(">,");
buff.Append(">");
firstTime = false;
}
}
return buff.ToString();

View File

@@ -94,6 +94,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
{
SendAnimPack();
m_scenePresence.TriggerScenePresenceUpdated();
}
}
@@ -135,6 +136,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (m_animations.Remove(animID, allowNoDefault))
{
SendAnimPack();
m_scenePresence.TriggerScenePresenceUpdated();
}
}

View File

@@ -763,6 +763,11 @@ namespace OpenSim.Region.Framework.Scenes
for (int i = 0; i < parts.Length; i++)
{
SceneObjectPart part = parts[i];
if (part.KeyframeMotion != null)
{
part.KeyframeMotion.UpdateSceneObject(this);
}
if (Object.ReferenceEquals(part, m_rootPart))
continue;

View File

@@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
// }
private void TriggerScenePresenceUpdated()
public void TriggerScenePresenceUpdated()
{
if (m_scene != null)
m_scene.EventManager.TriggerScenePresenceUpdated(this);

View File

@@ -168,10 +168,10 @@ public abstract class BSShape
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Fetched)
{
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. {1}, texture={2}",
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,objNam={1},tex={2}",
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
physicsScene.Logger.WarnFormat("{0} Fetched asset would not mesh. prim={1}, texture={2}",
LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,setFailed,prim={1},tex={2}",
prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
}
else
{
@@ -238,17 +238,17 @@ public abstract class BSShape
{
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedAssetFetch)
{
physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. obj={1}, texture={2}",
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,objNam={1},tex={2}",
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
physicsScene.Logger.WarnFormat("{0} Mesh failed to fetch asset. prim={1}, texture={2}",
LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailed,prim={1},tex={2}",
prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
}
if (prim.PrimAssetState == BSPhysObject.PrimAssetCondition.FailedMeshing)
{
physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. obj={1}, texture={2}",
LogHeader, prim.PhysObjectName, prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,objNam={1},tex={2}",
prim.LocalID, prim.PhysObjectName, prim.BaseShape.SculptTexture);
physicsScene.Logger.WarnFormat("{0} Mesh asset would not mesh. prim={1}, texture={2}",
LogHeader, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
physicsScene.DetailLog("{0},BSShape.VerifyMeshCreated,wasFailedMeshing,prim={1},tex={2}",
prim.LocalID, UsefulPrimInfo(physicsScene, prim), prim.BaseShape.SculptTexture);
}
}
}
@@ -260,6 +260,19 @@ public abstract class BSShape
return fillShape.physShapeInfo;
}
public static String UsefulPrimInfo(BSScene pScene, BSPhysObject prim)
{
StringBuilder buff = new StringBuilder(prim.PhysObjectName);
buff.Append("/pos=");
buff.Append(prim.RawPosition.ToString());
if (pScene != null)
{
buff.Append("/rgn=");
buff.Append(pScene.Name);
}
return buff.ToString();
}
#endregion // Common shape routines
}
@@ -528,8 +541,7 @@ public class BSShapeMesh : BSShape
{
// Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
prim.PrimAssetState = BSPhysObject.PrimAssetCondition.FailedMeshing;
physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim={1}", LogHeader, UsefulPrimInfo(physicsScene, prim) );
physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
}
}

View File

@@ -1,5 +1,9 @@
CURRENT PROBLEMS TO FIX AND/OR LOOK AT
=================================================
Vehicle buoyancy. Computed correctly? Possibly creating very large effective mass.
Interaction of llSetBuoyancy and vehicle buoyancy. Should be additive?
Negative buoyancy computed correctly
Computation of mesh mass. How done? How should it be done?
Script changing rotation of child prim while vehicle moving (eg turning wheel) causes
the wheel to appear to jump back. Looks like sending position from previous update.
Enable vehicle border crossings (at least as poorly as ODE)