diff options
Diffstat (limited to 'OpenSim')
3 files changed, 31 insertions, 12 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 |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs index 44a6883..0251ac4 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs | |||
@@ -129,15 +129,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
129 | // m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request"); | 129 | // m_log.DebugFormat("[MESH UPLOAD FLAG MODULE]: MeshUploadFlag request"); |
130 | 130 | ||
131 | OSDMap data = new OSDMap(); | 131 | OSDMap data = new OSDMap(); |
132 | ScenePresence sp = m_scene.GetScenePresence(m_agentID); | 132 | // ScenePresence sp = m_scene.GetScenePresence(m_agentID); |
133 | data["username"] = sp.Firstname + "." + sp.Lastname; | 133 | // data["username"] = sp.Firstname + "." + sp.Lastname; |
134 | data["display_name_next_update"] = new OSDDate(DateTime.Now); | 134 | // data["display_name_next_update"] = new OSDDate(DateTime.Now); |
135 | data["legacy_first_name"] = sp.Firstname; | 135 | // data["legacy_first_name"] = sp.Firstname; |
136 | data["mesh_upload_status"] = "valid"; | 136 | data["mesh_upload_status"] = "valid"; |
137 | data["display_name"] = sp.Firstname + " " + sp.Lastname; | 137 | // data["display_name"] = sp.Firstname + " " + sp.Lastname; |
138 | data["legacy_last_name"] = sp.Lastname; | 138 | // data["legacy_last_name"] = sp.Lastname; |
139 | data["id"] = m_agentID; | 139 | // data["id"] = m_agentID; |
140 | data["is_display_name_default"] = true; | 140 | // data["is_display_name_default"] = true; |
141 | 141 | ||
142 | //Send back data | 142 | //Send back data |
143 | Hashtable responsedata = new Hashtable(); | 143 | Hashtable responsedata = new Hashtable(); |