mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
* Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it
This commit is contained in:
@@ -90,7 +90,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
// HGAssetService dispatches it to the remote grid.
|
||||
// It's not pretty, but the best that can be done while
|
||||
// not having a global naming infrastructure
|
||||
AssetBase asset1 = new AssetBase(asset.FullID, asset.Name, asset.Type);
|
||||
AssetBase asset1 = new AssetBase(asset.FullID, asset.Name, asset.Type, asset.Metadata.CreatorID);
|
||||
Copy(asset, asset1);
|
||||
try
|
||||
{
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
}
|
||||
|
||||
AssetBase asset =
|
||||
CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data);
|
||||
CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data, remoteClient.AgentId);
|
||||
item.AssetID = asset.FullID;
|
||||
m_Scene.AssetService.Store(asset);
|
||||
|
||||
@@ -339,7 +339,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
objectGroup.GetPartName(objectGroup.RootPart.LocalId),
|
||||
objectGroup.GetPartDescription(objectGroup.RootPart.LocalId),
|
||||
(sbyte)AssetType.Object,
|
||||
Utils.StringToBytes(sceneObjectXml));
|
||||
Utils.StringToBytes(sceneObjectXml),
|
||||
objectGroup.OwnerID);
|
||||
m_Scene.AssetService.Store(asset);
|
||||
assetID = asset.FullID;
|
||||
|
||||
@@ -640,9 +641,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||
/// <param name="assetType"></param>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
|
||||
private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data, UUID creatorID)
|
||||
{
|
||||
AssetBase asset = new AssetBase(UUID.Random(), name, assetType);
|
||||
AssetBase asset = new AssetBase(UUID.Random(), name, assetType, creatorID);
|
||||
asset.Description = description;
|
||||
asset.Data = (data == null) ? new byte[1] : data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user