mirror of
https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git
synced 2024-11-21 14:29:10 -07:00
fix materials simulator features
This commit is contained in:
parent
ca69544ae9
commit
92bf9224de
3 changed files with 34 additions and 29 deletions
|
@ -61,9 +61,6 @@ namespace OpenSim.Framework
|
|||
|
||||
public const int MaxTextureResolution = 1024;
|
||||
|
||||
public const int RenderMaterialsCapability = 4;
|
||||
|
||||
|
||||
public static readonly string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; //plywood
|
||||
public static readonly UUID DefaultTextureID = new UUID(DefaultTexture);
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
|
||||
private bool m_ExportSupported = false;
|
||||
|
||||
private bool m_doScriptSyntax;
|
||||
private bool m_doScriptSyntax = true;
|
||||
|
||||
static private readonly object m_scriptSyntaxLock = new();
|
||||
static private UUID m_scriptSyntaxID = UUID.Zero;
|
||||
|
@ -84,7 +84,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
IConfig config = source.Configs["SimulatorFeatures"];
|
||||
m_doScriptSyntax = true;
|
||||
if (config != null)
|
||||
{
|
||||
m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported);
|
||||
|
@ -134,39 +133,48 @@ namespace OpenSim.Region.ClientStack.Linden
|
|||
{
|
||||
lock (m_features)
|
||||
{
|
||||
m_features["MeshRezEnabled"] = true;
|
||||
m_features["MeshUploadEnabled"] = true;
|
||||
m_features["MeshXferEnabled"] = true;
|
||||
m_features["AnimatedObjects"] = new OSDMap()
|
||||
{
|
||||
["AnimatedObjectMaxTris"] = OSD.FromInteger(150000),
|
||||
["MaxAgentAnimatedObjectAttachments"] = OSD.FromInteger(2)
|
||||
};
|
||||
|
||||
m_features["BakesOnMeshEnabled"] = true;
|
||||
|
||||
m_features["PhysicsMaterialsEnabled"] = true;
|
||||
OSDMap typesMap = new();
|
||||
typesMap["convex"] = true;
|
||||
typesMap["none"] = true;
|
||||
typesMap["prim"] = true;
|
||||
m_features["PhysicsShapeTypes"] = typesMap;
|
||||
|
||||
if(m_doScriptSyntax && !m_scriptSyntaxID.IsZero())
|
||||
m_features["LSLSyntaxId"] = OSD.FromUUID(m_scriptSyntaxID);
|
||||
|
||||
OSDMap meshAnim = new();
|
||||
meshAnim["AnimatedObjectMaxTris"] = OSD.FromInteger(150000);
|
||||
meshAnim["MaxAgentAnimatedObjectAttachments"] = OSD.FromInteger(2);
|
||||
m_features["AnimatedObjects"] = meshAnim;
|
||||
|
||||
m_features["MaxAgentAttachments"] = OSD.FromInteger(Constants.MaxAgentAttachments);
|
||||
m_features["MaxAgentGroups"] = OSD.FromInteger(Constants.MaxAgentGroups);
|
||||
m_features["MaxAgentGroupsBasic"] = OSD.FromInteger(Constants.MaxAgentGroups);
|
||||
m_features["MaxAgentGroupsPremium"] = OSD.FromInteger(Constants.MaxAgentGroups);
|
||||
|
||||
// Extra information for viewers that want to use it
|
||||
OSDMap extrasMap;
|
||||
if(m_features.TryGetValue("OpenSimExtras", out OSD oe))
|
||||
m_features["MaxEstateAccessIds"] = OSD.FromInteger(Constants.MaxEstateAccessIds);
|
||||
m_features["MaxEstateManagers"] = OSD.FromInteger(Constants.MaxEstateManagers);
|
||||
|
||||
m_features["MaxTextureResolution"] = OSD.FromInteger(Constants.MaxTextureResolution);
|
||||
|
||||
m_features["MeshRezEnabled"] = true;
|
||||
m_features["MeshUploadEnabled"] = true;
|
||||
m_features["MeshXferEnabled"] = true;
|
||||
|
||||
/*
|
||||
m_features["MirrorsEnabled"] = false;
|
||||
m_features["PBRMaterialSwatchEnabled"] = false;
|
||||
m_features["PBRTerrainEnabled"] = false;
|
||||
*/
|
||||
|
||||
m_features["PhysicsMaterialsEnabled"] = true;
|
||||
|
||||
m_features["PhysicsShapeTypes"] = new OSDMap()
|
||||
{
|
||||
extrasMap = oe as OSDMap;
|
||||
}
|
||||
else
|
||||
extrasMap = new OSDMap();
|
||||
["convex"] = true,
|
||||
["none"] = true,
|
||||
["prim"] = true
|
||||
};
|
||||
|
||||
// Extra information for viewers that want to use it
|
||||
OSDMap extrasMap = m_features.TryGetValue("OpenSimExtras", out OSD oe) ? oe as OSDMap : new OSDMap();
|
||||
|
||||
extrasMap["AvatarSkeleton"] = true;
|
||||
extrasMap["AnimationSet"] = true;
|
||||
|
|
|
@ -128,8 +128,8 @@ namespace OpenSim.Region.OptionalModules.Materials
|
|||
ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>();
|
||||
if (featuresModule is not null)
|
||||
{
|
||||
featuresModule.AddOpenSimExtraFeature("MaxMaterialsPerTransaction", m_maxMaterialsPerTransaction);
|
||||
featuresModule.AddOpenSimExtraFeature("RenderMaterialsCapability", 3.0f);
|
||||
featuresModule.AddFeature("MaxMaterialsPerTransaction", m_maxMaterialsPerTransaction);
|
||||
featuresModule.AddFeature("RenderMaterialsCapability", 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue