Hold shift to select rigged mesh with SGAllowRiggedMeshSelection = 1
Old behavior + shift with = 2 Thanks for the contribution, Router!
This commit is contained in:
@@ -55,11 +55,14 @@
|
||||
<key>SGAllowRiggedMeshSelection</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Allow selection of worn rigged meshes in build or inspect mode</string>
|
||||
<string>Rigged mesh selection behavior:
|
||||
0 = Never select,
|
||||
1 = Hold shift to select,
|
||||
2 = Hold shift or have build or inspect floater open</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<string>S32</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
|
||||
@@ -3512,7 +3512,8 @@ public:
|
||||
if (vobj->isAvatar())
|
||||
{
|
||||
LLVOAvatar* avatar = (LLVOAvatar*) vobj;
|
||||
if (gFloaterTools->getVisible() || LLFloaterInspect::findInstance())
|
||||
bool allow_rigged_pick();
|
||||
if (allow_rigged_pick())
|
||||
{
|
||||
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
|
||||
if (hit)
|
||||
|
||||
@@ -2339,7 +2339,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
|
||||
LLVector4a* normal,
|
||||
LLVector4a* tangent)
|
||||
{
|
||||
static const LLCachedControl<bool> allow_mesh_picking("SGAllowRiggedMeshSelection");
|
||||
static const LLCachedControl<S32> allow_mesh_picking("SGAllowRiggedMeshSelection", 0);
|
||||
|
||||
if (!allow_mesh_picking || (isSelf() && !gAgent.needsRenderAvatar()))
|
||||
{
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
#include "llmaterialmgr.h"
|
||||
#include "llsculptidsize.h"
|
||||
|
||||
#include "llkeyboard.h" // For allow_rigged_pick()
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d)
|
||||
#include "rlvhandler.h"
|
||||
#include "rlvlocks.h"
|
||||
@@ -4283,6 +4285,11 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool allow_rigged_pick()
|
||||
{
|
||||
static const LLCachedControl<S32> allow_mesh_picking("SGAllowRiggedMeshSelection", 0);
|
||||
return allow_mesh_picking && (gKeyboard->currentMask(true) == MASK_SHIFT || (allow_mesh_picking !=1 && (gFloaterTools->getVisible() || LLFloaterInspect::findInstance())));
|
||||
}
|
||||
|
||||
BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, S32 face, BOOL pick_transparent, S32 *face_hitp,
|
||||
LLVector4a* intersection,LLVector2* tex_coord, LLVector4a* normal, LLVector4a* tangent)
|
||||
@@ -4310,15 +4317,14 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
|
||||
|
||||
if (mDrawable->isState(LLDrawable::RIGGED))
|
||||
{
|
||||
static const LLCachedControl<bool> allow_mesh_picking("SGAllowRiggedMeshSelection");
|
||||
if (allow_mesh_picking && (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()))
|
||||
if (allow_rigged_pick())
|
||||
{
|
||||
updateRiggedVolume(true);
|
||||
volume = mRiggedVolume;
|
||||
transform = false;
|
||||
}
|
||||
else
|
||||
{ //cannot pick rigged attachments on other avatars or when not in build mode
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user