Index: linden/indra/newview/llfloatertools.h =================================================================== @@ -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; Index: linden/indra/newview/lltoolplacer.cpp =================================================================== @@ -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; Index: linden/indra/newview/app_settings/settings.xml =================================================================== @@ -5903,6 +5903,39 @@ Value 512 + RezNewScaleX + + Comment + Default X dimension scale when creating a new prim + Persist + 0 + Type + F32 + Value + 0.5 + + RezNewScaleY + + Comment + Default Y dimension scale when creating a new prim + Persist + 0 + Type + F32 + Value + 0.5 + + RezNewScaleZ + + Comment + Default Z dimension scale when creating a new prim + Persist + 0 + Type + F32 + Value + 0.5 + RotateRight Comment Index: linden/indra/newview/llfloatertools.cpp =================================================================== @@ -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" @@ -113,6 +114,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 @@ -283,6 +287,22 @@ childSetValue("checkbox copy centers",(BOOL)gSavedSettings.getBOOL("CreateToolCopyCenters")); mCheckCopyRotates = getChild("checkbox copy rotates"); childSetValue("checkbox copy rotates",(BOOL)gSavedSettings.getBOOL("CreateToolCopyRotates")); + + mLabelNewSize = getChild("CreateToolNewSizeLabel"); + + mSpinNewX = getChild("CreateToolNewX"); + childSetValue("CreateToolNewX", (F32)gSavedSettings.getF32("RezNewScaleX")); + childSetCommitCallback("CreateToolNewX", commit_new_x, mSpinNewX); + + mSpinNewY = getChild("CreateToolNewY"); + childSetValue("CreateToolNewY", (F32)gSavedSettings.getF32("RezNewScaleY")); + childSetCommitCallback("CreateToolNewY", commit_new_y, mSpinNewY); + + mSpinNewZ = getChild("CreateToolNewZ"); + childSetValue("CreateToolNewZ", (F32)gSavedSettings.getF32("RezNewScaleZ")); + childSetCommitCallback("CreateToolNewZ", commit_new_z, mSpinNewZ); + + mRadioSelectLand = getChild("radio select land"); childSetCommitCallback("radio select land",commit_select_tool, LLToolSelectLand::getInstance()); mRadioDozerFlatten = getChild("radio flatten"); @@ -372,6 +392,12 @@ mCheckCopySelection(NULL), mCheckCopyCenters(NULL), mCheckCopyRotates(NULL), + + mLabelNewSize(NULL), + mSpinNewX(NULL), + mSpinNewY(NULL), + mSpinNewZ(NULL), + mRadioSelectLand(NULL), mRadioDozerFlatten(NULL), mRadioDozerRaise(NULL), @@ -673,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() ); @@ -942,6 +973,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; Index: linden/indra/newview/skins/xui/en-us/floater_tools.xml =================================================================== @@ -227,6 +227,26 @@ image_unselected="object_grass.tga" label="" label_selected="" left_delta="28" mouse_opaque="true" name="ToolGrass" scale_image="TRUE" tool_tip="Grass" width="30" /> + + + New Object Size (meters) + + + + +