Add MaxMaterialsPerTransaction to SimFeatures

Signed-off-by: Diva Canto <diva@metaverseink.com>
fsassets
Cinder 2015-06-19 09:29:21 -06:00 committed by Diva Canto
parent c37315da87
commit 7edaf1d851
2 changed files with 15 additions and 1 deletions

View File

@ -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>

View File

@ -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