From c9baf4c66157c601cc4d4e325c7843b3bf9a0cad Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 7 Jun 2017 14:23:49 +0100 Subject: SL-691,SL-694 - viewer can animate objects based on server messaging. First end-to-end demo for animated objects. --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c68f6b8a15..eddbe16482 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6907,7 +6907,7 @@ class LLAttachmentEnableDrop : public view_listener_t // Do not enable drop if all faces of object are not enabled if (object && LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { - S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getState()); + S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getAttachmentState()); attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); if (attachment) -- cgit v1.2.3 From a57170724344842e26b8cd0fa4a47c24efa834c5 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 3 Aug 2017 14:23:02 +0100 Subject: SL-731 - render metadata includes triangle count, triangle and vertex count included with debug text for control avatar --- indra/newview/llviewermenu.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index eddbe16482..f01c67e499 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1076,6 +1076,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_TEXEL_DENSITY; } + else if ("triangle count" == info_display) + { + return LLPipeline::RENDER_DEBUG_TRIANGLE_COUNT; + } else { LL_WARNS() << "unrecognized feature name '" << info_display << "'" << LL_ENDL; -- cgit v1.2.3 From 9af10a84cf0671d04e844299456d4bc48d1dec45 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 2 Feb 2018 20:32:43 +0000 Subject: MAINT-8239 - problems with some instances failing to load some joint positions. Added DumpXML and Reset Skeleton support for animated objects when debugging. --- indra/newview/llviewermenu.cpp | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') 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)); -- cgit v1.2.3 From 02c371e2cc0365c9051e37c50ec0fa028af39b6e Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 19 Jun 2018 15:53:14 +0100 Subject: MAINT-8766 - fix for appearance to XML crash, plus enablement logic --- indra/newview/llviewermenu.cpp | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6f6bf8678b..0fa7878258 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1628,6 +1628,11 @@ class LLAdvancedEnableAppearanceToXML : public view_listener_t else if (obj && obj->isAttachment() && obj->getAvatar()) { return gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"); + } + else if (obj && obj->isAvatar()) + { + // This has to be a non-control avatar, because control avs are invisible and unclickable. + return gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"); } else { @@ -1642,12 +1647,33 @@ class LLAdvancedAppearanceToXML : public view_listener_t { std::string emptyname; LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - LLVOAvatar* avatar = obj->getAvatar(); - if (!avatar) - { + LLVOAvatar *avatar = NULL; + if (obj) + { + if (obj->isAvatar()) + { + avatar = obj->asAvatar(); + } + else + { + // If there is a selection, find the associated + // avatar. Normally there's only one obvious choice. But + // what should be returned if the object is in an attached + // animated object? getAvatar() will give the skeleton of + // the animated object. getAvatarAncestor() will give the + // actual human-driven avatar. + avatar = obj->getAvatar(); + } + } + else + { + // If no selection, use the self avatar. avatar = gAgentAvatarp; - } - avatar->dumpArchetypeXML(emptyname); + } + if (avatar) + { + avatar->dumpArchetypeXML(emptyname); + } return true; } }; -- cgit v1.2.3 From ae041779ccc83b1acc8a01528918d52aab9f565f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 10 Oct 2018 14:37:49 +0100 Subject: SL-9849 - debug option for show impostor extents --- indra/newview/llviewermenu.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d2c26dd6e7..6c52f118ad 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -964,7 +964,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t ////////////////// // INFO DISPLAY // ////////////////// -U32 info_display_from_string(std::string info_display) +U64 info_display_from_string(std::string info_display) { if ("verify" == info_display) { @@ -1082,6 +1082,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_TRIANGLE_COUNT; } + else if ("impostors" == info_display) + { + return LLPipeline::RENDER_DEBUG_IMPOSTORS; + } else { LL_WARNS() << "unrecognized feature name '" << info_display << "'" << LL_ENDL; @@ -1093,7 +1097,7 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t { bool handleEvent(const LLSD& userdata) { - U32 info_display = info_display_from_string( userdata.asString() ); + U64 info_display = info_display_from_string( userdata.asString() ); LL_INFOS("ViewerMenu") << "toggle " << userdata.asString() << LL_ENDL; @@ -1111,7 +1115,7 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t { bool handleEvent(const LLSD& userdata) { - U32 info_display = info_display_from_string( userdata.asString() ); + U64 info_display = info_display_from_string( userdata.asString() ); bool new_value = false; if ( info_display != 0 ) -- cgit v1.2.3