本文整理汇总了C++中LLVisualParam::getMinWeight方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVisualParam::getMinWeight方法的具体用法?C++ LLVisualParam::getMinWeight怎么用?C++ LLVisualParam::getMinWeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVisualParam
的用法示例。
在下文中一共展示了LLVisualParam::getMinWeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LuaDumpVisualParamsToLuaCode
std::string LuaDumpVisualParamsToLuaCode()
{
LLVOAvatar *av=gAgent.getAvatarObject();
//LuaError("DumpVisualParamsToLuaCode() DEBUG: Dumping vis params. (Checking perms)");
LLViewerInventoryItem* item;
item = (LLViewerInventoryItem*)gAgent.getWearableInventoryItem(WT_SHAPE);
if(!item)
{
LuaError(llformat("DumpVisualParamsToLuaCode() (%s:%d): item is null! Cannot check perms; Aborting!\nPlease file a bug report at http://bugs.nexisonline.net/",__FILE__,__LINE__).c_str());
return "";
}
if(!HasPermissions(item))
{
LuaError("LuaDumpVisualParamsToLuaCode(): You do not have permission to edit this shape.");
return std::string();
}
std::string param_msg("");
param_msg.assign("--[[ Autogenerated by FlexLife Viewer (Rev. $Rev$)]]--\n\n");
param_msg.append("-- setParamOnSelf(\"name\",weight) -- default, min, max\n");
for (LLVisualParam *param = av->getFirstVisualParam();
param;
param = av->getNextVisualParam())
{
param_msg.append(
llformat(
"setParamOnSelf(\"%s\",%f)\t-- %f\t%f\t%f\n",
param->getName().c_str(),
param->getCurrentWeight(),
param->getDefaultWeight(),
param->getMinWeight(),
param->getMaxWeight()
)
);
}
param_msg.append("\n\n--[[Wearables]]--\nRemoveAllWearables()\n");
std::map<LLUUID,LLWearable *>::const_iterator i;
for(i = gWearableList.mList.begin();i!=gWearableList.mList.end();++i)
{
LLWearable *wear=(LLWearable *)i->second;
if(!LuaSaveWearable(wear)) break;
std::stringstream s;
s << "wear(\"" << wear->getID().asString() << "\")\n";
param_msg.append(s.str());
}
/*
for( S32 i = 0; i < BAKED_NUM_INDICES; i++ )
{
S32 tex_index=LLmBakedTextureData[i].mTextureIndex
//S32 tex_index = LLVOAvatar::sBakedTextureIndices[i];
std::stringstream s;
s << "setTEImage(" << tex_index <<",\""<< av->getTEImage(tex_index)->getID() << "\")\n";
param_msg.append(s.str());
}
*/
param_msg.append("UpdateAppearance()\n");
//LuaError("DumpVisualParamsToLuaCode() DEBUG: Done.");
return param_msg;
}