本文整理汇总了C++中LLInventoryItem::getCreatorUUID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLInventoryItem::getCreatorUUID方法的具体用法?C++ LLInventoryItem::getCreatorUUID怎么用?C++ LLInventoryItem::getCreatorUUID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLInventoryItem
的用法示例。
在下文中一共展示了LLInventoryItem::getCreatorUUID方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickCreator
void LLFloaterProperties::onClickCreator()
{
LLInventoryItem* item = findItem();
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
LLAvatarActions::showProfile(item->getCreatorUUID());
}
}
示例2: onClickCreator
// static
void LLFloaterProperties::onClickCreator(void* data)
{
LLFloaterProperties* self = (LLFloaterProperties*)data;
if(!self) return;
LLInventoryItem* item = self->findItem();
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
LLFloaterAvatarInfo::showFromObject(item->getCreatorUUID());
}
}
示例3: doCallingCardSelectionChange
// Callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::doCallingCardSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
bool panel_active = (childGetVisibleTab("ResidentChooserTabs") == getChild<LLPanel>("CallingCardsPanel"));
mSelectedInventoryAvatarIDs.clear();
mSelectedInventoryAvatarNames.clear();
if (panel_active)
{
childSetEnabled("Select", FALSE);
}
std::deque<LLFolderViewItem*>::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
LLFolderViewEventListener* listenerp = (*item_it)->getListener();
if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
{
LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());
if (item)
{
mSelectedInventoryAvatarIDs.push_back(item->getCreatorUUID());
mSelectedInventoryAvatarNames.push_back(listenerp->getName());
}
}
}
if (panel_active)
{
childSetEnabled("Select", visibleItemsSelected());
}
}
示例4: handleDragAndDrop
// virtual, public
BOOL LLNameListCtrl::handleDragAndDrop(
S32 x, S32 y, MASK mask,
BOOL drop,
EDragAndDropType cargo_type, void *cargo_data,
EAcceptance *accept,
std::string& tooltip_msg)
{
if (!mAllowCallingCardDrop)
{
return FALSE;
}
BOOL handled = FALSE;
if (cargo_type == DAD_CALLINGCARD)
{
if (drop)
{
LLInventoryItem* item = (LLInventoryItem *)cargo_data;
addNameItem(item->getCreatorUUID());
}
*accept = ACCEPT_YES_MULTI;
}
else
{
*accept = ACCEPT_NO;
if (tooltip_msg.empty())
{
if (!getToolTip().empty())
{
tooltip_msg = getToolTip();
}
else
{
// backwards compatable English tooltip (should be overridden in xml)
tooltip_msg.assign("Drag a calling card here\nto add a resident.");
}
}
}
handled = TRUE;
lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLNameListCtrl " << getName() << llendl;
return handled;
}
示例5: doSelectionChange
// Callback for inventory picker (select from calling cards)
void LLFloaterAvatarPicker::doSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data)
{
if (!mListNames)
{
return;
}
std::vector<LLScrollListItem*> search_items = mListNames->getAllSelected();
if ( search_items.size() == 0 )
{ // Nothing selected in the search results
mAvatarIDs.clear();
mAvatarNames.clear();
childSetEnabled("Select", FALSE);
}
BOOL first_calling_card = TRUE;
std::deque<LLFolderViewItem*>::const_iterator item_it;
for (item_it = items.begin(); item_it != items.end(); ++item_it)
{
LLFolderViewEventListener* listenerp = (*item_it)->getListener();
if (listenerp->getInventoryType() == LLInventoryType::IT_CALLINGCARD)
{
LLInventoryItem* item = gInventory.getItem(listenerp->getUUID());
if (item)
{
if ( first_calling_card )
{ // Have a calling card selected, so clear anything from the search panel
first_calling_card = FALSE;
mAvatarIDs.clear();
mAvatarNames.clear();
mListNames->deselectAllItems();
}
// Add calling card info to the selected avatars
mAvatarIDs.push_back(item->getCreatorUUID());
mAvatarNames.push_back(listenerp->getName());
childSetEnabled("Select", TRUE);
}
}
}
}
示例6: inventoryChanged
void FSLSLBridge::inventoryChanged(LLViewerObject* object,
LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* user_data)
{
object->removeInventoryListener(this);
llinfos << "Received object inventory for existing bridge prim. Checking contents..." << llendl;
//are we attaching the right thing? Check size and script
LLInventoryObject::object_list_t inventory_objects;
object->getInventoryContents(inventory_objects);
if (object->flagInventoryEmpty())
{
llinfos << "Empty bridge detected- re-enter creation process" << llendl;
mBridgeCreating = true;
}
else if (inventory_objects.size() > 0)
{
S32 count(0);
LLInventoryObject::object_list_t::iterator it = inventory_objects.begin();
LLInventoryObject::object_list_t::iterator end = inventory_objects.end();
bool isOurScript = false;
for ( ; it != end; ++it)
{
LLInventoryItem* item = ((LLInventoryItem*)((LLInventoryObject*)(*it)));
// AH: Somehow always contains a wonky object item with creator
// UUID = NULL UUID and asset type AT_NONE - don't count it
if (item->getType() != LLAssetType::AT_NONE)
{
count++;
}
if (item->getType() == LLAssetType::AT_LSL_TEXT)
{
if (item->getCreatorUUID() == gAgent.getID())
{
isOurScript = true;
}
else //problem, not our script
{
llwarns << "The bridge inventory contains a script not created by user." << llendl;
}
}
}
if (count == 1 && isOurScript) //We attached a valid bridge. Run along.
{
return;
}
else
{
reportToNearbyChat(LLTrans::getString("fsbridge_warning_unexpected_items"));
llwarns << "The bridge inventory contains items other than bridge script." << llendl;
if (!isOurScript) //some junk but no valid script? Unlikely to happen, but lets add script anyway.
{
mBridgeCreating = true;
}
else //Let the script disable competitors
{
return;
}
}
}
else
{
llwarns << "Bridge not empty, but we're unable to retrieve contents." << llendl;
}
//modify the rock size and texture
if (mBridgeCreating)
{
configureBridgePrim(object);
}
}