aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Materials
diff options
context:
space:
mode:
authorCinder2015-06-19 09:29:21 -0600
committerDiva Canto2015-06-19 08:44:34 -0700
commit7edaf1d851c5d2350deb93641d775e336d175a32 (patch)
tree48bae50df2ab253db58b2f379cc5e0b736bd5c80 /OpenSim/Region/OptionalModules/Materials
parentWarp3DImageModule. Reduce workload by not calling to render the root prim twi... (diff)
downloadopensim-SC-7edaf1d851c5d2350deb93641d775e336d175a32.zip
opensim-SC-7edaf1d851c5d2350deb93641d775e336d175a32.tar.gz
opensim-SC-7edaf1d851c5d2350deb93641d775e336d175a32.tar.bz2
opensim-SC-7edaf1d851c5d2350deb93641d775e336d175a32.tar.xz
Add MaxMaterialsPerTransaction to SimFeatures
Signed-off-by: Diva Canto <diva@metaverseink.com>
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs14
1 files changed, 14 insertions, 0 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>