当前位置: 首页>>代码示例>>C++>>正文


C++ LLViewerInventoryCategory::getPreferredType方法代码示例

本文整理汇总了C++中LLViewerInventoryCategory::getPreferredType方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerInventoryCategory::getPreferredType方法的具体用法?C++ LLViewerInventoryCategory::getPreferredType怎么用?C++ LLViewerInventoryCategory::getPreferredType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLViewerInventoryCategory的用法示例。


在下文中一共展示了LLViewerInventoryCategory::getPreferredType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: get_is_category_renameable

BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
{
	if (!model)
	{
		return FALSE;
	}

// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
	if ( (rlv_handler_t::isEnabled()) && (model == &gInventory) && (!RlvFolderLocks::instance().canRenameFolder(id)) )
	{
		return FALSE;
	}
// [/RLVa:KB]

	// ## Zi: Animation Overrider
	if(((id==AOEngine::instance().getAOFolder() || model->isObjectDescendentOf(id,AOEngine::instance().getAOFolder()))
		&& gSavedPerAccountSettings.getBOOL("ProtectAOFolders"))
//-TT Client LSL Bridge
		|| (id==FSLSLBridge::instance().getBridgeFolder() || model->isObjectDescendentOf(id,FSLSLBridge::instance().getBridgeFolder())
			&& gSavedPerAccountSettings.getBOOL("ProtectBridgeFolder"))
		)
//-TT
		return FALSE;
	// ## Zi: Animation Overrider

	LLViewerInventoryCategory* cat = model->getCategory(id);

	if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&
		cat->getOwnerID() == gAgent.getID())
	{
		return TRUE;
	}
	return FALSE;
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:34,代码来源:llinventoryfunctions.cpp

示例2: getIsCorrectType

bool LLPanelOutfitsInventory::getIsCorrectType(const LLFolderViewEventListener *listenerp) const
{
    if (listenerp->getInventoryType() == LLInventoryType::IT_CATEGORY)
    {
        LLViewerInventoryCategory *cat = gInventory.getCategory(listenerp->getUUID());
        if (cat && cat->getPreferredType() == LLFolderType::FT_OUTFIT)
        {
            return true;
        }
    }
    return false;
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:12,代码来源:llpaneloutfitsinventory.cpp

示例3: onCollectItem

// Checked: 2010-09-30 (RLVa-1.2.1d) | Modified: RLVa-1.2.1d
bool RlvWearableItemCollector::onCollectItem(const LLInventoryItem* pItem)
{
	bool fAttach = RlvForceWear::isWearAction(m_eWearAction);

	if ( (!fAttach) && (!RlvForceWear::isStrippable(pItem)) )							// Don't process "nostrip" items on detach
		return false;

	const LLUUID& idParent = pItem->getParentUUID(); bool fRet = false;
	switch (pItem->getType())
	{
		case LLAssetType::AT_BODYPART:
			if (!fAttach)
				break;																	// Don't process body parts on detach
		case LLAssetType::AT_CLOTHING:
			fRet = ( (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)) ||
					 ( (fAttach) && (m_Folded.end() != std::find(m_Folded.begin(), m_Folded.end(), idParent)) &&
					   (RlvForceWear::isStrippable(pItem)) ) );
			break;
		case LLAssetType::AT_OBJECT:
			fRet = ( (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent)) || 
				     (m_Folded.end() != std::find(m_Folded.begin(), m_Folded.end(), idParent)) ) &&
				   ( (!fAttach) || (RlvAttachPtLookup::hasAttachPointName(pItem)) || (RlvSettings::getEnableSharedWear()) );
			break;
		#ifdef RLV_EXTENSION_FORCEWEAR_GESTURES
		case LLAssetType::AT_GESTURE:
			fRet = (m_Wearable.end() != std::find(m_Wearable.begin(), m_Wearable.end(), idParent));
			break;
		#endif // RLV_EXTENSION_FORCEWEAR_GESTURES
		#ifdef RLV_EXTENSION_FORCEWEAR_FOLDERLINKS
		case LLAssetType::AT_CATEGORY:
			if (LLAssetType::AT_LINK_FOLDER == pItem->getActualType())
			{
				const LLUUID& idLinkedFolder = pItem->getLinkedUUID();
				LLViewerInventoryCategory* pLinkedFolder = gInventory.getCategory(idLinkedFolder);
				// Link can't point to an outfit folder, or start a second level of indirection, or have the base folder as an ancestor
				if ( (pLinkedFolder) && (LLFolderType::FT_OUTFIT != pLinkedFolder->getPreferredType()) &&
					 (gInventory.isObjectDescendentOf(pItem->getUUID(), m_idFolder)) && 
					 (!gInventory.isObjectDescendentOf(idLinkedFolder, m_idFolder)) )
				{
					// Fold the contents of the linked folder under the folder the link is a child of
					m_FoldingMap.insert(std::pair<LLUUID, LLUUID>(idLinkedFolder, pItem->getParentUUID()));
					m_Linked.push_front(idLinkedFolder);
				}
			}
			break;
		#endif // RLV_EXTENSION_FORCEWEAR_FOLDERLINKS
		default:
			break;
	}
	return fRet;
}
开发者ID:zantrua,项目名称:SingularityViewer,代码行数:52,代码来源:rlvinventory.cpp

示例4: get_is_category_renameable

BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
{
	if (!model)
	{
		return FALSE;
	}

	LLViewerInventoryCategory* cat = model->getCategory(id);

	if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&
		cat->getOwnerID() == gAgent.getID())
	{
		return TRUE;
	}
	return FALSE;
}
开发者ID:jimjesus,项目名称:kittyviewer,代码行数:16,代码来源:llinventoryfunctions.cpp

示例5: get_is_category_renameable

BOOL get_is_category_renameable(const LLInventoryModel* model, const LLUUID& id)
{
	if (!model)
	{
		return FALSE;
	}

// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
	if ( (rlv_handler_t::isEnabled()) && (model == &gInventory) && (!RlvFolderLocks::instance().canRenameFolder(id)) )
	{
		return FALSE;
	}
// [/RLVa:KB]

	LLViewerInventoryCategory* cat = model->getCategory(id);

	if (cat && !LLFolderType::lookupIsProtectedType(cat->getPreferredType()) &&
		cat->getOwnerID() == gAgent.getID())
	{
		return TRUE;
	}
	return FALSE;
}
开发者ID:Nekrofage,项目名称:SingularityViewer,代码行数:23,代码来源:llinventoryfunctions.cpp


注:本文中的LLViewerInventoryCategory::getPreferredType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。