mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
[possible still bad] make use of keyframemotion.copy on sop.copy, replacing
fromdata(seralize). for now its called with null group since sop.copy() hasn't usable new group information, so for copied keyframes be fully operational UpdateSceneObject(newgroup) needs to be called on them.
This commit is contained in:
@@ -2062,6 +2062,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
HasGroupChangedDueToDelink = false;
|
||||
|
||||
m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this);
|
||||
/*
|
||||
backup_group.ForEachPart(delegate(SceneObjectPart part)
|
||||
{
|
||||
if (part.KeyframeMotion != null)
|
||||
@@ -2070,7 +2071,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// part.KeyframeMotion.UpdateSceneObject(this);
|
||||
}
|
||||
});
|
||||
|
||||
*/
|
||||
datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID);
|
||||
|
||||
backup_group.ForEachPart(delegate(SceneObjectPart part)
|
||||
@@ -4415,15 +4416,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public virtual ISceneObject CloneForNewScene()
|
||||
{
|
||||
SceneObjectGroup sog = Copy(false);
|
||||
sog.ForEachPart(delegate(SceneObjectPart part)
|
||||
{
|
||||
if (part.KeyframeMotion != null)
|
||||
{
|
||||
part.KeyframeMotion = KeyframeMotion.FromData(sog, part.KeyframeMotion.Serialize());
|
||||
// this is called later
|
||||
// part.KeyframeMotion.UpdateSceneObject(this);
|
||||
}
|
||||
});
|
||||
sog.IsDeleted = false;
|
||||
return sog;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user