diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs | 14 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs index 3ce6178..9413f09 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs | |||
@@ -65,6 +65,7 @@ namespace OpenSim.Region.OptionalModules.Materials | |||
65 | 65 | ||
66 | private Scene m_scene = null; | 66 | private Scene m_scene = null; |
67 | private bool m_enabled = false; | 67 | private bool m_enabled = false; |
68 | private int m_maxMaterialsPerTransaction = 50; | ||
68 | 69 | ||
69 | public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>(); | 70 | public Dictionary<UUID, OSDMap> m_regionMaterials = new Dictionary<UUID, OSDMap>(); |
70 | 71 | ||
@@ -74,7 +75,10 @@ namespace OpenSim.Region.OptionalModules.Materials | |||
74 | 75 | ||
75 | IConfig config = source.Configs["Materials"]; | 76 | IConfig config = source.Configs["Materials"]; |
76 | if (config != null) | 77 | if (config != null) |
78 | { | ||
77 | m_enabled = config.GetBoolean("enable_materials", m_enabled); | 79 | m_enabled = config.GetBoolean("enable_materials", m_enabled); |
80 | m_maxMaterialsPerTransaction = config.GetInt("MaxMaterialsPerTransaction", m_maxMaterialsPerTransaction); | ||
81 | } | ||
78 | 82 | ||
79 | if (m_enabled) | 83 | if (m_enabled) |
80 | m_log.DebugFormat("[Materials]: Initialized"); | 84 | m_log.DebugFormat("[Materials]: Initialized"); |
@@ -145,6 +149,16 @@ namespace OpenSim.Region.OptionalModules.Materials | |||
145 | 149 | ||
146 | public void RegionLoaded(Scene scene) | 150 | public void RegionLoaded(Scene scene) |
147 | { | 151 | { |
152 | if (!m_enabled) return; | ||
153 | |||
154 | ISimulatorFeaturesModule featuresModule = scene.RequestModuleInterface<ISimulatorFeaturesModule>(); | ||
155 | if (featuresModule != null) | ||
156 | featuresModule.OnSimulatorFeaturesRequest += OnSimulatorFeaturesRequest; | ||
157 | } | ||
158 | |||
159 | private void OnSimulatorFeaturesRequest(UUID agentID, ref OSDMap features) | ||
160 | { | ||
161 | features["MaxMaterialsPerTransaction"] = m_maxMaterialsPerTransaction; | ||
148 | } | 162 | } |
149 | 163 | ||
150 | /// <summary> | 164 | /// <summary> |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 28a8dc2..7a1a88d 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -789,7 +789,7 @@ | |||
789 | ;# {enable_materials} {} {Enable Materials support?} {true false} true | 789 | ;# {enable_materials} {} {Enable Materials support?} {true false} true |
790 | ;; This enables the use of Materials. | 790 | ;; This enables the use of Materials. |
791 | ; enable_materials = true | 791 | ; enable_materials = true |
792 | 792 | ; MaxMaterialsPerTransaction = 50 | |
793 | 793 | ||
794 | [DataSnapshot] | 794 | [DataSnapshot] |
795 | ;# {index_sims} {} {Enable data snapshotting (search)?} {true false} false | 795 | ;# {index_sims} {} {Enable data snapshotting (search)?} {true false} false |