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 Scene m_scene = null;
|
||||||
private bool m_enabled = false;
|
private bool m_enabled = false;
|
||||||
|
private int m_maxMaterialsPerTransaction = 50;
|
||||||
|
|
||||||
public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>();
|
public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>();
|
||||||
|
|
||||||
|
@ -74,7 +75,10 @@ namespace OpenSim.Region.OptionalModules.Materials
|
||||||
|
|
||||||
IConfig config = source.Configs["Materials"];
|
IConfig config = source.Configs["Materials"];
|
||||||
if (config != null)
|
if (config != null)
|
||||||
|
{
|
||||||
m_enabled = config.GetBoolean("enable_materials", m_enabled);
|
m_enabled = config.GetBoolean("enable_materials", m_enabled);
|
||||||
|
m_maxMaterialsPerTransaction = config.GetInt("MaxMaterialsPerTransaction", m_maxMaterialsPerTransaction);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
m_log.DebugFormat("[Materials]: Initialized");
|
m_log.DebugFormat("[Materials]: Initialized");
|
||||||
|
@ -145,6 +149,16 @@ namespace OpenSim.Region.OptionalModules.Materials
|
||||||
|
|
||||||
public void RegionLoaded(Scene scene)
|
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>
|
/// <summary>
|
||||||
|
|
|
@ -789,7 +789,7 @@
|
||||||
;# {enable_materials} {} {Enable Materials support?} {true false} true
|
;# {enable_materials} {} {Enable Materials support?} {true false} true
|
||||||
;; This enables the use of Materials.
|
;; This enables the use of Materials.
|
||||||
; enable_materials = true
|
; enable_materials = true
|
||||||
|
; MaxMaterialsPerTransaction = 50
|
||||||
|
|
||||||
[DataSnapshot]
|
[DataSnapshot]
|
||||||
;# {index_sims} {} {Enable data snapshotting (search)?} {true false} false
|
;# {index_sims} {} {Enable data snapshotting (search)?} {true false} false
|
||||||
|
|
Loading…
Reference in New Issue