SL-12993 Focus on avatar after saving new preset
parent
944b908be1
commit
70d340a1bf
|
|
@ -2656,7 +2656,7 @@ void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camer
|
|||
//-----------------------------------------------------------------------------
|
||||
// setFocusOnAvatar()
|
||||
//-----------------------------------------------------------------------------
|
||||
void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
|
||||
void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate, BOOL reset_axes)
|
||||
{
|
||||
if (focus_on_avatar != mFocusOnAvatar)
|
||||
{
|
||||
|
|
@ -2673,7 +2673,7 @@ void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate)
|
|||
//RN: when focused on the avatar, we're not "looking" at it
|
||||
// looking implies intent while focusing on avatar means
|
||||
// you're just walking around with a camera on you...eesh.
|
||||
if (!mFocusOnAvatar && focus_on_avatar)
|
||||
if (!mFocusOnAvatar && focus_on_avatar && reset_axes)
|
||||
{
|
||||
setFocusGlobal(LLVector3d::zero);
|
||||
mCameraFOVZoomFactor = 0.f;
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ public:
|
|||
void validateFocusObject();
|
||||
void setFocusGlobal(const LLPickInfo& pick);
|
||||
void setFocusGlobal(const LLVector3d &focus, const LLUUID &object_id = LLUUID::null);
|
||||
void setFocusOnAvatar(BOOL focus, BOOL animate);
|
||||
void setFocusOnAvatar(BOOL focus, BOOL animate, BOOL reset_axes = TRUE);
|
||||
void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id);
|
||||
void clearFocusObject();
|
||||
void setFocusObject(LLViewerObject* object);
|
||||
|
|
|
|||
|
|
@ -106,6 +106,8 @@ void LLFloaterSaveCameraPreset::onBtnSave()
|
|||
{
|
||||
gSavedSettings.setVector3("CameraOffsetRearView", gAgentCamera.getCurrentCameraOffset());
|
||||
gSavedSettings.setVector3d("FocusOffsetRearView", gAgentCamera.getCurrentFocusOffset());
|
||||
gAgentCamera.resetCameraZoomFraction();
|
||||
gAgentCamera.setFocusOnAvatar(TRUE, TRUE, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue