a few changes to deattach object update
parent
d31854ee3c
commit
191b0888a2
|
@ -997,18 +997,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
(uint)PermissionMask.Export |
|
(uint)PermissionMask.Export |
|
||||||
(uint)PermissionMask.FoldedMask); // Preserve folded permissions ??
|
(uint)PermissionMask.FoldedMask); // Preserve folded permissions ??
|
||||||
|
|
||||||
|
string name = grp.RootPart.Name;
|
||||||
|
string desc = grp.RootPart.Description;
|
||||||
|
|
||||||
AssetBase asset = m_scene.CreateAsset(
|
AssetBase asset = m_scene.CreateAsset(
|
||||||
grp.GetPartName(grp.LocalId),
|
name, desc,
|
||||||
grp.GetPartDescription(grp.LocalId),
|
|
||||||
(sbyte)AssetType.Object,
|
(sbyte)AssetType.Object,
|
||||||
Utils.StringToBytes(sceneObjectXml),
|
Utils.StringToBytes(sceneObjectXml),
|
||||||
sp.UUID);
|
sp.UUID);
|
||||||
|
|
||||||
|
item.Name = name;
|
||||||
|
item.Description = desc;
|
||||||
|
item.AssetID = asset.FullID;
|
||||||
|
item.AssetType = (int)AssetType.Object;
|
||||||
|
item.InvType = (int)InventoryType.Object;
|
||||||
|
|
||||||
if (m_invAccessModule != null)
|
if (m_invAccessModule != null)
|
||||||
m_invAccessModule.UpdateInventoryItemAsset(sp.UUID, item, asset);
|
m_invAccessModule.UpdateInventoryItemAsset(sp.UUID, item, asset);
|
||||||
|
|
||||||
// If the name of the object has been changed whilst attached then we want to update the inventory
|
|
||||||
// item in the viewer.
|
|
||||||
if (sp.ControllingClient != null)
|
if (sp.ControllingClient != null)
|
||||||
sp.ControllingClient.SendInventoryItemCreateUpdate(item, 0);
|
sp.ControllingClient.SendInventoryItemCreateUpdate(item, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,11 +333,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
|
// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
|
||||||
// item.Name, item.ID, asset.ID);
|
// item.Name, item.ID, asset.ID);
|
||||||
|
|
||||||
item.AssetID = asset.FullID;
|
|
||||||
item.Description = asset.Description;
|
|
||||||
item.Name = asset.Name;
|
|
||||||
item.AssetType = asset.Type;
|
|
||||||
item.InvType = (int)InventoryType.Object;
|
|
||||||
|
|
||||||
m_Scene.AssetService.Store(asset);
|
m_Scene.AssetService.Store(asset);
|
||||||
m_Scene.InventoryService.UpdateItem(item);
|
m_Scene.InventoryService.UpdateItem(item);
|
||||||
|
|
Loading…
Reference in New Issue