public string GetSerializedAttachmentPrims(Simulator sim, uint localID) { List <Primitive> prims = sim.ObjectsPrimitives.FindAll( delegate(Primitive prim) { return(prim.LocalID == localID || prim.ParentID == localID); } ); RequestObjectProperties(prims, 500); int i = prims.FindIndex( delegate(Primitive prim) { return(prim.LocalID == localID); } ); if (i >= 0) { prims[i].ParentID = 0; } return(OSDParser.SerializeLLSDXmlString(ClientHelpers.PrimListToOSD(prims))); }
public string GetSerializedPrims(Simulator sim, uint localID) { Primitive p; sim.ObjectsPrimitives.TryGetValue(localID, out p); if (p == null) { return(""); } uint rootPrim = p.ParentID == 0 ? p.LocalID : p.ParentID; List <Primitive> prims = sim.ObjectsPrimitives.FindAll( prim => (prim.LocalID == rootPrim || prim.ParentID == rootPrim) ); RequestObjectProperties(prims, 500); return(OSDParser.SerializeLLSDXmlString(ClientHelpers.PrimListToOSD(prims))); }
public bool CreateObjectFromXml(string xml) { List <Primitive> prims = ClientHelpers.OSDToPrimList(OSDParser.DeserializeLLSDXml(xml)); return(CreateObject(prims)); }