Mesh upload: request inventory fetching of the newly created item
This commit is contained in:
committed by
Justin Clark-Casey
parent
1b4cfd959d
commit
941dc830ca
@@ -603,12 +603,15 @@ namespace OpenMetaverse.ImportExport
|
||||
|
||||
ModelFace face = new ModelFace();
|
||||
face.MaterialID = list.material;
|
||||
if (MatSymTarget.ContainsKey(list.material))
|
||||
if (face.MaterialID != null)
|
||||
{
|
||||
ModelMaterial mat = Materials.Find(m => m.ID == MatSymTarget[list.material]);
|
||||
if (mat != null)
|
||||
if (MatSymTarget.ContainsKey(list.material))
|
||||
{
|
||||
face.Material = mat;
|
||||
ModelMaterial mat = Materials.Find(m => m.ID == MatSymTarget[list.material]);
|
||||
if (mat != null)
|
||||
{
|
||||
face.Material = mat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,19 @@ namespace OpenMetaverse.ImportExport
|
||||
{
|
||||
var res = (OSDMap)result;
|
||||
Uri uploader = new Uri(res["uploader"]);
|
||||
PerformUpload(uploader, callback);
|
||||
PerformUpload(uploader, (contents =>
|
||||
{
|
||||
if (contents != null)
|
||||
{
|
||||
var reply = (OSDMap)contents;
|
||||
if (reply.ContainsKey("new_inventory_item") && reply.ContainsKey("new_asset"))
|
||||
{
|
||||
// Request full update on the item in order to update the local store
|
||||
Client.Inventory.RequestFetchInventory(reply["new_inventory_item"].AsUUID(), Client.Self.AgentID);
|
||||
}
|
||||
}
|
||||
if (callback != null) callback(contents);
|
||||
}));
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user