MAINT-7065 Better information on animations running on the logged-in Avatar
parent
891eaf76ca
commit
0c19b16266
|
|
@ -148,6 +148,12 @@ void LLPreviewAnim::draw()
|
|||
}
|
||||
if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
|
||||
{
|
||||
const LLInventoryItem *item = getItem();
|
||||
LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
|
||||
if (item && motion)
|
||||
{
|
||||
motion->setName(item->getName());
|
||||
}
|
||||
this->mDidStart = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3417,10 +3417,62 @@ void LLVOAvatar::updateDebugText()
|
|||
std::string output;
|
||||
if (motionp->getName().empty())
|
||||
{
|
||||
std::string name;
|
||||
if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf())
|
||||
{
|
||||
name = motionp->getID().asString();
|
||||
LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin();
|
||||
for (; anim_it != mAnimationSources.end(); ++anim_it)
|
||||
{
|
||||
if (anim_it->second == motionp->getID())
|
||||
{
|
||||
LLViewerObject* object = gObjectList.findObject(anim_it->first);
|
||||
if (!object)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (object->isAvatar())
|
||||
{
|
||||
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)
|
||||
{
|
||||
name = item->getName();
|
||||
}
|
||||
else if (object->isAttachment())
|
||||
{
|
||||
name += "(" + getAttachmentItemName() + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
// in-world object, name or content unknown
|
||||
name += "(in-world)";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
name = LLUUID::null.asString();
|
||||
}
|
||||
|
||||
output = llformat("%s - %d",
|
||||
gAgent.isGodlikeWithoutAdminMenuFakery() ?
|
||||
motionp->getID().asString().c_str() :
|
||||
LLUUID::null.asString().c_str(),
|
||||
name.c_str(),
|
||||
(U32)motionp->getPriority());
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue