summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-07 11:24:48 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-03-07 11:24:48 -0500
commit88cb6814f0883cdce15ca1942409da708ab07af5 (patch)
treed0067d27341a945fbfab91299c0c79cce9037b54 /indra/newview
parent9ca9a44acfc06de529489d76eea934ed6652fe81 (diff)
SL-315 WIP - more call stack tracing, initial hooks for avatar reset skeleton option.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llagent.cpp6
-rwxr-xr-xindra/newview/llviewermenu.cpp13
-rwxr-xr-xindra/newview/llvoavatar.cpp7
-rwxr-xr-xindra/newview/llvoavatar.h1
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_attachment_other.xml9
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_attachment_self.xml7
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_other.xml9
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_avatar_self.xml6
8 files changed, 56 insertions, 2 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 3f32be1d68..0393f41666 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4137,6 +4137,8 @@ void LLAgent::setTeleportState(ETeleportState state)
void LLAgent::stopCurrentAnimations()
{
+ LL_DEBUGS("Avatar") << "Stopping current animations" << LL_ENDL;
+
// This function stops all current overriding animations on this
// avatar, propagating this change back to the server.
if (isAgentAvatarValid())
@@ -4154,6 +4156,7 @@ void LLAgent::stopCurrentAnimations()
// don't cancel a ground-sit anim, as viewers
// use this animation's status in
// determining whether we're sitting. ick.
+ LL_DEBUGS("Avatar") << "sit or do-not-disturb animation will not be stopped" << LL_ENDL;
}
else
{
@@ -4183,8 +4186,7 @@ void LLAgent::stopCurrentAnimations()
// re-assert at least the default standing animation, because
// viewers get confused by avs with no associated anims.
- sendAnimationRequest(ANIM_AGENT_STAND,
- ANIM_REQUEST_START);
+ sendAnimationRequest(ANIM_AGENT_STAND, ANIM_REQUEST_START);
}
}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index bbd7183dd2..fefbcabb2b 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6031,6 +6031,18 @@ class LLAvatarToggleMyProfile : public view_listener_t
}
};
+class LLAvatarResetSkeleton: public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ if(avatar)
+ {
+ avatar->resetSkeleton();
+ }
+ return true;
+ }
+};
class LLAvatarAddContact : public view_listener_t
{
@@ -9017,6 +9029,7 @@ void initialize_menus()
enable.add("Avatar.EnableCall", boost::bind(&LLAvatarActions::canCall));
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile");
+ view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));
commit.add("Avatar.OpenMarketplace", boost::bind(&LLWeb::loadURLExternal, gSavedSettings.getString("MarketplaceURL")));
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a8cc797f16..204432dc16 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1801,6 +1801,13 @@ void LLVOAvatar::buildCharacter()
mMeshValid = TRUE;
}
+//-----------------------------------------------------------------------------
+// resetSkeleton()
+//-----------------------------------------------------------------------------
+void LLVOAvatar::resetSkeleton()
+{
+ LL_DEBUGS("Avatar") << avString() << LL_ENDL;
+}
//-----------------------------------------------------------------------------
// releaseMeshData()
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e1b4885bbb..76b40fb90a 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -364,6 +364,7 @@ public:
/*virtual*/ BOOL loadSkeletonNode();
/*virtual*/ void buildCharacter();
+ void resetSkeleton();
LLVector3 mCurRootToHeadOffset;
LLVector3 mTargetRootToHeadOffset;
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index ba91b0b5d9..c3c6701d01 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -40,6 +40,15 @@
function="Avatar.InviteToGroup" />
</menu_item_call>
<menu_item_separator />
+
+ <menu_item_call label="Reset Skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+
+ <menu_item_separator />
<menu_item_call
enabled="false"
label="Block"
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index c6ae844d67..ced0dd37b1 100755
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -99,6 +99,13 @@ name="Edit Outfit">
<menu_item_call.on_enable
function="Edit.EnableHoverHeight" />
</menu_item_call>
+ <menu_item_call label="Reset Skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+
<menu_item_call
label="My Friends"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index cfbbe41f95..f04a70d0a5 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -41,6 +41,15 @@
</menu_item_call>
<menu_item_separator />
+
+ <menu_item_call label="Reset Skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
+
+ <menu_item_separator />
<menu_item_call
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index d3b0b07f70..924e8b8454 100755
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -237,6 +237,12 @@
<menu_item_call.on_enable
function="Edit.EnableHoverHeight" />
</menu_item_call>
+ <menu_item_call label="Reset Skeleton"
+ layout="topleft"
+ name="Reset Skeleton">
+ <menu_item_call.on_click
+ function="Avatar.ResetSkeleton" />
+ </menu_item_call>
<menu_item_call
label="My Friends"
layout="topleft"