Add MaxMaterialsPerTransaction to SimFeatures
Signed-off-by: Diva Canto <diva@metaverseink.com>fsassets
parent
c37315da87
commit
7edaf1d851
|
@ -65,6 +65,7 @@ namespace OpenSim.Region.OptionalModules.Materials
|
|||
|
||||
private Scene m_scene = null;
|
||||
private bool m_enabled = false;
|
||||
private int m_maxMaterialsPerTransaction = 50;
|
||||
|
||||
public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>();
|
||||
|
||||
|
@ -74,7 +75,10 @@ namespace OpenSim.Region.OptionalModules.Materials
|
|||
|
||||
IConfig config = source.Configs["Materials"];
|
||||
if (config != null)
|
||||
{
|
||||
m_enabled = config.GetBoolean("enable_materials", m_enabled);
|
||||
m_maxMaterialsPerTransaction = config.GetInt("MaxMaterialsPerTransaction", m_maxMaterialsPerTransaction);
|
||||
}
|
||||
|
||||
if (m_enabled)
|
||||
m_log.DebugFormat("[Materials]: Initialized");
|
||||
|
@ -145,6 +149,16 @@ namespace OpenSim.Region.OptionalModules.Materials
|
|||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
if (!m_enabled) return;
|
||||
|
||||
ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>();
|
||||
if (featuresModule != null)
|
||||
featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest;
|
||||
}
|
||||
|
||||
private void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features)
|
||||
{
|
||||
features["MaxMaterialsPerTransaction"] = m_maxMaterialsPerTransaction;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -789,7 +789,7 @@
|
|||
;# {enable_materials} {} {Enable Materials support?} {true false} true
|
||||
;; This enables the use of Materials.
|
||||
; enable_materials = true
|
||||
|
||||
; MaxMaterialsPerTransaction = 50
|
||||
|
||||
[DataSnapshot]
|
||||
;# {index_sims} {} {Enable data snapshotting (search)?} {true false} false
|
||||
|
|
Loading…
Reference in New Issue