What started out as removing the newline spam in LLPanelObject, ended as cleanup/sync with v-d.

Jus' want files to be nice to read, but then... a bunch of them are all messy.. so... Fixed~
This commit is contained in:
Lirusaito
2012-08-15 10:00:47 -04:00
parent 1d99158562
commit d1cb627582
14 changed files with 167 additions and 264 deletions

View File

@@ -70,6 +70,7 @@
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewerwindow.h"
#include "llvoavatarself.h"
@@ -77,21 +78,20 @@
#include "llworldmap.h"
//Misc non-standard includes
#include "llviewerregion.h"
#include "llurldispatcher.h"
#include "llimview.h" //For gIMMgr
//Floaters
#include "llfloatermute.h"
#include "llfloatermap.h"
#include "llfloateractivespeakers.h"
#include "llfloateravatarinfo.h"
#include "llfloaterchat.h"
#include "llfloaterdirectory.h"
#include "llfloatergroupinfo.h"
#include "llfloatergroups.h"
#include "llfloateravatarinfo.h"
#include "llfloaterworldmap.h"
#include "llfloaterland.h"
#include "llfloatermap.h"
#include "llfloatermute.h"
#include "llfloatersnapshot.h"
#include "llfloaterchat.h"
#include "llfloaterworldmap.h"
#include "lluictrlfactory.h" //For LLUICtrlFactory::getLayeredXMLNode
@@ -121,7 +121,6 @@ const F64 CHAT_AGE_FAST_RATE = 3.0;
const F32 MIN_FIDGET_TIME = 8.f; // seconds
const F32 MAX_FIDGET_TIME = 20.f; // seconds
// The agent instance.
LLAgent gAgent;
std::string gAuthString;
@@ -130,7 +129,7 @@ std::string gAuthString;
LLUUID gReSitTargetID;
LLVector3 gReSitOffset;
// </edit>
//
//--------------------------------------------------------------------
// Statics
//
@@ -247,6 +246,7 @@ LLAgent::LLAgent() :
mFirstLogin(FALSE),
mGenderChosen(FALSE),
mAppearanceSerialNum(0),
mMouselookModeInSignal(NULL),
mMouselookModeOutSignal(NULL),
mPendingLure(NULL)
@@ -310,7 +310,6 @@ LLAgent::~LLAgent()
mEffectColor = NULL;
}
// Handle any actions that need to be performed when the main app gains focus
// (such as through alt-tab).
//-----------------------------------------------------------------------------
@@ -481,7 +480,7 @@ void LLAgent::movePitch(F32 mag)
if (mag > 0)
{
setControlFlags(AGENT_CONTROL_PITCH_POS );
setControlFlags(AGENT_CONTROL_PITCH_POS);
}
else if (mag < 0)
{
@@ -535,8 +534,6 @@ BOOL LLAgent::getPhantom()
return exlPhantom;
}
//
//-----------------------------------------------------------------------------
// setFlying()
//-----------------------------------------------------------------------------
@@ -665,9 +662,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
<< " located at " << ip << llendl;
if (mRegionp)
{
// NaCl - Antispam Registry
NACLAntiSpamRegistry::purgeAllQueues();
// NaCl End
// NaCl - Antispam Registry
NACLAntiSpamRegistry::purgeAllQueues();
// NaCl End
// We've changed regions, we're now going to change our agent coordinate frame.
mAgentOriginGlobal = regionp->getOriginGlobal();
@@ -1713,7 +1710,6 @@ void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32
gAgentCamera.updateLookAt(mouse_x, mouse_y);
}
// friends and operators
std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
@@ -2372,7 +2368,7 @@ bool LLAgent::sendMaturityPreferenceToServer(int preferredMaturity)
{
access_prefs["max"] = "A";
}
LLSD body = LLSD::emptyMap();
body["access_prefs"] = access_prefs;
llinfos << "Sending access prefs update to " << (access_prefs["max"].asString()) << " via capability to: "
@@ -2782,7 +2778,6 @@ BOOL LLAgent::allowOperation(PermissionBit op,
return perm.allowOperationBy(op, agent_proxy, group_proxy);
}
void LLAgent::getName(std::string& name)
{
name.clear();
@@ -3470,7 +3465,7 @@ bool LLAgent::teleportCore(bool is_local)
// hide land floater too - it'll be out of date
LLFloaterLand::hideInstance();
LLViewerParcelMgr::getInstance()->deselectLand();
LLViewerMediaFocus::getInstance()->setFocusFace(false, NULL, 0, NULL);
@@ -3728,8 +3723,7 @@ void LLAgent::setTeleportState(ETeleportState state)
}
switch (mTeleportState)
{
{
case TELEPORT_NONE:
mbTeleportKeepsLookAt = false;
break;
@@ -3996,10 +3990,10 @@ void LLAgent::sendAgentSetAppearance()
break;
}
msg->nextBlockFast(_PREHASH_VisualParam );
// We don't send the param ids. Instead, we assume that the receiver has the same params in the same sequence.
const F32 param_value = param->getWeight();
const U8 new_weight = F32_to_U8(param_value, param->getMinWeight(), param->getMaxWeight());
msg->addU8Fast(_PREHASH_ParamValue, new_weight );
transmitted_params++;
}
@@ -4016,7 +4010,7 @@ void LLAgent::sendAgentDataUpdateRequest()
{
gMessageSystem->newMessageFast(_PREHASH_AgentDataUpdateRequest);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() );
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
sendReliableMessage();
}
@@ -4208,4 +4202,3 @@ LLAgentQueryManager::~LLAgentQueryManager()
}
// EOF

View File

@@ -75,11 +75,11 @@
#include "lltoolplacer.h"
#include "lltoolselectland.h"
#include "llui.h"
#include "llviewercontrol.h"
#include "llviewerjoystick.h"
#include "llviewermenu.h"
#include "llviewerparcelmgr.h"
#include "llviewerwindow.h"
#include "llviewercontrol.h"
#include "llviewerjoystick.h"
#include "lluictrlfactory.h"
#include "llmeshrepository.h"
@@ -101,7 +101,9 @@ const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] =
std::string("Content"), // PANEL_CONTENTS,
};
// Local prototypes
void commit_grid_mode(LLUICtrl *ctrl, void*);
void commit_select_component(LLUICtrl *ctrl, void *data);
void click_show_more(void*);
void click_popup_info(void*);
@@ -117,8 +119,7 @@ void click_apply_to_selection(void*);
void commit_radio_zoom(LLUICtrl *, void*);
void commit_radio_orbit(LLUICtrl *, void*);
void commit_radio_pan(LLUICtrl *, void*);
void commit_grid_mode(LLUICtrl *, void*);
void commit_slider_zoom(LLUICtrl *, void*);
void commit_slider_zoom(LLUICtrl *ctrl, void*);
void commit_select_tool(LLUICtrl *ctrl, void *data);
@@ -212,7 +213,6 @@ LLPCode toolData[]={
BOOL LLFloaterTools::postBuild()
{
// Hide until tool selected
setVisible(FALSE);
@@ -223,59 +223,60 @@ BOOL LLFloaterTools::postBuild()
getDragHandle()->setEnabled( !gSavedSettings.getBOOL("ToolboxAutoMove") );
LLRect rect;
mBtnFocus = getChild<LLButton>("button focus");//btn;
mBtnFocus = getChild<LLButton>("button focus");//btn;
childSetAction("button focus",LLFloaterTools::setEditTool, (void*)LLToolCamera::getInstance());
mBtnMove = getChild<LLButton>("button move");
mBtnMove = getChild<LLButton>("button move");
childSetAction("button move",LLFloaterTools::setEditTool, (void*)LLToolGrab::getInstance());
mBtnEdit = getChild<LLButton>("button edit");
mBtnEdit = getChild<LLButton>("button edit");
childSetAction("button edit",LLFloaterTools::setEditTool, (void*)LLToolCompTranslate::getInstance());
mBtnCreate = getChild<LLButton>("button create");
mBtnCreate = getChild<LLButton>("button create");
childSetAction("button create",LLFloaterTools::setEditTool, (void*)LLToolCompCreate::getInstance());
mBtnLand = getChild<LLButton>("button land" );
mBtnLand = getChild<LLButton>("button land" );
childSetAction("button land",LLFloaterTools::setEditTool, (void*)LLToolSelectLand::getInstance());
mTextStatus = getChild<LLTextBox>("text status");
mTextStatus = getChild<LLTextBox>("text status");
childSetCommitCallback("slider zoom",commit_slider_zoom,this);
mRadioZoom = getChild<LLCheckBoxCtrl>("radio zoom");
mRadioZoom = getChild<LLCheckBoxCtrl>("radio zoom");
childSetCommitCallback("radio zoom",commit_radio_zoom,this);
mRadioOrbit = getChild<LLCheckBoxCtrl>("radio orbit");
mRadioOrbit = getChild<LLCheckBoxCtrl>("radio orbit");
childSetCommitCallback("radio orbit",commit_radio_orbit,this);
mRadioPan = getChild<LLCheckBoxCtrl>("radio pan");
mRadioPan = getChild<LLCheckBoxCtrl>("radio pan");
childSetCommitCallback("radio pan",commit_radio_pan,this);
mRadioMove = getChild<LLCheckBoxCtrl>("radio move");
mRadioMove = getChild<LLCheckBoxCtrl>("radio move");
childSetCommitCallback("radio move",click_popup_grab_drag,this);
mRadioLift = getChild<LLCheckBoxCtrl>("radio lift");
mRadioLift = getChild<LLCheckBoxCtrl>("radio lift");
childSetCommitCallback("radio lift",click_popup_grab_lift,this);
mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
mRadioSpin = getChild<LLCheckBoxCtrl>("radio spin");
childSetCommitCallback("radio spin",click_popup_grab_spin,NULL);
mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
mRadioPosition = getChild<LLCheckBoxCtrl>("radio position");
childSetCommitCallback("radio position",commit_select_tool,NULL);
mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
mRadioRotate = getChild<LLCheckBoxCtrl>("radio rotate");
childSetCommitCallback("radio rotate",commit_select_tool,NULL);
mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
mRadioStretch = getChild<LLCheckBoxCtrl>("radio stretch");
childSetCommitCallback("radio stretch",commit_select_tool,NULL);
mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
mRadioSelectFace = getChild<LLCheckBoxCtrl>("radio select face");
childSetCommitCallback("radio select face",commit_select_tool,NULL);
mRadioAlign = getChild<LLCheckBoxCtrl>("radio align");
mRadioAlign = getChild<LLCheckBoxCtrl>("radio align");
childSetCommitCallback("radio align",commit_select_tool,NULL);
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
childSetValue("checkbox edit linked parts",(BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
childSetCommitCallback("checkbox edit linked parts",commit_select_component,this);
mCheckSnapToGrid = getChild<LLCheckBoxCtrl>("checkbox snap to grid");
mCheckSnapToGrid = getChild<LLCheckBoxCtrl>("checkbox snap to grid");
childSetValue("checkbox snap to grid",(BOOL)gSavedSettings.getBOOL("SnapEnabled"));
mBtnGridOptions = getChild<LLButton>("Options...");
mBtnGridOptions = getChild<LLButton>("Options...");
childSetAction("Options...",onClickGridOptions, this);
mCheckStretchUniform = getChild<LLCheckBoxCtrl>("checkbox uniform");
mCheckStretchUniform = getChild<LLCheckBoxCtrl>("checkbox uniform");
childSetValue("checkbox uniform",(BOOL)gSavedSettings.getBOOL("ScaleUniform"));
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
mCheckStretchTexture = getChild<LLCheckBoxCtrl>("checkbox stretch textures");
childSetValue("checkbox stretch textures",(BOOL)gSavedSettings.getBOOL("ScaleStretchTextures"));
mCheckLimitDrag = getChild<LLCheckBoxCtrl>("checkbox limit drag distance");
mCheckLimitDrag = getChild<LLCheckBoxCtrl>("checkbox limit drag distance");
childSetValue("checkbox limit drag distance",(BOOL)gSavedSettings.getBOOL("LimitDragDistance"));
mTextGridMode = getChild<LLTextBox>("text ruler mode");
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
mTextGridMode = getChild<LLTextBox>("text ruler mode");
mComboGridMode = getChild<LLComboBox>("combobox grid mode");
childSetCommitCallback("combobox grid mode",commit_grid_mode, this);
//
// Create Buttons
//
@@ -287,9 +288,7 @@ BOOL LLFloaterTools::postBuild()
{
found->setClickedCallback(boost::bind(&LLFloaterTools::setObjectType, toolData[t]));
mButtons.push_back( found );
}
else
{
}else{
llwarns << "Tool button not found! DOA Pending." << llendl;
}
}
@@ -320,14 +319,14 @@ BOOL LLFloaterTools::postBuild()
mBtnApplyToSelection = getChild<LLButton>("button apply to selection");
childSetAction("button apply to selection",click_apply_to_selection, (void*)0);
mSliderDozerSize = getChild<LLSlider>("slider brush size");
mSliderDozerSize = getChild<LLSlider>("slider brush size");
childSetCommitCallback("slider brush size", commit_slider_dozer_size, (void*)0);
childSetValue( "slider brush size", gSavedSettings.getF32("LandBrushSize"));
mSliderDozerForce = getChild<LLSlider>("slider force");
mSliderDozerForce = getChild<LLSlider>("slider force");
childSetCommitCallback("slider force",commit_slider_dozer_force, (void*)0);
// the setting stores the actual force multiplier, but the slider is logarithmic, so we convert here
childSetValue( "slider force", log10(gSavedSettings.getF32("LandBrushForce")));
childSetValue("slider force", log10(gSavedSettings.getF32("LandBrushForce")));
mTab = getChild<LLTabContainer>("Object Info Tabs");
if(mTab)
@@ -491,7 +490,7 @@ void LLFloaterTools::refresh()
{
value_string = "0"; // An unlinked prim is "link 0".
}
else
else
{
children.push_front(selected->getRootEdit()); // need root in the list too
S32 index = 0;
@@ -514,7 +513,7 @@ void LLFloaterTools::refresh()
}
childSetTextArg("link_num_obj_count", "[DESC]", desc_string);
childSetTextArg("link_num_obj_count", "[NUM]", value_string);
LLStringUtil::format_map_t selection_args;
selection_args["COUNT"] = llformat("%.1d", (S32)prim_count);
if(gMeshRepo.meshRezEnabled())
@@ -597,7 +596,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
childSetVisible("slider zoom", focus_visible);
childSetEnabled("slider zoom", gCameraBtnZoom);
mRadioZoom ->set( !gCameraBtnOrbit &&
mRadioZoom ->set(!gCameraBtnOrbit &&
!gCameraBtnPan &&
!(mask == MASK_ORBIT) &&
!(mask == (MASK_ORBIT | MASK_ALT)) &&
@@ -684,21 +683,21 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
switch (mObjectSelection->getSelectType())
{
case SELECT_TYPE_HUD:
mComboGridMode->add(getString("grid_screen_text"));
mComboGridMode->add(getString("grid_local_text"));
//mComboGridMode->add(getString("grid_reference_text"));
break;
case SELECT_TYPE_WORLD:
mComboGridMode->add(getString("grid_world_text"));
mComboGridMode->add(getString("grid_local_text"));
mComboGridMode->add(getString("grid_reference_text"));
break;
case SELECT_TYPE_ATTACHMENT:
mComboGridMode->add(getString("grid_attachment_text"));
mComboGridMode->add(getString("grid_local_text"));
mComboGridMode->add(getString("grid_reference_text"));
break;
case SELECT_TYPE_HUD:
mComboGridMode->add(getString("grid_screen_text"));
mComboGridMode->add(getString("grid_local_text"));
//mComboGridMode->add(getString("grid_reference_text"));
break;
case SELECT_TYPE_WORLD:
mComboGridMode->add(getString("grid_world_text"));
mComboGridMode->add(getString("grid_local_text"));
mComboGridMode->add(getString("grid_reference_text"));
break;
case SELECT_TYPE_ATTACHMENT:
mComboGridMode->add(getString("grid_attachment_text"));
mComboGridMode->add(getString("grid_local_text"));
mComboGridMode->add(getString("grid_reference_text"));
break;
}
mComboGridMode->setCurrentByIndex(index);
@@ -832,8 +831,8 @@ void LLFloaterTools::onOpen()
mParcelSelection = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection();
mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
// gMenuBarView->setItemVisible(std::string("Tools"), TRUE);
// gMenuBarView->arrange();
//gMenuBarView->setItemVisible(std::string("Tools"), TRUE);
//gMenuBarView->arrange();
}
// virtual
@@ -868,7 +867,7 @@ void LLFloaterTools::onClose(bool app_quitting)
// so manually reset tool to default (pie menu tool)
LLToolMgr::getInstance()->getCurrentToolset()->selectFirstTool();
}
else
else
{
// Switch back to mouselook toolset
LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset);
@@ -963,10 +962,7 @@ void commit_slider_dozer_force(LLUICtrl *ctrl, void*)
gSavedSettings.setF32("LandBrushForce", dozer_force);
}
void click_apply_to_selection(void* user)
void click_apply_to_selection(void*)
{
LLToolBrushLand::getInstance()->modifyLandInSelectionGlobal();
}
@@ -1028,13 +1024,6 @@ void commit_select_component(LLUICtrl *ctrl, void *data)
}
}
void commit_grid_mode(LLUICtrl *ctrl, void *data)
{
LLComboBox* combo = (LLComboBox*)ctrl;
LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
}
// static
void LLFloaterTools::setObjectType( LLPCode pcode )
{
@@ -1043,6 +1032,13 @@ void LLFloaterTools::setObjectType( LLPCode pcode )
gFocusMgr.setMouseCapture(NULL);
}
void commit_grid_mode(LLUICtrl *ctrl, void *data)
{
LLComboBox* combo = (LLComboBox*)ctrl;
LLSelectMgr::getInstance()->setGridMode((EGridMode)combo->getCurrentIndex());
}
// static
void LLFloaterTools::onClickGridOptions(void* data)
{
@@ -1069,25 +1065,25 @@ void LLFloaterTools::onSelectTreesGrass(LLUICtrl*, void*)
{
const std::string &selected = gFloaterTools->mComboTreesGrass->getValue();
LLPCode pcode = LLToolPlacer::getObjectType();
if (pcode == LL_PCODE_LEGACY_TREE)
if (pcode == LL_PCODE_LEGACY_TREE)
{
gSavedSettings.setString("LastTree", selected);
}
else if (pcode == LL_PCODE_LEGACY_GRASS)
}
else if (pcode == LL_PCODE_LEGACY_GRASS)
{
gSavedSettings.setString("LastGrass", selected);
}
}
}
void LLFloaterTools::updateTreeGrassCombo(bool visible)
{
LLTextBox* tree_grass_label = getChild<LLTextBox>("tree_grass_label");
if (visible)
if (visible)
{
LLPCode pcode = LLToolPlacer::getObjectType();
std::map<std::string, S32>::iterator it, end;
std::string selected;
if (pcode == LL_PCODE_LEGACY_TREE)
if (pcode == LL_PCODE_LEGACY_TREE)
{
tree_grass_label->setVisible(visible);
LLButton* button = getChild<LLButton>("ToolTree");
@@ -1096,8 +1092,8 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
selected = gSavedSettings.getString("LastTree");
it = LLVOTree::sSpeciesNames.begin();
end = LLVOTree::sSpeciesNames.end();
}
else if (pcode == LL_PCODE_LEGACY_GRASS)
}
else if (pcode == LL_PCODE_LEGACY_GRASS)
{
tree_grass_label->setVisible(visible);
LLButton* button = getChild<LLButton>("ToolGrass");
@@ -1106,8 +1102,8 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
selected = gSavedSettings.getString("LastGrass");
it = LLVOGrass::sSpeciesNames.begin();
end = LLVOGrass::sSpeciesNames.end();
}
else
}
else
{
mComboTreesGrass->removeall();
mComboTreesGrass->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label
@@ -1122,7 +1118,7 @@ void LLFloaterTools::updateTreeGrassCombo(bool visible)
int select = 0, i = 0;
while (it != end)
while (it != end)
{
const std::string &species = it->first;
mComboTreesGrass->add(species); ++i;

View File

@@ -38,18 +38,18 @@
#include "llparcelselection.h"
class LLButton;
class LLTextBox;
class LLTool;
class LLCheckBoxCtrl;
class LLTabContainer;
class LLComboBox;
class LLPanelPermissions;
class LLPanelObject;
class LLPanelVolume;
class LLPanelContents;
class LLPanelFace;
class LLPanelLandInfo;
class LLComboBox;
class LLSlider;
class LLTabContainer;
class LLTextBox;
class LLTool;
class LLParcelSelection;
class LLObjectSelection;
@@ -72,8 +72,10 @@ public:
virtual ~LLFloaterTools();
virtual void onOpen();
virtual void onClose(bool app_quitting);
virtual BOOL canClose();
virtual void onClose(bool app_quitting);
/*virtual*/ void draw();
virtual void onFocusReceived();
// call this once per frame to handle visibility, rect location,
// button highlights, etc.
@@ -93,24 +95,20 @@ public:
PANEL_COUNT
};
/*virtual*/ void draw();
void dirty();
void showPanel(EInfoPanel panel);
void setStatusText(const std::string& text);
virtual void onFocusReceived();
static void setEditTool(void* data);
void saveLastTool();
private:
private:
void refresh();
static void setObjectType( LLPCode pcode );
static void onClickGridOptions(void* data);
public:
LLButton *mBtnFocus;
LLButton *mBtnMove;
LLButton *mBtnEdit;
@@ -146,6 +144,7 @@ public:
LLCheckBoxCtrl* mCheckStretchTexture;
LLCheckBoxCtrl* mCheckLimitDrag;
LLButton *mBtnRotateLeft;
LLButton *mBtnRotateReset;
LLButton *mBtnRotateRight;

View File

@@ -115,15 +115,6 @@ enum {
MI_VOLUME_COUNT
};
enum {
MI_HOLE_SAME,
MI_HOLE_CIRCLE,
@@ -377,11 +368,6 @@ BOOL LLPanelObject::postBuild()
childSetCommitCallback("sculpt mirror control", onCommitSculptType, this);
mCtrlSculptInvert = getChild<LLCheckBoxCtrl>("sculpt invert control");
childSetCommitCallback("sculpt invert control", onCommitSculptType, this);
// Start with everyone disabled
clearCtrls();
@@ -455,7 +441,7 @@ void LLPanelObject::getState( )
}
LLCalc* calcp = LLCalc::getInstance();
LLVOVolume *volobjp = NULL;
if ( objectp && (objectp->getPCode() == LL_PCODE_VOLUME))
{
@@ -623,6 +609,7 @@ void LLPanelObject::getState( )
childSetVisible("select_single", TRUE);
childSetEnabled("select_single", TRUE);
}
BOOL is_flexible = volobjp && volobjp->isFlexible();
BOOL is_permanent = root_objectp->flagObjectPermanent();
BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
@@ -1231,19 +1218,13 @@ void LLPanelObject::getState( )
default:
if (editable)
{
mSpinScaleX->set( 1.f - scale_x );
mSpinScaleY->set( 1.f - scale_y );
mSpinScaleX->setMinValue(-1.f);
mSpinScaleX->setMaxValue(1.f);
mSpinScaleY->setMinValue(-1.f);
mSpinScaleY->setMaxValue(1.f);
// Torus' Hole Size is Box/Cyl/Prism's Taper
calcp->setVar(LLCalc::X_TAPER, 1.f - scale_x);
calcp->setVar(LLCalc::Y_TAPER, 1.f - scale_y);
@@ -1403,7 +1384,9 @@ void LLPanelObject::getState( )
// sculpt texture
if (selected_item == MI_SCULPT)
{
LLUUID id;
LLUUID id;
LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT);
@@ -1414,10 +1397,11 @@ void LLPanelObject::getState( )
mSculptTextureRevert = sculpt_params->getSculptTexture();
mSculptTypeRevert = sculpt_params->getSculptType();
}
U8 sculpt_type = sculpt_params->getSculptType();
U8 sculpt_stitching = sculpt_type & LL_SCULPT_TYPE_MASK;
BOOL sculpt_invert = sculpt_type & LL_SCULPT_FLAG_INVERT;
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
isMesh = (sculpt_stitching == LL_SCULPT_TYPE_MESH);
LLTextureCtrl* mTextureCtrl = getChild<LLTextureCtrl>("sculpt texture control");
@@ -1465,7 +1449,7 @@ void LLPanelObject::getState( )
mCtrlSculptMirror->setVisible(sculpt_texture_visible && !isMesh);
mCtrlSculptInvert->setVisible(sculpt_texture_visible && !isMesh);
//----------------------------------------------------------------------------
mObject = objectp;
@@ -1473,7 +1457,7 @@ void LLPanelObject::getState( )
}
// static
BOOL LLPanelObject::precommitValidate( LLUICtrl* ctrl, void* userdata )
bool LLPanelObject::precommitValidate( const LLSD& data )
{
// TODO: Richard will fill this in later.
return TRUE; // FALSE means that validation failed and new value should not be commited.
@@ -1612,86 +1596,6 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
U8 path;
switch ( selected_type )
{
case MI_CYLINDER:
profile = LL_PCODE_PROFILE_CIRCLE;
path = LL_PCODE_PATH_LINE;
@@ -1900,7 +1804,7 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
// Scale X,Y
F32 scale_x = mSpinScaleX->get();
F32 scale_y = mSpinScaleY->get();
// <edit>
// <edit>
//if ( was_selected_type == MI_BOX || was_selected_type == MI_CYLINDER || was_selected_type == MI_PRISM)
if ( was_selected_type == MI_BOX || was_selected_type == MI_CYLINDER || was_selected_type == MI_PRISM ||
was_selected_type == MI_SPHERE ||
@@ -1934,7 +1838,6 @@ void LLPanelObject::getVolumeParams(LLVolumeParams& volume_params)
// Revolutions
F32 revolutions = mSpinRevolutions->get();
if ( selected_type == MI_SPHERE )
{
// Snap values to valid sphere parameters.
@@ -2140,7 +2043,7 @@ void LLPanelObject::sendPosition(BOOL btn_down)
LLVector3 newpos(mCtrlPosX->get(), mCtrlPosY->get(), mCtrlPosZ->get());
LLViewerRegion* regionp = mObject->getRegion();
// Clamp the Z height
const F32 height = newpos.mV[VZ];
const F32 min_height = LLWorld::getInstance()->getMinAllowedZ(mObject, mObject->getPositionGlobal());

View File

@@ -63,15 +63,15 @@ public:
void refresh();
static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata);
static bool precommitValidate(const LLSD& data);
static void onCommitLock(LLUICtrl *ctrl, void *data);
static void onCommitPosition( LLUICtrl* ctrl, void* userdata);
static void onCommitScale( LLUICtrl* ctrl, void* userdata);
static void onCommitRotation( LLUICtrl* ctrl, void* userdata);
static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
static void onCommitTemporary( LLUICtrl* ctrl, void* userdata);
static void onCommitPhantom( LLUICtrl* ctrl, void* userdata);
static void onCommitPhysics( LLUICtrl* ctrl, void* userdata);
static void onLinkObj( void* user_data);
static void onUnlinkObj( void* user_data);
@@ -86,8 +86,8 @@ public:
static void onPasteRotClip( void* user_data);
static void onCopyParams( void* user_data);
static void onPasteParams( void* user_data);
static void onCommitParametric( LLUICtrl* ctrl, void* userdata);
static void onCommitParametric(LLUICtrl* ctrl, void* userdata);
static void onCommitMaterial( LLUICtrl* ctrl, void* userdata);
@@ -96,7 +96,7 @@ public:
static void onSelectSculpt( LLUICtrl* ctrl, void* userdata);
static BOOL onDropSculpt( LLUICtrl* ctrl, LLInventoryItem* item, void* ud);
static void onCommitSculptType( LLUICtrl *ctrl, void* userdata);
static void onClickBuildConstants(void *);
static const LLUUID& findItemID(const LLUUID& asset_id);
@@ -109,23 +109,23 @@ protected:
void sendIsPhysical();
void sendIsTemporary();
void sendIsPhantom();
void sendSculpt();
void getVolumeParams(LLVolumeParams& volume_params);
protected:
static LLVector3 mClipboardPos;
static LLVector3 mClipboardSize;
static LLVector3 mClipboardRot;
static LLVolumeParams mClipboardVolumeParams;
static BOOL hasParamClipboard;
S32 mComboMaterialItemCount;
LLTextBox* mLabelMaterial;
LLComboBox* mComboMaterial;
// Per-object options
LLTextBox* mLabelBaseType;
LLComboBox* mComboBaseType;
@@ -189,15 +189,15 @@ protected:
LLButton *mBtnCopyPos;
LLButton *mBtnPastePos;
LLButton *mBtnPastePosClip;
LLButton *mBtnCopySize;
LLButton *mBtnPasteSize;
LLButton *mBtnPasteSizeClip;
LLButton *mBtnCopyRot;
LLButton *mBtnPasteRot;
LLButton *mBtnPasteRotClip;
LLButton *mBtnCopyParams;
LLButton *mBtnPasteParams;
@@ -212,9 +212,6 @@ protected:
LLCheckBoxCtrl *mCtrlSculptMirror;
LLCheckBoxCtrl *mCtrlSculptInvert;
LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
BOOL mIsPhysical; // to avoid sending "physical" when not changed
BOOL mIsTemporary; // to avoid sending "temporary" when not changed

View File

@@ -44,16 +44,15 @@
#include "llmaterialtable.h"
#include "llpermissionsflags.h"
#include "llstring.h"
#include "lltrans.h"
#include "llvolume.h"
#include "m3math.h"
#include "material_codes.h"
// project includes
#include "llagent.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
#include "llcolorswatch.h"
#include "lltexturectrl.h"
#include "llcombobox.h"
#include "llfirstuse.h"
#include "llfocusmgr.h"
@@ -67,6 +66,7 @@
#include "lltool.h"
#include "lltoolcomp.h"
#include "lltoolmgr.h"
#include "lltrans.h"
#include "llui.h"
#include "llviewerobject.h"
#include "llviewerregion.h"
@@ -75,16 +75,16 @@
#include "llworld.h"
#include "pipeline.h"
#include "llviewershadermgr.h"
#include "llnotificationsutil.h"
#include "lldrawpool.h"
#include "lluictrlfactory.h"
#include "lltexturectrl.h"
// For mesh physics
#include "llagent.h"
#include "llviewercontrol.h"
#include "llmeshrepository.h"
#include "llnotificationsutil.h"
#include <boost/bind.hpp>
// "Features" Tab
@@ -189,7 +189,7 @@ BOOL LLPanelVolume::postBuild()
}
LLPanelVolume::LLPanelVolume(const std::string& name)
: LLPanel(name)
: LLPanel(name)
{
setMouseOpaque(FALSE);
@@ -460,7 +460,7 @@ void LLPanelVolume::getState( )
}
// static
BOOL LLPanelVolume::precommitValidate(LLUICtrl* ctrl,void* userdata)
bool LLPanelVolume::precommitValidate( const LLSD& data )
{
// TODO: Richard will fill this in later.
return TRUE; // FALSE means that validation failed and new value should not be commited.
@@ -487,7 +487,7 @@ void LLPanelVolume::refresh()
getChildView("Light Focus")->setVisible( visible);
getChildView("Light Ambiance")->setVisible( visible);
getChildView("light texture control")->setVisible( visible);
bool enable_mesh = false;
LLSD sim_features;
@@ -693,7 +693,6 @@ void LLPanelVolume::onLightSelectColor(LLUICtrl* ctrl, void* userdata)
}
}
void LLPanelVolume::onLightSelectTexture(LLUICtrl* ctrl, void* userdata)
{
LLPanelVolume* self = (LLPanelVolume*) userdata;
@@ -768,6 +767,8 @@ void LLPanelVolume::onCommitLight( LLUICtrl* ctrl, void* userdata )
//self->getChildView("Light Ambiance")->setEnabled(FALSE);
}
}
}
// static

View File

@@ -64,7 +64,7 @@ public:
void sendIsLight();
void sendIsFlexible();
static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata);
static bool precommitValidate(const LLSD& data);
static void onCommitIsLight( LLUICtrl* ctrl, void* userdata);
static void onCommitLight( LLUICtrl* ctrl, void* userdata);
@@ -91,6 +91,7 @@ protected:
void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata);
void handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse);
/*
LLTextBox* mLabelSelectSingleMessage;
// Light
@@ -116,6 +117,7 @@ protected:
LLPointer<LLViewerObject> mObject;
LLPointer<LLViewerObject> mRootObject;
LLTextBox* mComboPhysicsShapeLabel;
LLComboBox* mComboPhysicsShapeType;
LLSpinCtrl* mSpinPhysicsGravity;
LLSpinCtrl* mSpinPhysicsFriction;

View File

@@ -35,10 +35,10 @@
#include "lltoolbrush.h"
#include "lltoolselectland.h"
// library headers
#include "llgl.h"
#include "llnotificationsutil.h"
#include "llrender.h"
#include "message.h"
#include "llagent.h"

View File

@@ -221,7 +221,7 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info)
gViewerWindow->getLeftMouseDown() &&
!freeze_time &&
(hit_obj == gAgentAvatarp ||
(hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf())))
(hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf())))
{
LLToolCamera::getInstance()->mMouseSteering = TRUE;
}

View File

@@ -1140,7 +1140,7 @@ void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, co
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectGrab);
msg->nextBlockFast(_PREHASH_AgentData);
msg->nextBlockFast( _PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast( _PREHASH_ObjectData);
@@ -1169,6 +1169,7 @@ void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, co
*/
}
void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick)
{
if (!object) return;
@@ -1190,3 +1191,6 @@ void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick)
msg->addVector3("Binormal", pick.mBinormal);
msg->sendMessage(object->getRegion()->getHost());
}

View File

@@ -34,8 +34,9 @@
#include "lltoolmgr.h"
#include "lltool.h"
#include "llfirstuse.h"
// tools and manipulators
#include "lltool.h"
#include "llmanipscale.h"
#include "llselectmgr.h"
#include "lltoolbrush.h"
@@ -59,7 +60,6 @@
#include "llviewerjoystick.h"
#include "llviewermenu.h"
#include "llviewerparcelmgr.h"
#include "llfirstuse.h"
#include "llfloatertools.h"
#include "rlvhandler.h"
@@ -315,7 +315,7 @@ void LLToolMgr::toggleBuildMode()
{
handle_toggle_flycam();
}
if (gAgentCamera.getFocusOnAvatar())
{
// zoom in if we're looking at the avatar
@@ -514,3 +514,7 @@ void LLToolset::selectPrevTool()
selectToolByIndex((S32)mToolList.size()-1);
}
}
////////////////////////////////////////////////////////////////////////////

View File

@@ -189,6 +189,7 @@ S32 LLToolPlacer::getTreeGrassSpecies(std::map<std::string, S32> &table, const c
return (rand() % max);
}
}
BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
{
LLVector3 ray_start_region;
@@ -224,7 +225,6 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
// Set params for new object based on its PCode.
LLQuaternion rotation;
LLVector3 scale = DEFAULT_OBJECT_SCALE;
U8 material = LL_MCODE_WOOD;
static LLCachedControl<bool> enable_BP("LiruEnableBuildPrefs", true);
static LLCachedControl<bool> duplicate("CreateToolCopySelection", true);
@@ -486,6 +486,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
//If we are using the defaults, and we aren't duplicating
if(enable_BP && !duplicate) //then, actually call expectRez so that importtracker can do its thing, which sadly only works close up.
gImportTracker.expectRez();
// Spawns a message, so must be after above send
if (create_selected)
{

View File

@@ -108,7 +108,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
}
}
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (object) && ((!object->isAttachment()) || (!object->permYouOwner())) &&
(dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > 1.5f * 1.5f) )
{
@@ -265,7 +265,7 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
} //if(!object)
// Cleanup temp select settings above.
if (temp_select || LLSelectMgr::getInstance()->mAllowSelectAvatar)
if (temp_select ||LLSelectMgr::getInstance()->mAllowSelectAvatar)
{
gSavedSettings.setBOOL("SelectOwnedOnly", select_owned);
gSavedSettings.setBOOL("SelectMovableOnly", select_movable);

View File

@@ -178,7 +178,7 @@ void display_startup()
void display_update_camera(bool tiling=false)
{
llpushcallstacks ;
llpushcallstacks;
// TODO: cut draw distance down if customizing avatar?
// TODO: cut draw distance on per-parcel basis?
@@ -289,8 +289,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
stop_glerror();
gPipeline.disableLights();
//reset vertex buffers if needed
//reset vertex buffers if needed
gPipeline.doResetVertexBuffers();
stop_glerror();
@@ -620,6 +620,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
gViewerWindow->setup3DViewport();
gPipeline.resetFrameStats(); // Reset per-frame statistics.
if (!gDisconnected)
{
LLAppViewer::instance()->pingMainloopTimeout("Display:Update");
@@ -644,7 +645,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
LLHUDManager::getInstance()->updateEffects();
LLHUDObject::updateAll();
stop_glerror();
if(!tiling)
{
gFrameStats.start(LLFrameStats::UPDATE_GEOM);
@@ -706,7 +707,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
BOOL to_texture = gPipeline.canUseVertexShaders() &&
BOOL to_texture = gPipeline.canUseVertexShaders() &&
LLPipeline::sRenderGlow;
LLAppViewer::instance()->pingMainloopTimeout("Display:Swap");
@@ -823,6 +824,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
llpushcallstacks ;
LLGLState::checkStates();
LLGLState::checkClientArrays();
///////////////////////////////////
//
// StateSort
@@ -1002,6 +1004,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
gGL.getTexUnit((U32)i)->disable();
}
}
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderFlush");
if (to_texture)
@@ -1032,7 +1035,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
}
}
//gGL.flush();
if (LLPipeline::sRenderDeferred && !LLPipeline::sUnderWaterRender)
{
gPipeline.renderDeferredLighting();
@@ -1046,7 +1049,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
LLFastTimer t(FTM_RENDER_UI);
gFrameStats.start(LLFrameStats::RENDER_UI);
render_ui();
}
}
LLSpatialGroup::sNoDelete = FALSE;
@@ -1054,7 +1057,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
gPipeline.rebuildGroups();
}
LLAppViewer::instance()->pingMainloopTimeout("Display:FrameStats");
gFrameStats.start(LLFrameStats::MISC_END);
@@ -1263,6 +1266,7 @@ BOOL setup_hud_matrices(const LLRect& screen_region)
}
static LLFastTimer::DeclareTimer FTM_SWAP("Swap");
void render_ui(F32 zoom_factor, int subfield, bool tiling)
{
LLGLState::checkStates();
@@ -1301,7 +1305,6 @@ void render_ui(F32 zoom_factor, int subfield, bool tiling)
}
{
gGL.color4f(1,1,1,1);
if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{