diff -wru -X x.txt linden-orig\/indra/llmath/xform.h linden\/indra/llmath/xform.h --- linden-orig\/indra/llmath/xform.h 2008-04-07 19:45:36.000000000 -0400 +++ linden\/indra/llmath/xform.h 2008-05-10 18:48:15.197000000 -0400 @@ -35,10 +35,10 @@ #include "m4math.h" #include "llquaternion.h" -const F32 MAX_OBJECT_Z = 768.f; +const F32 MAX_OBJECT_Z = 4096.f; const F32 MIN_OBJECT_Z = -256.f; -const F32 MIN_OBJECT_SCALE = 0.01f; -const F32 MAX_OBJECT_SCALE = 10.f; +const F32 MIN_OBJECT_SCALE = 0.0001f; +const F32 MAX_OBJECT_SCALE = 512.f; class LLXform { diff -wru -X x.txt linden-orig\/indra/newview/llcontroldef.cpp linden\/indra/newview/llcontroldef.cpp --- linden-orig\/indra/newview/llcontroldef.cpp 2008-04-07 19:45:42.000000000 -0400 +++ linden\/indra/newview/llcontroldef.cpp 2008-05-11 11:49:41.402000000 -0400 @@ -1582,6 +1586,11 @@ gSavedSettings.declareBOOL("SaveMinidump", TRUE, "Save minidump for developer debugging on crash"); + // default new object scale + gSavedSettings.declareF32("RezNewScaleX", 0.5f, "Default X dimension scale when creating a new prim"); + gSavedSettings.declareF32("RezNewScaleY", 0.5f, "Default Y dimension scale when creating a new prim"); + gSavedSettings.declareF32("RezNewScaleZ", 0.5f, "Default Z dimension scale when creating a new prim"); + // // crash_settings.xml // diff -wru -X x.txt linden-orig\/indra/newview/llfloatertools.cpp linden\/indra/newview/llfloatertools.cpp --- linden-orig\/indra/newview/llfloatertools.cpp 2008-04-07 19:45:42.000000000 -0400 +++ linden\/indra/newview/llfloatertools.cpp 2008-05-11 14:55:05.810000000 -0400 @@ -54,6 +54,7 @@ #include "llpanelvolume.h" #include "llpanelpermissions.h" #include "llselectmgr.h" +#include "llspinctrl.h" #include "llstatusbar.h" #include "lltabcontainer.h" #include "lltextbox.h" @@ -114,6 +115,9 @@ void commit_radio_pan(LLUICtrl *, void*); void commit_grid_mode(LLUICtrl *, void*); void commit_slider_zoom(LLUICtrl *, void*); +void commit_new_x(LLUICtrl *ctrl, void *data); +void commit_new_y(LLUICtrl *ctrl, void *data); +void commit_new_z(LLUICtrl *ctrl, void *data); //static @@ -284,6 +288,21 @@ childSetValue("checkbox copy centers",(BOOL)gSavedSettings.getBOOL("CreateToolCopyCenters")); mCheckCopyRotates = LLUICtrlFactory::getCheckBoxByName(this,"checkbox copy rotates"); childSetValue("checkbox copy rotates",(BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates")); + + mLabelNewSize = LLUICtrlFactory::getTextBoxByName(this, "CreateToolNewSizeLabel"); + + mSpinNewX = LLUICtrlFactory::getSpinnerByName(this, "CreateToolNewX"); + childSetValue("CreateToolNewX", (F32)gSavedSettings.getF32("RezNewScaleX")); + childSetCommitCallback("CreateToolNewX", commit_new_x, mSpinNewX); + + mSpinNewY = LLUICtrlFactory::getSpinnerByName(this, "CreateToolNewY"); + childSetValue("CreateToolNewY", (F32)gSavedSettings.getF32("RezNewScaleY")); + childSetCommitCallback("CreateToolNewY", commit_new_y, mSpinNewY); + + mSpinNewZ = LLUICtrlFactory::getSpinnerByName(this, "CreateToolNewZ"); + childSetValue("CreateToolNewZ", (F32)gSavedSettings.getF32("RezNewScaleZ")); + childSetCommitCallback("CreateToolNewZ", commit_new_z, mSpinNewZ); + mRadioSelectLand = LLUICtrlFactory::getCheckBoxByName(this,"radio select land"); childSetCommitCallback("radio select land",commit_select_tool, gToolParcel); mRadioDozerFlatten = LLUICtrlFactory::getCheckBoxByName(this,"radio flatten"); @@ -373,6 +392,12 @@ mCheckCopySelection(NULL), mCheckCopyCenters(NULL), mCheckCopyRotates(NULL), + + mLabelNewSize(NULL), + mSpinNewX(NULL), + mSpinNewY(NULL), + mSpinNewZ(NULL), + mRadioSelectLand(NULL), mRadioDozerFlatten(NULL), mRadioDozerRaise(NULL), @@ -674,6 +699,11 @@ if (mCheckCopyCenters) mCheckCopyCenters ->setVisible( create_visible ); if (mCheckCopyRotates) mCheckCopyRotates ->setVisible( create_visible ); + if (mLabelNewSize) mLabelNewSize ->setVisible( create_visible ); + if (mSpinNewX) mSpinNewX ->setVisible( create_visible ); + if (mSpinNewY) mSpinNewY ->setVisible( create_visible ); + if (mSpinNewZ) mSpinNewZ ->setVisible( create_visible ); + if (mCheckCopyCenters) mCheckCopyCenters->setEnabled( mCheckCopySelection->get() ); if (mCheckCopyRotates) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); @@ -935,6 +965,24 @@ gSavedSettings.setBOOL("ShowParcelOwners", show_owners); } +void commit_new_x(LLUICtrl *ctrl, void *data) +{ + LLSpinCtrl* spin = (LLSpinCtrl*) data; + gSavedSettings.setF32("RezNewScaleX", spin->get()); +} + +void commit_new_y(LLUICtrl *ctrl, void *data) +{ + LLSpinCtrl* spin = (LLSpinCtrl*) data; + gSavedSettings.setF32("RezNewScaleY", spin->get()); +} + +void commit_new_z(LLUICtrl *ctrl, void *data) +{ + LLSpinCtrl* spin = (LLSpinCtrl*) data; + gSavedSettings.setF32("RezNewScaleZ", spin->get()); +} + void commit_select_component(LLUICtrl *ctrl, void *data) { LLFloaterTools* floaterp = (LLFloaterTools*)data; diff -wru -X x.txt linden-orig\/indra/newview/llfloatertools.h linden\/indra/newview/llfloatertools.h --- linden-orig\/indra/newview/llfloatertools.h 2008-04-07 19:45:40.000000000 -0400 +++ linden\/indra/newview/llfloatertools.h 2008-05-11 14:53:12.757000000 -0400 @@ -50,6 +50,7 @@ class LLComboBox; class LLParcelSelection; class LLObjectSelection; +class LLSpinCtrl; typedef LLSafeHandle LLObjectSelectionHandle; @@ -157,6 +158,11 @@ LLCheckBoxCtrl *mCheckCopyCenters; LLCheckBoxCtrl *mCheckCopyRotates; + LLTextBox *mLabelNewSize; + LLSpinCtrl *mSpinNewX; + LLSpinCtrl *mSpinNewY; + LLSpinCtrl *mSpinNewZ; + // Land buttons // LLCheckBoxCtrl *mRadioEditLand; LLCheckBoxCtrl *mRadioSelectLand; diff -wru -X x.txt linden-orig\/indra/newview/lltoolplacer.cpp linden\/indra/newview/lltoolplacer.cpp --- linden-orig\/indra/newview/lltoolplacer.cpp 2008-04-07 19:45:42.000000000 -0400 +++ linden\/indra/newview/lltoolplacer.cpp 2008-05-10 23:04:42.176000000 -0400 @@ -64,8 +64,6 @@ #include "llviewercamera.h" #include "llviewerstats.h" -const LLVector3 DEFAULT_OBJECT_SCALE(0.5f, 0.5f, 0.5f); - //static LLPCode LLToolPlacer::sObjectType = LL_PCODE_CUBE; @@ -182,7 +180,7 @@ // Set params for new object based on its PCode. LLQuaternion rotation; - LLVector3 scale = DEFAULT_OBJECT_SCALE; + LLVector3 scale(gSavedSettings.getF32("RezNewScaleX"), gSavedSettings.getF32("RezNewScaleY"), gSavedSettings.getF32("RezNewScaleZ")); U8 material = LL_MCODE_WOOD; BOOL create_selected = FALSE; LLVolumeParams volume_params; diff -wru -X x.txt linden-orig\/indra/newview/skins/xui/en-us/floater_tools.xml linden\/indra/newview/skins/xui/en-us/floater_tools.xml --- linden-orig\/indra/newview/skins/xui/en-us/floater_tools.xml 2008-04-07 19:45:42.000000000 -0400 +++ linden\/indra/newview/skins/xui/en-us/floater_tools.xml 2008-05-11 14:33:23.043000000 -0400 @@ -208,6 +208,26 @@ image_unselected="object_grass.tga" label="" label_selected="" left_delta="23" mouse_opaque="true" name="ToolGrass" scale_image="TRUE" width="24" /> + + + New Object Size (meters) + + + + +