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>
|
<key>SGAllowRiggedMeshSelection</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<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>
|
<key>Persist</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>Boolean</string>
|
<string>S32</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
|
|||||||
@@ -3512,7 +3512,8 @@ public:
|
|||||||
if (vobj->isAvatar())
|
if (vobj->isAvatar())
|
||||||
{
|
{
|
||||||
LLVOAvatar* avatar = (LLVOAvatar*) vobj;
|
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);
|
LLViewerObject* hit = avatar->lineSegmentIntersectRiggedAttachments(mStart, mEnd, -1, mPickTransparent, mFaceHit, &intersection, mTexCoord, mNormal, mTangent);
|
||||||
if (hit)
|
if (hit)
|
||||||
|
|||||||
@@ -2339,7 +2339,7 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
|
|||||||
LLVector4a* normal,
|
LLVector4a* normal,
|
||||||
LLVector4a* tangent)
|
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()))
|
if (!allow_mesh_picking || (isSelf() && !gAgent.needsRenderAvatar()))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,6 +89,8 @@
|
|||||||
#include "llmaterialmgr.h"
|
#include "llmaterialmgr.h"
|
||||||
#include "llsculptidsize.h"
|
#include "llsculptidsize.h"
|
||||||
|
|
||||||
|
#include "llkeyboard.h" // For allow_rigged_pick()
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d)
|
// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.0d)
|
||||||
#include "rlvhandler.h"
|
#include "rlvhandler.h"
|
||||||
#include "rlvlocks.h"
|
#include "rlvlocks.h"
|
||||||
@@ -4283,6 +4285,11 @@ LLVector3 LLVOVolume::volumeDirectionToAgent(const LLVector3& dir) const
|
|||||||
return ret;
|
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,
|
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)
|
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))
|
if (mDrawable->isState(LLDrawable::RIGGED))
|
||||||
{
|
{
|
||||||
static const LLCachedControl<bool> allow_mesh_picking("SGAllowRiggedMeshSelection");
|
if (allow_rigged_pick())
|
||||||
if (allow_mesh_picking && (gFloaterTools->getVisible() || LLFloaterInspect::findInstance()))
|
|
||||||
{
|
{
|
||||||
updateRiggedVolume(true);
|
updateRiggedVolume(true);
|
||||||
volume = mRiggedVolume;
|
volume = mRiggedVolume;
|
||||||
transform = false;
|
transform = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //cannot pick rigged attachments on other avatars or when not in build mode
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user