From b0e47ec2c26a05a1aa98436ba092f1f01c3ac8aa Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 19 Dec 2017 13:33:54 +0000 Subject: SL-713, MAINT-7709 - experimental setting to allow left-click interaction with animesh. Disabled by default. Still doesn't work in all cases and has significant performance impact --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/lltooldraganddrop.cpp | 2 +- indra/newview/lltoolpie.cpp | 20 +++++++++++++++----- indra/newview/lltoolselect.cpp | 4 +++- indra/newview/lltoolselectrect.cpp | 4 +++- indra/newview/llviewerwindow.cpp | 4 +++- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2fe01ab22f..d155763053 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2204,6 +2204,17 @@ Value 0 + AnimatedObjectsAllowLeftClick + + Comment + Allow left-click interaction with animated objects. Uncertain how much performance impact this will have. + Persist + 1 + Type + Boolean + Value + 0 + DebugAvatarAppearanceMessage Comment diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index bd68d8c999..efbb8c856a 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -785,7 +785,7 @@ void LLToolDragAndDrop::dragOrDrop3D( S32 x, S32 y, MASK mask, BOOL drop, EAccep mDrop = drop; if (mDrop) { - // don't allow drag and drop onto transparent objects + // don't allow drag and drop onto rigged or transparent objects pick(gViewerWindow->pickImmediate(x, y, FALSE, FALSE)); } else diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 0e169408ff..238e1d0306 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -111,9 +111,12 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) mMouseOutsideSlop = FALSE; mMouseDownX = x; mMouseDownY = y; - + LLTimer pick_timer; + // AXON experimental feature + BOOL pick_rigged = gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); //left mouse down always picks transparent (but see handleMouseUp) - mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + mPick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged); + LL_INFOS() << "pick_rigged is " << (S32) pick_rigged << " pick time elapsed " << pick_timer.getElapsedTimeF32() << LL_ENDL; mPick.mKeyMask = mask; mMouseButtonDown = true; @@ -128,7 +131,10 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask) { // don't pick transparent so users can't "pay" transparent objects - mPick = gViewerWindow->pickImmediate(x, y, /*BOOL pick_transparent*/ FALSE, /*BOOL pick_rigged*/ TRUE, /*BOOL pick_particle*/ TRUE); + mPick = gViewerWindow->pickImmediate(x, y, + /*BOOL pick_transparent*/ FALSE, + /*BOOL pick_rigged*/ TRUE, + /*BOOL pick_particle*/ TRUE); mPick.mKeyMask = mask; // claim not handled so UI focus stays same @@ -538,7 +544,9 @@ void LLToolPie::selectionPropertiesReceived() BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) { - mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE); + // AXON experimental feature + BOOL pick_rigged = gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + mHoverPick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged); LLViewerObject *parent = NULL; LLViewerObject *object = mHoverPick.getObject(); LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace); @@ -584,7 +592,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) else { // perform a separate pick that detects transparent objects since they respond to 1-click actions - LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged); LLViewerObject* click_action_object = click_action_pick.getObject(); @@ -670,6 +678,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) LLPickInfo savedPick = mPick; mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY, FALSE /* ignore transparent */, + FALSE /* ignore rigged */, FALSE /* ignore particles */); if (!mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick @@ -759,6 +768,7 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) LLPickInfo savedPick = mPick; mPick = gViewerWindow->pickImmediate(savedPick.mMousePt.mX, savedPick.mMousePt.mY, FALSE /* ignore transparent */, + FALSE /* ignore rigged */, FALSE /* ignore particles */); if(mPick.mPickType == LLPickInfo::PICK_OBJECT) diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 1fcc9a0711..aa0e9f5c09 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -63,7 +63,9 @@ LLToolSelect::LLToolSelect( LLToolComposite* composite ) BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask) { // do immediate pick query - mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE); + // AXON experimental feature + BOOL pick_rigged = gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + mPick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged); // Pass mousedown to agent LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index 71dc8001d4..d655dd881e 100644 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -71,7 +71,9 @@ void dialog_refresh_all(void); BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask) { - handlePick(gViewerWindow->pickImmediate(x, y, TRUE, FALSE)); + // AXON experimental feature + BOOL pick_rigged = gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick"); + handlePick(gViewerWindow->pickImmediate(x, y, TRUE /* pick_transparent */, pick_rigged)); LLTool::handleMouseDown(x, y, mask); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7b4895b862..7c3bfd1849 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1156,7 +1156,9 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (prim_media_dnd_enabled) { - LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, TRUE /*BOOL pick_transparent*/, FALSE ); + LLPickInfo pick_info = pickImmediate( pos.mX, pos.mY, + TRUE /* pick_transparent */, + FALSE /* pick_rigged */); LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; -- cgit v1.2.3