Removed IScriptEngineToSceneConnectorModule interface.
Removed SendNewObject, SendDeleteObject, SendLinkObject, and SendDelinkObject that used Bucket Sync info.dsg
parent
ff5c86c90a
commit
7aaacbc4a6
|
@ -391,7 +391,6 @@ namespace OpenSim
|
|||
//Add one more command handler for "sync start", to pass simulator-wise information to one valide Scene.
|
||||
//A trick to enable Script Engine to run scripts in several adjacent regions (all objects and their scripts
|
||||
//exisited in the valid region, but all regions have their Scene data structure up and hold the RegionInfo.
|
||||
//More details, see ScriptEngineToSceneConnector.cs.
|
||||
m_console.Commands.AddCommand("region", false, "sync start",
|
||||
"sync start",
|
||||
"start synchronization with the authoratative Scene", SyncStart);
|
||||
|
|
|
@ -47,7 +47,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
OpenSim.cs
|
||||
RegionSyncServerModule.cs
|
||||
RegionSyncClientModule.cs
|
||||
ScriptEngineToSceneConnectorModule.cs
|
||||
*/
|
||||
m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
|
|
@ -341,148 +341,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
|||
}
|
||||
}
|
||||
|
||||
//Legacy SendNewObject and SendDeleteObject for Bucket based sync protocol
|
||||
|
||||
/// <summary>
|
||||
/// Send a sync message to add the given object to other sync nodes.
|
||||
/// </summary>
|
||||
/// <param name="sog"></param>
|
||||
public void SendNewObject(SceneObjectGroup sog)
|
||||
{
|
||||
if (!IsSyncingWithOtherSyncNodes())
|
||||
{
|
||||
//no SyncConnector connected. Do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
sog.BucketSyncInfoUpdate();
|
||||
|
||||
SymmetricSyncMessage rsm = NewObjectMessageEncoder(sog);
|
||||
|
||||
//SendObjectUpdateToRelevantSyncConnectors(sog, rsm);
|
||||
//SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, sog);
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(m_actorID, sog, rsm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send a sync message to remove the given objects in all connected actors.
|
||||
/// UUID is used for identified a removed object. This function now should
|
||||
/// only be triggered by an object removal that is initiated locally.
|
||||
/// </summary>
|
||||
/// <param name="sog"></param>
|
||||
//private void RegionSyncModule_OnObjectBeingRemovedFromScene(SceneObjectGroup sog)
|
||||
public void SendDeleteObject(SceneObjectGroup sog, bool softDelete)
|
||||
{
|
||||
if (!IsSyncingWithOtherSyncNodes())
|
||||
{
|
||||
//no SyncConnector connected. Do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
//m_log.DebugFormat(LogHeader+"SendDeleteObject called for object {0}", sog.UUID);
|
||||
|
||||
//Only send the message out if this is a relay node for sync messages, or this actor caused deleting the object
|
||||
//if (m_isSyncRelay || CheckObjectForSendingUpdate(sog))
|
||||
|
||||
|
||||
OSDMap data = new OSDMap();
|
||||
//data["regionHandle"] = OSD.FromULong(regionHandle);
|
||||
//data["localID"] = OSD.FromUInteger(sog.LocalId);
|
||||
data["UUID"] = OSD.FromUUID(sog.UUID);
|
||||
data["actorID"] = OSD.FromString(m_actorID);
|
||||
data["softDelete"] = OSD.FromBoolean(softDelete);
|
||||
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.RemovedObject, OSDParser.SerializeJsonString(data));
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(m_actorID, sog, rsm);
|
||||
//SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, sog);
|
||||
}
|
||||
|
||||
|
||||
public void SendLinkObject(SceneObjectGroup linkedGroup, SceneObjectPart root, List<SceneObjectPart> children)
|
||||
{
|
||||
if (children.Count == 0) return;
|
||||
|
||||
if (!IsSyncingWithOtherSyncNodes())
|
||||
{
|
||||
//no SyncConnector connected. Do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
//First, make sure the linked group has updated timestamp info for synchronization
|
||||
linkedGroup.BucketSyncInfoUpdate();
|
||||
|
||||
OSDMap data = new OSDMap();
|
||||
string sogxml = SceneObjectSerializer.ToXml2Format(linkedGroup);
|
||||
data["linkedGroup"] = OSD.FromString(sogxml);
|
||||
data["rootID"] = OSD.FromUUID(root.UUID);
|
||||
data["partCount"] = OSD.FromInteger(children.Count);
|
||||
data["actorID"] = OSD.FromString(m_actorID);
|
||||
int partNum = 0;
|
||||
foreach (SceneObjectPart part in children)
|
||||
{
|
||||
string partTempID = "part" + partNum;
|
||||
data[partTempID] = OSD.FromUUID(part.UUID);
|
||||
partNum++;
|
||||
|
||||
//m_log.DebugFormat("{0}: SendLinkObject to link {1},{2} with {3}, {4}", part.Name, part.UUID, root.Name, root.UUID);
|
||||
}
|
||||
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.LinkObject, OSDParser.SerializeJsonString(data));
|
||||
SendSpecialObjectUpdateToRelevantSyncConnectors(m_actorID, linkedGroup, rsm);
|
||||
//SendSceneEventToRelevantSyncConnectors(m_actorID, rsm, linkedGroup);
|
||||
}
|
||||
|
||||
public void SendDeLinkObject(List<SceneObjectPart> prims, List<SceneObjectGroup> beforeDelinkGroups, List<SceneObjectGroup> afterDelinkGroups)
|
||||
{
|
||||
if (prims.Count==0 || beforeDelinkGroups.Count==0) return;
|
||||
|
||||
if (!IsSyncingWithOtherSyncNodes())
|
||||
{
|
||||
//no SyncConnector connected. Do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
OSDMap data = new OSDMap();
|
||||
data["partCount"] = OSD.FromInteger(prims.Count);
|
||||
int partNum = 0;
|
||||
foreach (SceneObjectPart part in prims)
|
||||
{
|
||||
string partTempID = "part" + partNum;
|
||||
data[partTempID] = OSD.FromUUID(part.UUID);
|
||||
partNum++;
|
||||
}
|
||||
//We also include the IDs of beforeDelinkGroups, for now it is more for sanity checking at the receiving end, so that the receiver
|
||||
//could make sure its delink starts with the same linking state of the groups/prims.
|
||||
data["beforeGroupsCount"] = OSD.FromInteger(beforeDelinkGroups.Count);
|
||||
int groupNum = 0;
|
||||
foreach (SceneObjectGroup affectedGroup in beforeDelinkGroups)
|
||||
{
|
||||
string groupTempID = "beforeGroup" + groupNum;
|
||||
data[groupTempID] = OSD.FromUUID(affectedGroup.UUID);
|
||||
groupNum++;
|
||||
}
|
||||
|
||||
//include the property values of each object after delinking, for synchronizing the values
|
||||
data["afterGroupsCount"] = OSD.FromInteger(afterDelinkGroups.Count);
|
||||
groupNum = 0;
|
||||
foreach (SceneObjectGroup afterGroup in afterDelinkGroups)
|
||||
{
|
||||
string groupTempID = "afterGroup" + groupNum;
|
||||
string sogxml = SceneObjectSerializer.ToXml2Format(afterGroup);
|
||||
data[groupTempID] = OSD.FromString(sogxml);
|
||||
groupNum++;
|
||||
}
|
||||
|
||||
//make sure the newly delinked objects have the updated timestamp information
|
||||
foreach (SceneObjectGroup sog in afterDelinkGroups)
|
||||
{
|
||||
sog.BucketSyncInfoUpdate();
|
||||
}
|
||||
|
||||
SymmetricSyncMessage rsm = new SymmetricSyncMessage(SymmetricSyncMessage.MsgType.DelinkObject, OSDParser.SerializeJsonString(data));
|
||||
SendDelinkObjectToRelevantSyncConnectors(m_actorID, beforeDelinkGroups, rsm);
|
||||
}
|
||||
|
||||
public void PublishSceneEvent(EventManager.EventNames ev, Object[] evArgs)
|
||||
{
|
||||
if (!IsSyncingWithOtherSyncNodes())
|
||||
|
|
|
@ -78,10 +78,10 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
//Legacy calls in Bucket sync'ing
|
||||
//The folloiwng calls deal with object updates, and will insert each update into an outgoing queue of each SyncConnector
|
||||
//void SendSceneUpdates();
|
||||
void SendNewObject(SceneObjectGroup sog);
|
||||
void SendDeleteObject(SceneObjectGroup sog, bool softDelete);
|
||||
void SendLinkObject(SceneObjectGroup linkedGroup, SceneObjectPart root, List<SceneObjectPart> children);
|
||||
void SendDeLinkObject(List<SceneObjectPart> prims, List<SceneObjectGroup> beforeDelinkGroups, List<SceneObjectGroup> afterDelinkGroups);
|
||||
//void SendNewObject(SceneObjectGroup sog);
|
||||
//void SendDeleteObject(SceneObjectGroup sog, bool softDelete);
|
||||
//void SendLinkObject(SceneObjectGroup linkedGroup, SceneObjectPart root, List<SceneObjectPart> children);
|
||||
//void SendDeLinkObject(List<SceneObjectPart> prims, List<SceneObjectGroup> beforeDelinkGroups, List<SceneObjectGroup> afterDelinkGroups);
|
||||
|
||||
//New functions for per property sync'ing
|
||||
void SyncNewObject(SceneObjectGroup sog);
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSim Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
//KittyL: Added to support running script engine actor
|
||||
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.Framework.Interfaces
|
||||
{
|
||||
//the interface for Scene to sync with Script Engine
|
||||
public interface IScriptEngineToSceneConnectorModule
|
||||
{
|
||||
bool Active { get; }
|
||||
bool Synced { get; }
|
||||
bool DebugWithViewer { get; }
|
||||
//void SendCoarseLocations();
|
||||
/// <summary>
|
||||
/// Update the property of prim with primID, where the prim is located at quark (LocX, LocY). The length of each quark is configurable.
|
||||
/// </summary>
|
||||
/// <param name="locX"></param>
|
||||
/// <param name="locY"></param>
|
||||
/// <param name="primID"></param>
|
||||
/// <param name="pName"></param>
|
||||
/// <param name="pValue"></param>
|
||||
void SendSetPrimProperties(uint locX, uint locY, UUID primID, string pName, object pValue);
|
||||
}
|
||||
}
|
|
@ -327,7 +327,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//Scene does permission checking, asset creation and storing, then informs Script Engine to
|
||||
//update the script.
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//Only should be called when this is the cached Scene of script engine (e.g. from ScriptEngineToSceneConnector)
|
||||
//Only should be called when this is the cached Scene of script engine
|
||||
public ArrayList OnUpdateScript(UUID avatarID, UUID itemID, UUID primID, bool isScriptRunning, UUID newAssetID)
|
||||
{
|
||||
ArrayList errors = new ArrayList();
|
||||
|
|
|
@ -483,23 +483,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
set { m_regionSyncMode = value; }
|
||||
}
|
||||
|
||||
|
||||
protected IScriptEngineToSceneConnectorModule m_scriptEngineToSceneConnectorModule;
|
||||
public IScriptEngineToSceneConnectorModule ScriptEngineToSceneConnectorModule
|
||||
{
|
||||
get { return m_scriptEngineToSceneConnectorModule; }
|
||||
set { m_scriptEngineToSceneConnectorModule = value; }
|
||||
}
|
||||
|
||||
public bool IsSyncedScriptEngine()
|
||||
{
|
||||
return (m_scriptEngineToSceneConnectorModule != null && m_scriptEngineToSceneConnectorModule.Active && m_scriptEngineToSceneConnectorModule.Synced);
|
||||
}
|
||||
|
||||
public bool ToScheduleFullUpdate()
|
||||
{
|
||||
//Only Scene (SyncServer) or Client Manager (SyncClient) will schedule update to send to its client. Script Engine will not (its update should be sent to Scene).
|
||||
return (IsSyncedClient() || IsSyncedServer() || (IsSyncedScriptEngine() && m_scriptEngineToSceneConnectorModule.DebugWithViewer));
|
||||
return (IsSyncedClient() || IsSyncedServer());
|
||||
}
|
||||
|
||||
|
||||
|
@ -1591,7 +1578,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
//REGION SYNC
|
||||
RegionSyncServerModule = RequestModuleInterface<IRegionSyncServerModule>();
|
||||
RegionSyncClientModule = RequestModuleInterface<IRegionSyncClientModule>();
|
||||
ScriptEngineToSceneConnectorModule = RequestModuleInterface<IScriptEngineToSceneConnectorModule>();
|
||||
//ScriptEngineToSceneConnectorModule = RequestModuleInterface<IScriptEngineToSceneConnectorModule>();
|
||||
PhysEngineToSceneConnectorModule = RequestModuleInterface<IPhysEngineToSceneConnectorModule>();
|
||||
SceneToPhysEngineSyncServer = RequestModuleInterface<ISceneToPhysEngineServer>();
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -3705,7 +3705,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
//Send out DelinkObject message to other actors to sychronize their object list
|
||||
if (World.RegionSyncModule != null)
|
||||
{
|
||||
World.RegionSyncModule.SendDeLinkObject(parts, beforeDelinkGroups, afterDelinkGroups);
|
||||
World.RegionSyncModule.SyncDeLinkObject(parts, beforeDelinkGroups, afterDelinkGroups);
|
||||
}
|
||||
parentPrim.ScheduleGroupForFullUpdate(new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.None});
|
||||
//end of DSG SYNC
|
||||
|
@ -3749,7 +3749,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
beforeDelinkGroups.Add(parentPrim);
|
||||
List<SceneObjectGroup> afterDelinkGroups = new List<SceneObjectGroup>();
|
||||
afterDelinkGroups.Add(childPrim.ParentGroup);
|
||||
World.RegionSyncModule.SendDeLinkObject(new List<SceneObjectPart>(parentPrim.Parts), beforeDelinkGroups, afterDelinkGroups);
|
||||
World.RegionSyncModule.SyncDeLinkObject(new List<SceneObjectPart>(parentPrim.Parts), beforeDelinkGroups, afterDelinkGroups);
|
||||
}
|
||||
//end of DSG SYNC
|
||||
|
||||
|
@ -3788,7 +3788,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
parts.Add(rootPart);
|
||||
afterDelinkGroups.Add(rootPart.ParentGroup);
|
||||
World.RegionSyncModule.SendDeLinkObject(parts, beforeDelinkGroups, afterDelinkGroups);
|
||||
World.RegionSyncModule.SyncDeLinkObject(parts, beforeDelinkGroups, afterDelinkGroups);
|
||||
}
|
||||
parentPrim.ScheduleGroupForFullUpdate(new List<SceneObjectPartSyncProperties>(){SceneObjectPartSyncProperties.None});
|
||||
//end of DSG SYNC
|
||||
|
|
Loading…
Reference in New Issue