toggle joint guides on/off
Also Clean up edge on. Tweaks display parameters of joint highlightsmaster
parent
30db8c80a7
commit
76942456fd
|
|
@ -26335,6 +26335,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSManipShowJointMarkers</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show small markers where the selectable joints are.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSLocalMeshApplyJointOffsets</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
*/
|
||||
static void renderPulsingSphere(const LLVector3& joint_world_position, const LLColor4& color = LLColor4(0.f, 0.f, 1.f, 0.3f))
|
||||
{
|
||||
constexpr float MAX_SPHERE_RADIUS = 0.03f; // Base radius in agent-space units.
|
||||
constexpr float PULSE_AMPLITUDE = 0.01f; // Additional radius variation.
|
||||
constexpr float MAX_SPHERE_RADIUS = 0.02f; // Base radius in agent-space units.
|
||||
constexpr float PULSE_AMPLITUDE = 0.005f; // Additional radius variation.
|
||||
constexpr float PULSE_FREQUENCY = 1.f; // Pulses per second.
|
||||
constexpr float PULSE_TIME_DOMAIN = 5.f; // Keep the time input small.
|
||||
|
||||
|
|
@ -128,10 +128,8 @@ static void renderPulsingSphere(const LLVector3& joint_world_position, const LLC
|
|||
}
|
||||
}
|
||||
|
||||
static void renderStaticSphere(const LLVector3& joint_world_position, const LLColor4& color = LLColor4(1.f, 1.f, 0.f, .6f), float radius=0.02f)
|
||||
static void renderStaticSphere(const LLVector3& joint_world_position, const LLColor4& color = LLColor4(1.f, 1.f, 0.f, .6f), float radius=0.01f)
|
||||
{
|
||||
constexpr float MAX_SPHERE_RADIUS = 0.05f; // Base radius in agent-space units.
|
||||
|
||||
LLGLSUIDefault gls_ui;
|
||||
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
|
||||
LLGLDepthTest gls_depth(GL_TRUE);
|
||||
|
|
@ -431,6 +429,7 @@ bool FSManipRotateJoint::updateVisiblity()
|
|||
if (!hasMouseCapture())
|
||||
{
|
||||
mRotationCenter = gAgent.getPosGlobalFromAgent( mJoint->getWorldPosition() );
|
||||
mCamEdgeOn = false;
|
||||
}
|
||||
|
||||
bool visible = false;
|
||||
|
|
@ -469,13 +468,6 @@ bool FSManipRotateJoint::updateVisiblity()
|
|||
}
|
||||
}
|
||||
|
||||
mCamEdgeOn = false;
|
||||
F32 axis_onto_cam = mManipPart >= LL_ROT_X ? llabs( getConstraintAxis() * mCenterToCamNorm ) : 0.f;
|
||||
if (axis_onto_cam < AXIS_ONTO_CAM_TOLERANCE)
|
||||
{
|
||||
mCamEdgeOn = true;
|
||||
}
|
||||
|
||||
return visible;
|
||||
}
|
||||
|
||||
|
|
@ -717,8 +709,9 @@ void FSManipRotateJoint::render()
|
|||
LLGLDepthTest gls_depth(GL_TRUE);
|
||||
LLGLEnable gl_blend(GL_BLEND);
|
||||
|
||||
// Optionally, if another joint is highlighted, render a pulsing sphere.
|
||||
// Iterate through the avatar's joint map.
|
||||
// Iterate through the avatar's joint map.
|
||||
// If a joint other than the currently selected is highlighted, render a pulsing sphere.
|
||||
// otherwise a small static sphere
|
||||
for (const auto& entry : getSelectableJoints())
|
||||
{
|
||||
LLJoint* joint = mAvatar->getJoint(std::string(entry));
|
||||
|
|
@ -735,7 +728,11 @@ void FSManipRotateJoint::render()
|
|||
else if( joint != mJoint )
|
||||
{
|
||||
// Render a static sphere for the joint being manipulated.
|
||||
renderStaticSphere(joint->getWorldPosition(), LLColor4(1.f, 0.5f, 0.f, 0.5f), 0.01f);
|
||||
LLCachedControl<bool> show_joint_markers(gSavedSettings, "FSManipShowJointMarkers", true);
|
||||
if(show_joint_markers)
|
||||
{
|
||||
renderStaticSphere(joint->getWorldPosition(), LLColor4(1.f, 0.5f, 0.f, 0.5f), 0.01f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include "llagent.h"
|
||||
#include "llagentdata.h"
|
||||
#include "llavatarappearancedefines.h"
|
||||
#include "llbutton.h"
|
||||
#include "llcalc.h"
|
||||
#include "llcheckboxctrl.h"
|
||||
|
|
@ -6014,13 +6015,9 @@ void FSPanelFace::LLSelectedTE::getTexId(LLUUID& id, bool& identical)
|
|||
LLUUID get(LLViewerObject* object, S32 te_index)
|
||||
{
|
||||
LLTextureEntry *te = object->getTE(te_index);
|
||||
if (te)
|
||||
if (te && LLAvatarAppearanceDefines::LLAvatarAppearanceDictionary::isBakedImageId(te->getID()))
|
||||
{
|
||||
if ((te->getID() == IMG_USE_BAKED_EYES) || (te->getID() == IMG_USE_BAKED_HAIR) || (te->getID() == IMG_USE_BAKED_HEAD) || (te->getID() == IMG_USE_BAKED_LOWER) || (te->getID() == IMG_USE_BAKED_SKIRT) || (te->getID() == IMG_USE_BAKED_UPPER)
|
||||
|| (te->getID() == IMG_USE_BAKED_LEFTARM) || (te->getID() == IMG_USE_BAKED_LEFTLEG) || (te->getID() == IMG_USE_BAKED_AUX1) || (te->getID() == IMG_USE_BAKED_AUX2) || (te->getID() == IMG_USE_BAKED_AUX3))
|
||||
{
|
||||
return te->getID();
|
||||
}
|
||||
return te->getID();
|
||||
}
|
||||
|
||||
LLUUID id;
|
||||
|
|
|
|||
|
|
@ -952,16 +952,6 @@ width="430">
|
|||
function="Poser.CommitSpinner"
|
||||
parameter="3"/>
|
||||
</spinner>
|
||||
<check_box
|
||||
control_name="FSManipRotateJointUseNaturalDirection"
|
||||
name="natural_direction_checkbox"
|
||||
height="16"
|
||||
label="Use natural alignment"
|
||||
follows="left|top"
|
||||
left="5"
|
||||
tool_tip="The skeleton has unnatural joint rotations by default. This complicates posing. When checked, the joints will rotate in a more natural way."
|
||||
top_pad="10"
|
||||
width="134" />
|
||||
<check_box
|
||||
control_name="FSPoserStopPosingWhenClosed"
|
||||
name="stop_posing_on_close_checkbox"
|
||||
|
|
@ -1003,6 +993,26 @@ width="430">
|
|||
tool_tip="When you save a pose, if the file already exists, you need to click the save button again to confirm you are sure you want to overwrite."
|
||||
top_pad="5"
|
||||
width="134" />
|
||||
<check_box
|
||||
control_name="FSManipRotateJointUseNaturalDirection"
|
||||
name="natural_direction_checkbox"
|
||||
height="16"
|
||||
label="Use natural alignment"
|
||||
follows="left|top"
|
||||
left="5"
|
||||
tool_tip="The skeleton has unnatural joint rotations by default. This complicates posing. When checked, the joints will rotate in a more natural way."
|
||||
top_pad="5"
|
||||
width="134" />
|
||||
<check_box
|
||||
control_name="FSManipShowJointMarkers"
|
||||
name="show_joint_markers_checkbox"
|
||||
height="16"
|
||||
label="Show joint markers"
|
||||
follows="left|top"
|
||||
left="5"
|
||||
tool_tip="Show small indicators to aid joint selection when visually posing."
|
||||
top_pad="5"
|
||||
width="134" />
|
||||
</panel>
|
||||
</tab_container>
|
||||
<button
|
||||
|
|
|
|||
Loading…
Reference in New Issue