aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmanipscale.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llmanipscale.cpp112
1 files changed, 63 insertions, 49 deletions
diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp
index f143c5a..d520fbe 100644
--- a/linden/indra/newview/llmanipscale.cpp
+++ b/linden/indra/newview/llmanipscale.cpp
@@ -159,6 +159,7 @@ void LLManipScale::handleSelect()
159 updateSnapGuides(bbox); 159 updateSnapGuides(bbox);
160 gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); 160 gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
161 gFloaterTools->setStatusText("Click and drag to stretch selected side"); 161 gFloaterTools->setStatusText("Click and drag to stretch selected side");
162 LLManip::handleSelect();
162} 163}
163 164
164void LLManipScale::handleDeselect() 165void LLManipScale::handleDeselect()
@@ -166,6 +167,7 @@ void LLManipScale::handleDeselect()
166 mHighlightedPart = LL_NO_PART; 167 mHighlightedPart = LL_NO_PART;
167 mManipPart = LL_NO_PART; 168 mManipPart = LL_NO_PART;
168 gFloaterTools->setStatusText(""); 169 gFloaterTools->setStatusText("");
170 LLManip::handleDeselect();
169} 171}
170 172
171BOOL sort_manip_by_z(LLManipScale::ManipulatorHandle *new_manip, LLManipScale::ManipulatorHandle *test_manip) 173BOOL sort_manip_by_z(LLManipScale::ManipulatorHandle *new_manip, LLManipScale::ManipulatorHandle *test_manip)
@@ -215,7 +217,7 @@ void LLManipScale::render()
215 { 217 {
216 glMatrixMode(GL_MODELVIEW); 218 glMatrixMode(GL_MODELVIEW);
217 glPushMatrix(); 219 glPushMatrix();
218 if (gSelectMgr->getSelectType() == SELECT_TYPE_HUD) 220 if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
219 { 221 {
220 F32 zoom = gAgent.getAvatarObject()->mHUDCurZoom; 222 F32 zoom = gAgent.getAvatarObject()->mHUDCurZoom;
221 glScalef(zoom, zoom, zoom); 223 glScalef(zoom, zoom, zoom);
@@ -231,7 +233,7 @@ void LLManipScale::render()
231 233
232 F32 range; 234 F32 range;
233 F32 range_from_agent; 235 F32 range_from_agent;
234 if (gSelectMgr->getSelectType() == SELECT_TYPE_HUD) 236 if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
235 { 237 {
236 mBoxHandleSize = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR / (F32) gCamera->getViewHeightInPixels(); 238 mBoxHandleSize = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR / (F32) gCamera->getViewHeightInPixels();
237 mBoxHandleSize /= gAgent.getAvatarObject()->mHUDCurZoom; 239 mBoxHandleSize /= gAgent.getAvatarObject()->mHUDCurZoom;
@@ -330,10 +332,10 @@ BOOL LLManipScale::handleMouseDown(S32 x, S32 y, MASK mask)
330// Assumes that one of the arrows on an object was hit. 332// Assumes that one of the arrows on an object was hit.
331BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) 333BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask )
332{ 334{
333 BOOL can_scale = gSelectMgr->getObjectCount() != 0; 335 BOOL can_scale = mObjectSelection->getObjectCount() != 0;
334 for (LLViewerObject* objectp = gSelectMgr->getFirstObject(); 336 for (LLViewerObject* objectp = mObjectSelection->getFirstObject();
335 objectp; 337 objectp;
336 objectp = gSelectMgr->getNextObject()) 338 objectp = mObjectSelection->getNextObject())
337 { 339 {
338 can_scale = can_scale && objectp->permModify() && objectp->permMove() && !objectp->isSeat(); 340 can_scale = can_scale && objectp->permModify() && objectp->permMove() && !objectp->isSeat();
339 } 341 }
@@ -377,15 +379,27 @@ BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask)
377 // first, perform normal processing in case this was a quick-click 379 // first, perform normal processing in case this was a quick-click
378 handleHover(x, y, mask); 380 handleHover(x, y, mask);
379 381
382 if( (LL_FACE_MIN <= (S32)mManipPart)
383 && ((S32)mManipPart <= LL_FACE_MAX) )
384 {
385 sendUpdates(TRUE,TRUE,FALSE);
386 }
387 else
388 if( (LL_CORNER_MIN <= (S32)mManipPart)
389 && ((S32)mManipPart <= LL_CORNER_MAX) )
390 {
391 sendUpdates(TRUE,TRUE,TRUE);
392 }
393
394 //send texture update
395 gSelectMgr->adjustTexturesByScale(TRUE, getStretchTextures());
396
380 gSelectMgr->enableSilhouette(TRUE); 397 gSelectMgr->enableSilhouette(TRUE);
381 mManipPart = LL_NO_PART; 398 mManipPart = LL_NO_PART;
382 399
383 // Might have missed last update due to UPDATE_DELAY timing 400 // Might have missed last update due to UPDATE_DELAY timing
384 if (mSendUpdateOnMouseUp) 401 gSelectMgr->sendMultipleUpdate( mLastUpdateFlags );
385 { 402
386 gSelectMgr->sendMultipleUpdate( mLastUpdateFlags );
387 }
388
389 //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); 403 //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject"));
390 gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); 404 gSelectMgr->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK);
391 return LLManip::handleMouseUp(x, y, mask); 405 return LLManip::handleMouseUp(x, y, mask);
@@ -396,7 +410,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
396{ 410{
397 if( hasMouseCapture() ) 411 if( hasMouseCapture() )
398 { 412 {
399 if( gSelectMgr->isEmpty() ) 413 if( mObjectSelection->isEmpty() )
400 { 414 {
401 // Somehow the object got deselected while we were dragging it. 415 // Somehow the object got deselected while we were dragging it.
402 setMouseCapture( FALSE ); 416 setMouseCapture( FALSE );
@@ -415,7 +429,7 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask)
415 } 429 }
416 430
417 // Patch up textures, if possible. 431 // Patch up textures, if possible.
418 gSelectMgr->adjustTexturesByScale(TRUE, getStretchTextures()); 432 gSelectMgr->adjustTexturesByScale(FALSE, getStretchTextures());
419 433
420 gViewerWindow->getWindow()->setCursor(UI_CURSOR_TOOLSCALE); 434 gViewerWindow->getWindow()->setCursor(UI_CURSOR_TOOLSCALE);
421 return TRUE; 435 return TRUE;
@@ -432,7 +446,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
432 if( isSelectionScalable() ) 446 if( isSelectionScalable() )
433 { 447 {
434 LLMatrix4 transform; 448 LLMatrix4 transform;
435 if (gSelectMgr->getSelectType() == SELECT_TYPE_HUD) 449 if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
436 { 450 {
437 LLVector4 translation(bbox.getPositionAgent()); 451 LLVector4 translation(bbox.getPositionAgent());
438 transform.initRotTrans(bbox.getRotation(), translation); 452 transform.initRotTrans(bbox.getRotation(), translation);
@@ -473,7 +487,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
473 mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], max.mV[VY], max.mV[VZ], 1.f); 487 mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], max.mV[VY], max.mV[VZ], 1.f);
474 488
475 // 1-D highlights are applicable iff one object is selected 489 // 1-D highlights are applicable iff one object is selected
476 if( gSelectMgr->getObjectCount() == 1 ) 490 if( mObjectSelection->getObjectCount() == 1 )
477 { 491 {
478 // face centers 492 // face centers
479 mManipulatorVertices[numManips++] = LLVector4(ctr.mV[VX], ctr.mV[VY], max.mV[VZ], 1.f); 493 mManipulatorVertices[numManips++] = LLVector4(ctr.mV[VX], ctr.mV[VY], max.mV[VZ], 1.f);
@@ -539,7 +553,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox )
539{ 553{
540 // Don't bother to render the drag handles for 1-D scaling if 554 // Don't bother to render the drag handles for 1-D scaling if
541 // more than one object is selected or if it is an attachment 555 // more than one object is selected or if it is an attachment
542 if ( gSelectMgr->getObjectCount() > 1 ) 556 if ( mObjectSelection->getObjectCount() > 1 )
543 { 557 {
544 return; 558 return;
545 } 559 }
@@ -806,8 +820,21 @@ void LLManipScale::drag( S32 x, S32 y )
806 dragCorner( x, y ); 820 dragCorner( x, y );
807 } 821 }
808 822
809 //gAgent.setObjectTracking(FALSE); 823 // store changes to override updates
810 gAgent.clearFocusObject(); 824 for (LLSelectNode* selectNode = gSelectMgr->getSelection()->getFirstNode();
825 selectNode != NULL;
826 selectNode = gSelectMgr->getSelection()->getNextNode())
827 {
828 LLViewerObject*cur = selectNode->getObject();
829 if( cur->permModify() && cur->permMove() && !cur->isAvatar())
830 {
831 selectNode->mLastScale = cur->getScale();
832 selectNode->mLastPositionLocal = cur->getPosition();
833 }
834 }
835
836 gSelectMgr->updateSelectionCenter();
837 gAgent.clearFocusObject();
811} 838}
812 839
813// Scale around the 840// Scale around the
@@ -818,10 +845,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
818 // Suppress scale if mouse hasn't moved. 845 // Suppress scale if mouse hasn't moved.
819 if (x == mLastMouseX && y == mLastMouseY) 846 if (x == mLastMouseX && y == mLastMouseY)
820 { 847 {
821 if (mSendUpdateOnMouseUp) 848 // sendUpdates(TRUE,TRUE,TRUE);
822 {
823 sendUpdates(TRUE,TRUE,TRUE);
824 }
825 return; 849 return;
826 } 850 }
827 851
@@ -945,7 +969,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
945 969
946 // find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale 970 // find max and min scale factors that will make biggest object hit max absolute scale and smallest object hit min absolute scale
947 LLSelectNode* selectNode; 971 LLSelectNode* selectNode;
948 for( selectNode = gSelectMgr->getFirstNode(); selectNode; selectNode = gSelectMgr->getNextNode() ) 972 for( selectNode = mObjectSelection->getFirstNode(); selectNode; selectNode = mObjectSelection->getNextNode() )
949 { 973 {
950 LLViewerObject* cur = selectNode->getObject(); 974 LLViewerObject* cur = selectNode->getObject();
951 if( cur->permModify() && cur->permMove() && !cur->isAvatar() ) 975 if( cur->permModify() && cur->permMove() && !cur->isAvatar() )
@@ -965,7 +989,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
965 LLVector3d drag_global = uniform ? mDragStartCenterGlobal : mDragFarHitGlobal; 989 LLVector3d drag_global = uniform ? mDragStartCenterGlobal : mDragFarHitGlobal;
966 990
967 // do the root objects i.e. (TRUE == cur->isRootEdit()) 991 // do the root objects i.e. (TRUE == cur->isRootEdit())
968 for( selectNode = gSelectMgr->getFirstNode(); selectNode; selectNode = gSelectMgr->getNextNode() ) 992 for( selectNode = mObjectSelection->getFirstNode(); selectNode; selectNode = mObjectSelection->getNextNode() )
969 { 993 {
970 LLViewerObject* cur = selectNode->getObject(); 994 LLViewerObject* cur = selectNode->getObject();
971 if( cur->permModify() && cur->permMove() && !cur->isAvatar() && cur->isRootEdit() ) 995 if( cur->permModify() && cur->permMove() && !cur->isAvatar() && cur->isRootEdit() )
@@ -1009,7 +1033,7 @@ void LLManipScale::dragCorner( S32 x, S32 y )
1009 } 1033 }
1010 } 1034 }
1011 // do the child objects i.e. (FALSE == cur->isRootEdit()) 1035 // do the child objects i.e. (FALSE == cur->isRootEdit())
1012 for( selectNode = gSelectMgr->getFirstNode(); selectNode; selectNode = gSelectMgr->getNextNode() ) 1036 for( selectNode = mObjectSelection->getFirstNode(); selectNode; selectNode = mObjectSelection->getNextNode() )
1013 { 1037 {
1014 LLViewerObject*cur = selectNode->getObject(); 1038 LLViewerObject*cur = selectNode->getObject();
1015 if( cur->permModify() && cur->permMove() && !cur->isAvatar() && !cur->isRootEdit() ) 1039 if( cur->permModify() && cur->permMove() && !cur->isAvatar() && !cur->isRootEdit() )
@@ -1020,11 +1044,8 @@ void LLManipScale::dragCorner( S32 x, S32 y )
1020 if (!selectNode->mIndividualSelection) 1044 if (!selectNode->mIndividualSelection)
1021 { 1045 {
1022 cur->setPosition(selectNode->mSavedPositionLocal * scale_factor); 1046 cur->setPosition(selectNode->mSavedPositionLocal * scale_factor);
1023 continue;
1024 } 1047 }
1025 1048
1026 LLVector3d new_pos_global = drag_global + (selectNode->mSavedPositionGlobal - drag_global) * scale_factor;
1027 cur->setPositionAbsoluteGlobal( new_pos_global );
1028 rebuild(cur); 1049 rebuild(cur);
1029 } 1050 }
1030 } 1051 }
@@ -1032,8 +1053,6 @@ void LLManipScale::dragCorner( S32 x, S32 y )
1032 1053
1033 1054
1034 mDragPointGlobal = drag_point_global; 1055 mDragPointGlobal = drag_point_global;
1035
1036 sendUpdates( TRUE, TRUE, TRUE );
1037} 1056}
1038 1057
1039 1058
@@ -1042,10 +1061,7 @@ void LLManipScale::dragFace( S32 x, S32 y )
1042 // Suppress scale if mouse hasn't moved. 1061 // Suppress scale if mouse hasn't moved.
1043 if (x == mLastMouseX && y == mLastMouseY) 1062 if (x == mLastMouseX && y == mLastMouseY)
1044 { 1063 {
1045 if (mSendUpdateOnMouseUp) 1064 // sendUpdates(TRUE,TRUE,FALSE);
1046 {
1047 sendUpdates(TRUE,TRUE,FALSE);
1048 }
1049 return; 1065 return;
1050 } 1066 }
1051 1067
@@ -1179,8 +1195,6 @@ void LLManipScale::dragFace( S32 x, S32 y )
1179 send_scale_update = TRUE; 1195 send_scale_update = TRUE;
1180 1196
1181 mDragPointGlobal = drag_point_global; 1197 mDragPointGlobal = drag_point_global;
1182
1183 sendUpdates( send_position_update, send_scale_update );
1184} 1198}
1185 1199
1186void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_update, BOOL corner ) 1200void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_update, BOOL corner )
@@ -1215,8 +1229,6 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat
1215 { 1229 {
1216 mSendUpdateOnMouseUp = TRUE; 1230 mSendUpdateOnMouseUp = TRUE;
1217 } 1231 }
1218
1219 gSelectMgr->updateSelectionCenter();
1220 dialog_refresh_all(); 1232 dialog_refresh_all();
1221 } 1233 }
1222} 1234}
@@ -1228,7 +1240,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto
1228 LLVector3 drag_start_center_agent = gAgent.getPosAgentFromGlobal(mDragStartCenterGlobal); 1240 LLVector3 drag_start_center_agent = gAgent.getPosAgentFromGlobal(mDragStartCenterGlobal);
1229 1241
1230 LLSelectNode *selectNode; 1242 LLSelectNode *selectNode;
1231 for( selectNode = gSelectMgr->getFirstNode(); selectNode; selectNode = gSelectMgr->getNextNode() ) 1243 for( selectNode = mObjectSelection->getFirstNode(); selectNode; selectNode = mObjectSelection->getNextNode() )
1232 { 1244 {
1233 LLViewerObject*cur = selectNode->getObject(); 1245 LLViewerObject*cur = selectNode->getObject();
1234 if( cur->permModify() && cur->permMove() && !cur->isAvatar() ) 1246 if( cur->permModify() && cur->permMove() && !cur->isAvatar() )
@@ -1349,7 +1361,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
1349 mScaleDir = box_corner_agent - mScaleCenter; 1361 mScaleDir = box_corner_agent - mScaleCenter;
1350 mScaleDir.normVec(); 1362 mScaleDir.normVec();
1351 1363
1352 if(gSelectMgr->getSelectType() == SELECT_TYPE_HUD) 1364 if(mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
1353 { 1365 {
1354 mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgent.getAvatarObject()->mHUDCurZoom; 1366 mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgent.getAvatarObject()->mHUDCurZoom;
1355 1367
@@ -1361,7 +1373,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
1361 } 1373 }
1362 LLVector3 cam_at_axis; 1374 LLVector3 cam_at_axis;
1363 F32 snap_guide_length; 1375 F32 snap_guide_length;
1364 if (gSelectMgr->getSelectType() == SELECT_TYPE_HUD) 1376 if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
1365 { 1377 {
1366 cam_at_axis.setVec(1.f, 0.f, 0.f); 1378 cam_at_axis.setVec(1.f, 0.f, 0.f);
1367 snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgent.getAvatarObject()->mHUDCurZoom; 1379 snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgent.getAvatarObject()->mHUDCurZoom;
@@ -1408,7 +1420,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
1408 { 1420 {
1409 LLVector3 local_scale_dir = partToUnitVector( mManipPart ); 1421 LLVector3 local_scale_dir = partToUnitVector( mManipPart );
1410 LLVector3 local_camera_dir; 1422 LLVector3 local_camera_dir;
1411 if (gSelectMgr->getSelectType() == SELECT_TYPE_HUD) 1423 if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
1412 { 1424 {
1413 local_camera_dir = LLVector3(-1.f, 0.f, 0.f) * ~bbox.getRotation(); 1425 local_camera_dir = LLVector3(-1.f, 0.f, 0.f) * ~bbox.getRotation();
1414 } 1426 }
@@ -1687,7 +1699,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1687 start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1)); 1699 start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1));
1688 stop_tick = llmin(max_ticks1, num_ticks_per_side1); 1700 stop_tick = llmin(max_ticks1, num_ticks_per_side1);
1689 1701
1690 F32 grid_resolution = gSelectMgr->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f); 1702 F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f);
1691 S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / (mScaleSnapUnit1 / max_subdivisions)); 1703 S32 label_sub_div_offset_1 = llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / (mScaleSnapUnit1 / max_subdivisions));
1692 S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / (mScaleSnapUnit2 / max_subdivisions)); 1704 S32 label_sub_div_offset_2 = llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / (mScaleSnapUnit2 / max_subdivisions));
1693 1705
@@ -1793,7 +1805,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1793 1805
1794 1806
1795 // render help text 1807 // render help text
1796 if (gSelectMgr->getSelectType() != SELECT_TYPE_HUD) 1808 if (mObjectSelection->getSelectType() != SELECT_TYPE_HUD)
1797 { 1809 {
1798 if (mHelpTextTimer.getElapsedTimeF32() < sHelpTextVisibleTime + sHelpTextFadeTime && sNumTimesHelpTextShown < sMaxTimesShowHelpText) 1810 if (mHelpTextTimer.getElapsedTimeF32() < sHelpTextVisibleTime + sHelpTextFadeTime && sNumTimesHelpTextShown < sMaxTimesShowHelpText)
1799 { 1811 {
@@ -1815,10 +1827,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1815 std::string help_text = "Move mouse cursor over ruler"; 1827 std::string help_text = "Move mouse cursor over ruler";
1816 LLColor4 help_text_color = LLColor4::white; 1828 LLColor4 help_text_color = LLColor4::white;
1817 help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f); 1829 help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f);
1818 hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, gSelectMgr->getSelectType() == SELECT_TYPE_HUD); 1830 hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
1819 help_text = "to snap to grid"; 1831 help_text = "to snap to grid";
1820 help_text_pos -= gCamera->getUpAxis() * mSnapRegimeOffset * 0.4f; 1832 help_text_pos -= gCamera->getUpAxis() * mSnapRegimeOffset * 0.4f;
1821 hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, gSelectMgr->getSelectType() == SELECT_TYPE_HUD); 1833 hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
1822 } 1834 }
1823 } 1835 }
1824 } 1836 }
@@ -2022,14 +2034,16 @@ LLVector3 LLManipScale::nearestAxis( const LLVector3& v ) const
2022 return LLVector3( coords[greatest_index] ); 2034 return LLVector3( coords[greatest_index] );
2023} 2035}
2024 2036
2025BOOL LLManipScale::isSelectionScalable() const 2037//FIXME: make this const once we switch to iterator interface
2038//(making object traversal a const-able operation)
2039BOOL LLManipScale::isSelectionScalable()
2026{ 2040{
2027 // An selection is scalable if you are allowed to both edit and move 2041 // An selection is scalable if you are allowed to both edit and move
2028 // everything in it, and it does not have any sitting agents 2042 // everything in it, and it does not have any sitting agents
2029 BOOL scalable = gSelectMgr->getFirstObject() ? TRUE : FALSE; 2043 BOOL scalable = mObjectSelection->getFirstObject() ? TRUE : FALSE;
2030 for(LLViewerObject* cur = gSelectMgr->getFirstObject(); 2044 for(LLViewerObject* cur = mObjectSelection->getFirstObject();
2031 cur; 2045 cur;
2032 cur = gSelectMgr->getNextObject() ) 2046 cur = mObjectSelection->getNextObject() )
2033 { 2047 {
2034 if( !(cur->permModify() && cur->permMove()) 2048 if( !(cur->permModify() && cur->permMove())
2035 || cur->isSeat()) 2049 || cur->isSeat())