aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorGigs Taggart2008-09-19 20:59:32 -0500
committerJacek Antonelli2008-09-19 20:59:32 -0500
commitbbe49803b67fe660702e638208b2b4c9a79036a3 (patch)
tree40cdd4835714bc3cebd46dec2182b8c524d8acb6 /linden/indra/newview
parentNew optional SConstruct flag to specify an exact path to build (diff)
downloadmeta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.zip
meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.tar.gz
meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.tar.bz2
meta-impy-bbe49803b67fe660702e638208b2b4c9a79036a3.tar.xz
VWR-2331: Terraform tool variable "strength".
Contributing authors: Gigs Taggart, Aimee Trescothick, Which Linden.
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/llfloatertools.cpp23
-rw-r--r--linden/indra/newview/llfloatertools.h2
-rw-r--r--linden/indra/newview/lltoolbrush.cpp12
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_tools.xml11
5 files changed, 53 insertions, 6 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index e31c149..fa0d21e 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -4164,6 +4164,17 @@
4164 <key>Value</key> 4164 <key>Value</key>
4165 <integer>0</integer> 4165 <integer>0</integer>
4166 </map> 4166 </map>
4167 <key>LandBrushForce</key>
4168 <map>
4169 <key>Comment</key>
4170 <string>Multiplier for land modification brush force.</string>
4171 <key>Persist</key>
4172 <integer>1</integer>
4173 <key>Type</key>
4174 <string>F32</string>
4175 <key>Value</key>
4176 <real>1.0</real>
4177 </map>
4167 <key>Language</key> 4178 <key>Language</key>
4168 <map> 4179 <map>
4169 <key>Comment</key> 4180 <key>Comment</key>
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index 97150e3..8d4d6e2 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -54,6 +54,7 @@
54#include "llpanelvolume.h" 54#include "llpanelvolume.h"
55#include "llpanelpermissions.h" 55#include "llpanelpermissions.h"
56#include "llselectmgr.h" 56#include "llselectmgr.h"
57#include "llslider.h"
57#include "llstatusbar.h" 58#include "llstatusbar.h"
58#include "lltabcontainer.h" 59#include "lltabcontainer.h"
59#include "lltextbox.h" 60#include "lltextbox.h"
@@ -106,6 +107,7 @@ void click_popup_rotate_reset(void*);
106void click_popup_rotate_right(void*); 107void click_popup_rotate_right(void*);
107void click_popup_dozer_mode(LLUICtrl *, void *user); 108void click_popup_dozer_mode(LLUICtrl *, void *user);
108void click_popup_dozer_size(LLUICtrl *, void *user); 109void click_popup_dozer_size(LLUICtrl *, void *user);
110void commit_slider_dozer_force(LLUICtrl *, void*);
109void click_dozer_size(LLUICtrl *, void*); 111void click_dozer_size(LLUICtrl *, void*);
110void click_apply_to_selection(void*); 112void click_apply_to_selection(void*);
111void commit_radio_zoom(LLUICtrl *, void*); 113void commit_radio_zoom(LLUICtrl *, void*);
@@ -308,6 +310,12 @@ BOOL LLFloaterTools::postBuild()
308 childSetAction("button apply to selection",click_apply_to_selection, (void*)0); 310 childSetAction("button apply to selection",click_apply_to_selection, (void*)0);
309 mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners"); 311 mCheckShowOwners = getChild<LLCheckBoxCtrl>("checkbox show owners");
310 childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners")); 312 childSetValue("checkbox show owners",gSavedSettings.getBOOL("ShowParcelOwners"));
313
314 mSliderDozerForce = getChild<LLSlider>("slider force");
315 childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0);
316 // the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
317 childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce")));
318
311 childSetAction("button more", click_show_more, this); 319 childSetAction("button more", click_show_more, this);
312 childSetAction("button less", click_show_more, this); 320 childSetAction("button less", click_show_more, this);
313 mTab = getChild<LLTabContainer>("Object Info Tabs"); 321 mTab = getChild<LLTabContainer>("Object Info Tabs");
@@ -741,6 +749,11 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
741 { 749 {
742 mCheckShowOwners ->setVisible( land_visible ); 750 mCheckShowOwners ->setVisible( land_visible );
743 } 751 }
752 if (mSliderDozerForce)
753 {
754 mSliderDozerForce ->setVisible( land_visible );
755 childSetVisible("Force:", land_visible);
756 }
744 757
745 // 758 //
746 // More panel visibility 759 // More panel visibility
@@ -939,6 +952,16 @@ void click_dozer_size(LLUICtrl *ctrl, void *user)
939 gSavedSettings.setS32("RadioLandBrushSize", size); 952 gSavedSettings.setS32("RadioLandBrushSize", size);
940} 953}
941 954
955void commit_slider_dozer_force(LLUICtrl *ctrl, void*)
956{
957 // the slider is logarithmic, so we exponentiate to get the actual force multiplier
958 F32 dozer_force = pow(10.f, (F32)ctrl->getValue().asReal());
959 gSavedSettings.setF32("LandBrushForce", dozer_force);
960}
961
962
963
964
942void click_apply_to_selection(void* user) 965void click_apply_to_selection(void* user)
943{ 966{
944 LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal(); 967 LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal();
diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h
index b0a804b..a75aa87 100644
--- a/linden/indra/newview/llfloatertools.h
+++ b/linden/indra/newview/llfloatertools.h
@@ -48,6 +48,7 @@ class LLPanelContents;
48class LLPanelFace; 48class LLPanelFace;
49class LLPanelLandInfo; 49class LLPanelLandInfo;
50class LLComboBox; 50class LLComboBox;
51class LLSlider;
51class LLParcelSelection; 52class LLParcelSelection;
52class LLObjectSelection; 53class LLObjectSelection;
53 54
@@ -167,6 +168,7 @@ public:
167 LLCheckBoxCtrl *mRadioDozerSmooth; 168 LLCheckBoxCtrl *mRadioDozerSmooth;
168 LLCheckBoxCtrl *mRadioDozerNoise; 169 LLCheckBoxCtrl *mRadioDozerNoise;
169 LLCheckBoxCtrl *mRadioDozerRevert; 170 LLCheckBoxCtrl *mRadioDozerRevert;
171 LLSlider *mSliderDozerForce;
170 172
171 LLComboBox *mComboDozerSize; 173 LLComboBox *mComboDozerSize;
172 LLButton *mBtnApplyToSelection; 174 LLButton *mBtnApplyToSelection;
diff --git a/linden/indra/newview/lltoolbrush.cpp b/linden/indra/newview/lltoolbrush.cpp
index 89cb0b6..fdd7b66 100644
--- a/linden/indra/newview/lltoolbrush.cpp
+++ b/linden/indra/newview/lltoolbrush.cpp
@@ -154,7 +154,7 @@ void LLToolBrushLand::modifyLandAtPointGlobal(const LLVector3d &pos_global,
154 regionp->forceUpdate(); 154 regionp->forceUpdate();
155 155
156 // tell the simulator what we've done 156 // tell the simulator what we've done
157 F32 seconds = 1.0f / gFPSClamped; 157 F32 seconds = (1.0f / gFPSClamped) * gSavedSettings.getF32("LandBrushForce");
158 F32 x_pos = (F32)pos_region.mV[VX]; 158 F32 x_pos = (F32)pos_region.mV[VX];
159 F32 y_pos = (F32)pos_region.mV[VY]; 159 F32 y_pos = (F32)pos_region.mV[VY];
160 U8 brush_size = (U8)mBrushIndex; 160 U8 brush_size = (U8)mBrushIndex;
@@ -242,7 +242,7 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
242 242
243 min_region.clamp(0.f, regionp->getWidth()); 243 min_region.clamp(0.f, regionp->getWidth());
244 max_region.clamp(0.f, regionp->getWidth()); 244 max_region.clamp(0.f, regionp->getWidth());
245 F32 seconds = 1.0f; 245 F32 seconds = gSavedSettings.getF32("LandBrushForce");
246 246
247 LLSurface &land = regionp->getLand(); 247 LLSurface &land = regionp->getLand();
248 char action = E_LAND_LEVEL; 248 char action = E_LAND_LEVEL;
@@ -251,21 +251,23 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
251 case 0: 251 case 0:
252 // // average toward mStartingZ 252 // // average toward mStartingZ
253 action = E_LAND_LEVEL; 253 action = E_LAND_LEVEL;
254 seconds = 1.f; 254 seconds *= 0.25f;
255 break; 255 break;
256 case 1: 256 case 1:
257 action = E_LAND_RAISE; 257 action = E_LAND_RAISE;
258 seconds *= 0.25f;
258 break; 259 break;
259 case 2: 260 case 2:
260 action = E_LAND_LOWER; 261 action = E_LAND_LOWER;
262 seconds *= 0.25f;
261 break; 263 break;
262 case 3: 264 case 3:
263 action = E_LAND_SMOOTH; 265 action = E_LAND_SMOOTH;
264 seconds = 10.f; 266 seconds *= 5.0f;
265 break; 267 break;
266 case 4: 268 case 4:
267 action = E_LAND_NOISE; 269 action = E_LAND_NOISE;
268 seconds = 0.5f; 270 seconds *= 0.5f;
269 break; 271 break;
270 case 5: 272 case 5:
271 action = E_LAND_REVERT; 273 action = E_LAND_REVERT;
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
index db176b3..3ae37ea 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml
@@ -278,7 +278,16 @@
278 Large 278 Large
279 </combo_item> 279 </combo_item>
280 </combo_box> 280 </combo_box>
281 <button bottom_delta="-20" follows="left|top" font="SansSerifSmall" halign="center" 281 <volume_slider bottom_delta="-19" follows="left|top" height="16" hidden="false" increment="0.1"
282 initial_val="0.00" left="155" max_val="2.0" min_val="-1.0"
283 mouse_opaque="true" name="slider force" width="70" />
284 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
285 bottom_delta="4" drop_shadow_visible="true" enabled="true" follows="left|top"
286 font="SansSerifSmall" h_pad="0" halign="left" height="12" hidden="false"
287 left="118" mouse_opaque="true" name="Force:" v_pad="0" width="128">
288 Force:
289 </text>
290 <button bottom_delta="-22" follows="left|top" font="SansSerifSmall" halign="center"
282 height="16" label="Apply to selection" label_selected="Apply to selection" 291 height="16" label="Apply to selection" label_selected="Apply to selection"
283 left="118" mouse_opaque="true" name="button apply to selection" 292 left="118" mouse_opaque="true" name="button apply to selection"
284 scale_image="TRUE" tool_tip="Modify Selected Land" width="134" /> 293 scale_image="TRUE" tool_tip="Modify Selected Land" width="134" />