Added Scene.ConvertLocalIDToFullID() method.

afrisby
MW 2007-08-13 20:24:37 +00:00
parent b3c6920328
commit 45fcbaae1b
4 changed files with 47 additions and 1 deletions

View File

@ -1023,5 +1023,23 @@ namespace OpenSim.Region.Environment.Scenes
ScriptEngine.InitializeEngine(this); ScriptEngine.InitializeEngine(this);
} }
#endregion #endregion
public LLUUID ConvertLocalIDToFullID(uint localID)
{
bool hasPrim = false;
foreach (EntityBase ent in Entities.Values)
{
if (ent is SceneObjectGroup)
{
hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
if (hasPrim != false)
{
return ((SceneObjectGroup)ent).GetPartsFullID(localID);
}
}
}
return null;
}
} }
} }

View File

@ -825,5 +825,15 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
} }
public LLUUID GetPartsFullID(uint localID)
{
SceneObjectPart part = this.GetChildPrim(localID);
if (part != null)
{
return part.UUID;
}
return null;
}
} }
} }

View File

@ -300,7 +300,11 @@ namespace OpenSim.Region.Environment.Scenes
dupe.Acceleration = new LLVector3(0, 0, 0); dupe.Acceleration = new LLVector3(0, 0, 0);
dupe.AngularVelocity = new LLVector3(0, 0, 0); dupe.AngularVelocity = new LLVector3(0, 0, 0);
dupe.ObjectFlags = this.ObjectFlags; dupe.ObjectFlags = this.ObjectFlags;
//TODO copy extraparams data and anything else not currently copied
byte[] extraP = new byte[this.Shape.ExtraParams.Length];
Array.Copy(this.Shape.ExtraParams, extraP, extraP.Length);
dupe.Shape.ExtraParams = extraP;
return dupe; return dupe;
} }
#endregion #endregion

View File

@ -6,4 +6,18 @@
<Key Name="inventoryType" Value="7" /> <Key Name="inventoryType" Value="7" />
<Key Name="fileName" Value="welcomeNote.dat" /> <Key Name="fileName" Value="welcomeNote.dat" />
</Section> </Section>
<Section Name="texture1">
<Key Name="assetID" Value="00000000-0000-2222-3333-000000000099" />
<Key Name="name" Value="femface" />
<Key Name="assetType" Value="0" />
<Key Name="inventoryType" Value="0" />
<Key Name="fileName" Value="femaleface.jp2" />
</Section>
<Section Name="test Object1">
<Key Name="assetID" Value="00000000-0000-8877-5566-000000000001" />
<Key Name="name" Value="test Object" />
<Key Name="assetType" Value="6" />
<Key Name="inventoryType" Value="6" />
<Key Name="fileName" Value="testObject.dat" />
</Section>
</Nini> </Nini>