summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-02-02 20:32:43 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-02-02 20:32:43 +0000
commit9af10a84cf0671d04e844299456d4bc48d1dec45 (patch)
treedb2dfec5bf22271467f3772b2b662e300dc72f32 /indra/newview/llviewermenu.cpp
parent3a8b1bf1e4b30e8efb1fe161706c8d5f41fccad8 (diff)
MAINT-8239 - problems with some instances failing to load some joint positions. Added DumpXML and Reset Skeleton support for animated objects when debugging.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp40
1 files changed, 36 insertions, 4 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 262bbd4d36..c2f90cfe14 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1620,7 +1620,19 @@ class LLAdvancedEnableAppearanceToXML : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- return gSavedSettings.getBOOL("DebugAvatarAppearanceMessage");
+ LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ if (obj && obj->isAnimatedObject() && obj->getControlAvatar())
+ {
+ return gSavedSettings.getBOOL("DebugAnimatedObjects");
+ }
+ else if (obj && obj->isAttachment() && obj->getAvatar())
+ {
+ return gSavedSettings.getBOOL("DebugAvatarAppearanceMessage");
+ }
+ else
+ {
+ return false;
+ }
}
};
@@ -1629,8 +1641,8 @@ class LLAdvancedAppearanceToXML : public view_listener_t
bool handleEvent(const LLSD& userdata)
{
std::string emptyname;
- LLVOAvatar* avatar =
- find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ LLVOAvatar* avatar = obj->getAvatar();
if (!avatar)
{
avatar = gAgentAvatarp;
@@ -6054,7 +6066,12 @@ class LLAvatarResetSkeleton: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
+ LLVOAvatar* avatar = NULL;
+ LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ if (obj)
+ {
+ avatar = obj->getAvatar();
+ }
if(avatar)
{
avatar->resetSkeleton(false);
@@ -6063,6 +6080,20 @@ class LLAvatarResetSkeleton: public view_listener_t
}
};
+class LLAvatarEnableResetSkeleton: public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
+ if (obj && obj->getAvatar())
+ {
+ return true;
+ }
+ return false;
+ }
+};
+
+
class LLAvatarResetSkeletonAndAnimations : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -9080,6 +9111,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAvatarReportAbuse(), "Avatar.ReportAbuse");
view_listener_t::addMenu(new LLAvatarToggleMyProfile(), "Avatar.ToggleMyProfile");
view_listener_t::addMenu(new LLAvatarResetSkeleton(), "Avatar.ResetSkeleton");
+ view_listener_t::addMenu(new LLAvatarEnableResetSkeleton(), "Avatar.EnableResetSkeleton");
view_listener_t::addMenu(new LLAvatarResetSkeletonAndAnimations(), "Avatar.ResetSkeletonAndAnimations");
enable.add("Avatar.IsMyProfileOpen", boost::bind(&my_profile_visible));