diff options
author | UbitUmarov | 2012-09-21 11:50:14 +0100 |
---|---|---|
committer | UbitUmarov | 2012-09-21 11:50:14 +0100 |
commit | f9c24c9414134af04fea3dd6ff39800856aec10e (patch) | |
tree | 1b9e7fc7e3e20e9dbeacebaf0a31c0cbb1436a06 /OpenSim/Region/ClientStack | |
parent | Fix model upload rotations and offsets ( i hope ) (diff) | |
download | opensim-SC-f9c24c9414134af04fea3dd6ff39800856aec10e.zip opensim-SC-f9c24c9414134af04fea3dd6ff39800856aec10e.tar.gz opensim-SC-f9c24c9414134af04fea3dd6ff39800856aec10e.tar.bz2 opensim-SC-f9c24c9414134af04fea3dd6ff39800856aec10e.tar.xz |
read model upload cost parameters from config [Economy] section
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | 6 |
2 files changed, 23 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index a139ea8..1b47fca 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -118,6 +118,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
118 | private string m_regionName; | 118 | private string m_regionName; |
119 | private int m_levelUpload = 0; | 119 | private int m_levelUpload = 0; |
120 | private float m_PrimScaleMin = 0.001f; | 120 | private float m_PrimScaleMin = 0.001f; |
121 | private bool m_enableFreeTestModelUpload = false; | ||
121 | 122 | ||
122 | private enum FileAgentInventoryState : int | 123 | private enum FileAgentInventoryState : int |
123 | { | 124 | { |
@@ -142,6 +143,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
142 | // m_ModelCost.ObjectLinkedPartsMax = ?? | 143 | // m_ModelCost.ObjectLinkedPartsMax = ?? |
143 | // m_PrimScaleMin = ?? | 144 | // m_PrimScaleMin = ?? |
144 | 145 | ||
146 | float modelTextureUploadFactor = m_ModelCost.ModelTextureCostFactor; | ||
147 | float modelUploadFactor = m_ModelCost.ModelMeshCostFactor; | ||
148 | float modelMinUploadCostFactor = m_ModelCost.ModelMinCostFactor; | ||
149 | |||
150 | |||
145 | IConfigSource config = m_Scene.Config; | 151 | IConfigSource config = m_Scene.Config; |
146 | if (config != null) | 152 | if (config != null) |
147 | { | 153 | { |
@@ -156,6 +162,20 @@ namespace OpenSim.Region.ClientStack.Linden | |||
156 | { | 162 | { |
157 | m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures); | 163 | m_persistBakedTextures = appearanceConfig.GetBoolean("PersistBakedTextures", m_persistBakedTextures); |
158 | } | 164 | } |
165 | // economy for model upload | ||
166 | IConfig EconomyConfig = config.Configs["Economy"]; | ||
167 | if (EconomyConfig != null) | ||
168 | { | ||
169 | modelUploadFactor = EconomyConfig.GetFloat("MeshModelUploadCostFactor", modelUploadFactor); | ||
170 | modelTextureUploadFactor = EconomyConfig.GetFloat("MeshModelUploadTextureCostFactor", modelTextureUploadFactor); | ||
171 | modelMinUploadCostFactor = EconomyConfig.GetFloat("MeshModelMinCostFactor", modelMinUploadCostFactor); | ||
172 | m_enableFreeTestModelUpload = EconomyConfig.GetBoolean("MeshModelUploadAllowFreeTest", false); | ||
173 | |||
174 | m_ModelCost.ModelMeshCostFactor = modelUploadFactor; | ||
175 | m_ModelCost.ModelTextureCostFactor = modelTextureUploadFactor; | ||
176 | m_ModelCost.ModelMinCostFactor = modelMinUploadCostFactor; | ||
177 | } | ||
178 | |||
159 | } | 179 | } |
160 | 180 | ||
161 | m_assetService = m_Scene.AssetService; | 181 | m_assetService = m_Scene.AssetService; |
@@ -912,6 +932,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
912 | { | 932 | { |
913 | AddNewInventoryItem(m_HostCapsObj.AgentID, item, cost); | 933 | AddNewInventoryItem(m_HostCapsObj.AgentID, item, cost); |
914 | } | 934 | } |
935 | |||
915 | lock (m_ModelCost) | 936 | lock (m_ModelCost) |
916 | m_FileAgentInventoryState = FileAgentInventoryState.idle; | 937 | m_FileAgentInventoryState = FileAgentInventoryState.idle; |
917 | } | 938 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs index ece40ac..830c46d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/MeshCost.cs | |||
@@ -31,14 +31,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
31 | public class ModelCost | 31 | public class ModelCost |
32 | { | 32 | { |
33 | 33 | ||
34 | // upload fee tunning paramenters | 34 | // upload fee defaults |
35 | // fees are normalized to 1.0 | 35 | // fees are normalized to 1.0 |
36 | // this parameters scale them to basic cost ( so 1.0 translates to 10 ) | 36 | // this parameters scale them to basic cost ( so 1.0 translates to 10 ) |
37 | 37 | ||
38 | public float ModelMeshCostFactor = 1.0f; // scale total cost relative to basic (excluding textures) | 38 | public float ModelMeshCostFactor = 1.0f; // scale total cost relative to basic (excluding textures) |
39 | public float ModelTextureCostFactor = 0.25f; //(2.5c$) scale textures fee to basic. | 39 | public float ModelTextureCostFactor = 1.0f; // scale textures fee to basic. |
40 | // promote integration in a model | ||
41 | // since they will not show up in inventory | ||
42 | public float ModelMinCostFactor = 0.5f; // minimum total model free excluding textures | 40 | public float ModelMinCostFactor = 0.5f; // minimum total model free excluding textures |
43 | 41 | ||
44 | // itens costs in normalized values | 42 | // itens costs in normalized values |