summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2020-10-02 18:20:56 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2020-10-02 18:20:56 +0100
commit8e1dabbc992e9ee74f0ff7a915d53ed070c7ced3 (patch)
tree78648ef9f13ab4c3ec3b6e6a959404c4ffe57360 /indra/newview/llvoavatar.cpp
parent376f690f8fb9253f33bc207dce6e533dff9c8687 (diff)
SL-14045 - add a distinguishing flag in animation info so playing animations can be distinguished from others
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp107
1 files changed, 54 insertions, 53 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index b12ad2937c..d3a9cebafb 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3763,13 +3763,13 @@ LLViewerInventoryItem* recursiveGetObjectInventoryItem(LLViewerObject *vobj, LLU
void LLVOAvatar::updateAnimationDebugText()
{
- for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin();
- iter != mMotionController.getActiveMotions().end(); ++iter)
+ for (LLMotionController::motion_list_t::iterator iter = mMotionController.getActiveMotions().begin();
+ iter != mMotionController.getActiveMotions().end(); ++iter)
+ {
+ LLMotion* motionp = *iter;
+ if (motionp->getMinPixelArea() < getPixelArea())
{
- LLMotion* motionp = *iter;
- if (motionp->getMinPixelArea() < getPixelArea())
- {
- std::string output;
+ std::string output;
std::string motion_name = motionp->getName();
if (motion_name.empty())
{
@@ -3786,73 +3786,74 @@ void LLVOAvatar::updateAnimationDebugText()
}
}
if (motion_name.empty())
+ {
+ std::string name;
+ if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
{
- std::string name;
- if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
+ name = motionp->getID().asString();
+ LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
+ for (; anim_it != mAnimationSources.end(); ++anim_it)
{
- name = motionp->getID().asString();
- LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
- for (; anim_it != mAnimationSources.end(); ++anim_it)
+ if (anim_it->second == motionp->getID())
{
- if (anim_it->second == motionp->getID())
+ LLViewerObject* object = gObjectList.findObject(anim_it->first);
+ if (!object)
+ {
+ break;
+ }
+ if (object->isAvatar())
{
- LLViewerObject* object = gObjectList.findObject(anim_it->first);
- if (!object)
+ if (mMotionController.mIsSelf)
+ {
+ // Searching inventory by asset id is really long
+ // so just mark as inventory
+ // Also item is likely to be named by LLPreviewAnim
+ name += "(inventory)";
+ }
+ }
+ else
+ {
+ LLViewerInventoryItem* item = NULL;
+ if (!object->isInventoryDirty())
+ {
+ item = object->getInventoryItemByAsset(motionp->getID());
+ }
+ if (item)
{
- break;
+ name = item->getName();
}
- if (object->isAvatar())
+ else if (object->isAttachment())
{
- if (mMotionController.mIsSelf)
- {
- // Searching inventory by asset id is really long
- // so just mark as inventory
- // Also item is likely to be named by LLPreviewAnim
- name += "(inventory)";
- }
+ name += "(att:" + getAttachmentItemName() + ")";
}
else
{
- LLViewerInventoryItem* item = NULL;
- if (!object->isInventoryDirty())
- {
- item = object->getInventoryItemByAsset(motionp->getID());
- }
- if (item)
- {
- name = item->getName();
- }
- else if (object->isAttachment())
- {
- name += "(att:" + getAttachmentItemName() + ")";
- }
- else
- {
- // in-world object, name or content unknown
- name += "(in-world)";
- }
+ // in-world object, name or content unknown
+ name += "(in-world)";
}
- break;
}
+ break;
}
}
- else
- {
- name = LLUUID::null.asString();
- }
- output = llformat("%s - %d",
- name.c_str(),
- (U32)motionp->getPriority());
}
else
{
- output = llformat("%s - %d",
- motion_name.c_str(),
- (U32)motionp->getPriority());
+ name = LLUUID::null.asString();
}
- addDebugText(output);
+ motion_name = name;
+ }
+ std::string motion_tag = "";
+ if (mPlayingAnimations.find(motionp->getID()) != mPlayingAnimations.end())
+ {
+ motion_tag = "*";
}
+ output = llformat("%s%s - %d",
+ motion_name.c_str(),
+ motion_tag.c_str(),
+ (U32)motionp->getPriority());
+ addDebugText(output);
}
+ }
}
void LLVOAvatar::updateDebugText()