本文整理汇总了C++中LLViewerJointAttachment::getItemID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerJointAttachment::getItemID方法的具体用法?C++ LLViewerJointAttachment::getItemID怎么用?C++ LLViewerJointAttachment::getItemID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerJointAttachment
的用法示例。
在下文中一共展示了LLViewerJointAttachment::getItemID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refreshAll
void RlvFloaterBehaviour::refreshAll()
{
LLVOAvatar* pAvatar = gAgent.getAvatarObject();
LLCtrlListInterface* pList = childGetListInterface("behaviour_list");
const rlv_object_map_t* pRlvObjects = gRlvHandler.getObjectMap();
if ( (!pAvatar) || (!pList) || (!pRlvObjects) )
return;
pList->operateOnAll(LLCtrlListInterface::OP_DELETE);
for (rlv_object_map_t::const_iterator itObj = pRlvObjects->begin(), endObj = pRlvObjects->end(); itObj != endObj; ++itObj)
{
std::string strName = itObj->first.asString();
LLViewerInventoryItem* pItem = NULL;
LLViewerObject* pObj = gObjectList.findObject(itObj->first);
if (pObj)
{
LLViewerJointAttachment* pAttachPt =
get_if_there(pAvatar->mAttachmentPoints, gRlvHandler.getAttachPointIndex(pObj), (LLViewerJointAttachment*)NULL);
if (pAttachPt)
{
pItem = gInventory.getItem(pAttachPt->getItemID());
}
}
if (pItem)
strName = pItem->getName();
const rlv_command_list_t* pCommands = itObj->second.getCommandList();
for (rlv_command_list_t::const_iterator itCmd = pCommands->begin(), endCmd = pCommands->end(); itCmd != endCmd; ++itCmd)
{
std::string strBhvr = itCmd->asString(); LLUUID uuid(itCmd->getOption());
if (uuid.notNull())
{
std::string strLookup;
if ( (gCacheName->getFullName(uuid, strLookup)) || (gCacheName->getGroupName(uuid, strLookup)) )
{
if (strLookup.find("???") == std::string::npos)
strBhvr.assign(itCmd->getBehaviour()).append(":").append(strLookup);
}
else if (m_PendingLookup.end() == std::find(m_PendingLookup.begin(), m_PendingLookup.end(), uuid))
{
gCacheName->get(uuid, FALSE, onAvatarNameLookup, this);
m_PendingLookup.push_back(uuid);
}
}
LLSD element;
// Restriction column
element["columns"][0]["column"] = "behaviour";
element["columns"][0]["value"] = strBhvr;
element["columns"][0]["font"] = "SANSSERIF";
element["columns"][0]["font-style"] = "NORMAL";
// Object Name column
element["columns"][1]["column"] = "name";
element["columns"][1]["value"] = strName;
element["columns"][1]["font"] = "SANSSERIF";
element["columns"][1]["font-style"] = "NORMAL";
pList->addElement(element, ADD_BOTTOM);
}
}
}