mirror of https://github.com/opensim/opensim.git
a few changes to materials
This commit is contained in:
parent
1d27845e2a
commit
7547909256
|
@ -5497,30 +5497,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
{
|
||||
if(sop.Shape.RenderMaterials is null)
|
||||
continue;
|
||||
OSDMap data = new(3)
|
||||
{
|
||||
["id"] = (int)sop.LocalId
|
||||
};
|
||||
OSDArray sides = new();
|
||||
OSDArray sidesdata = new();
|
||||
if( sop.Shape.RenderMaterials.overrides is not null &&
|
||||
|
||||
string inner;
|
||||
if (sop.Shape.RenderMaterials.overrides is not null &&
|
||||
sop.Shape.RenderMaterials.overrides.Length > 0)
|
||||
{
|
||||
OSDMap data = new(3)
|
||||
{
|
||||
["id"] = (int)sop.LocalId
|
||||
};
|
||||
OSDArray sides = new();
|
||||
OSDArray sidesdata = new();
|
||||
|
||||
foreach (Primitive.RenderMaterials.RenderMaterialOverrideEntry ovr in sop.Shape.RenderMaterials.overrides)
|
||||
{
|
||||
sides.Add(ovr.te_index);
|
||||
sidesdata.Add(string.IsNullOrEmpty(ovr.data) ? new OSD() : new OSDllsdxml(ovr.data));
|
||||
}
|
||||
}
|
||||
data["te"] = sides;
|
||||
data["od"] = sidesdata;
|
||||
|
||||
string inner = OSDParser.SerializeLLSDNotation(data);
|
||||
if (inner.Length < 4)
|
||||
continue;
|
||||
data["te"] = sides;
|
||||
data["od"] = sidesdata;
|
||||
|
||||
inner = OSDParser.SerializeLLSDNotation(data);
|
||||
if (inner.Length < 4)
|
||||
continue;
|
||||
}
|
||||
else
|
||||
inner = $"{{'id':i{sop.LocalId},'od':[],'te':[]}}";
|
||||
|
||||
byte[] innerB = Util.UTF8NBGetbytes(inner);
|
||||
if (innerB.Length > 4096 - 32)
|
||||
if (innerB.Length > 4096 - 16)
|
||||
{
|
||||
m_log.Debug($"[LLCLIENTVIEW]: GenericStreamingMessage packet too large ({innerB.Length})");
|
||||
continue;
|
||||
|
|
|
@ -217,7 +217,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
new UUID("9f496bd2-589a-709f-16cc-69bf7df1d36c"),
|
||||
new UUID("15dd911d-be82-2856-26db-27659b142875"),
|
||||
new UUID("b8c8b2a3-9008-1771-3bfc-90924955ab2d"),
|
||||
new UUID("42ecd00b-9947-a97c-400a-bbc9174c7aeb")
|
||||
new UUID("42ecd00b-9947-a97c-400a-bbc9174c7aeb"),
|
||||
new UUID("ffffffff-ffff-ffff-ffff-ffffffffffff"),
|
||||
Constants.DefaultMaterialID
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
<Key Name="file" Value="LandmarksAssetSet/LandmarksAssetSet.xml"/>
|
||||
</Section>
|
||||
|
||||
<Section Name="Materials AssetSet">
|
||||
<Key Name="file" Value="MaterialsAssetSet/MaterialsAssetSet.xml"/>
|
||||
</Section>
|
||||
|
||||
<Section Name="Notecards AssetSet">
|
||||
<Key Name="file" Value="NotecardsAssetSet/NotecardsAssetSet.xml"/>
|
||||
</Section>
|
||||
|
|
Loading…
Reference in New Issue