void LLMakeOutfitDialog::setWearableToInclude(S32 wearable, bool enabled, bool selected)
{
	LLWearableType::EType wtType = (LLWearableType::EType)wearable;
	if (((0 <= wtType) && (wtType < LLWearableType::WT_COUNT)) && 
		((LLAssetType::AT_BODYPART != LLWearableType::getAssetType(wtType)) || !getUseOutfits()))
	{
		std::string name = std::string("checkbox_") + LLWearableType::getTypeLabel(wtType);
		childSetEnabled(name, enabled);
		childSetValue(name, selected);
	}
}
void LLMakeOutfitDialog::makeOutfit(const std::string folder_name)
{
	LLInventoryModel::item_array_t item_list;
	getIncludedItems(item_list);

	// MULTI-WEARABLES TODO
	if (getUseOutfits())
		LLAppearanceMgr::instance().makeNewOutfitLinks(folder_name, item_list);
	else
		LLAppearanceMgr::instance().makeNewOutfitLegacy(folder_name, item_list, getUseLinks());
}
void LLMakeOutfitDialog::makeOutfit(const std::string folder_name)
{
	LLInventoryModel::item_array_t item_list;
	getIncludedItems(item_list);

	// MULTI-WEARABLES TODO
	if (getUseOutfits())
		LLAppearanceMgr::instance().makeNewOutfitLinks(folder_name, item_list);
	else
		LLAppearanceMgr::instance().makeNewOutfitLegacy(folder_name, item_list, getUseLinks());

	if ( gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion())
	{
		LLAppearanceMgr::instance().requestServerAppearanceUpdate();
	}
}
void LLMakeOutfitDialog::refresh()
{
	bool fUseOutfits = getUseOutfits();

	for (S32 idxType = 0; idxType < LLWearableType::WT_COUNT; idxType++)
	{
		LLWearableType::EType wtType = (LLWearableType::EType)idxType;
		if (LLAssetType::AT_BODYPART != LLWearableType::getAssetType(wtType))
			continue;
		LLUICtrl* pCheckCtrl = getChild<LLUICtrl>(std::string("checkbox_") + LLWearableType::getTypeLabel(wtType));
		if (!pCheckCtrl)
			continue;

		pCheckCtrl->setEnabled(!fUseOutfits);
		if (fUseOutfits)
			pCheckCtrl->setValue(true);
	}
	childSetEnabled("checkbox_use_links", !fUseOutfits);
}