From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llfloatermodelpreview.cpp | 130 ++++++++++++++++---------------- 1 file changed, 65 insertions(+), 65 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 49ddcc7d18..0dcfdf61bb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -292,14 +292,14 @@ bool validate_face(const LLVolumeFace& face) { if (face.mIndices[i] >= face.mNumVertices) { - llwarns << "Face has invalid index." << llendl; + LL_WARNS() << "Face has invalid index." << LL_ENDL; return false; } } if (face.mNumIndices % 3 != 0 || face.mNumIndices == 0) { - llwarns << "Face has invalid number of indices." << llendl; + LL_WARNS() << "Face has invalid number of indices." << LL_ENDL; return false; } @@ -317,7 +317,7 @@ bool validate_face(const LLVolumeFace& face) if (ll_is_degenerate(v1,v2,v3)) { - llwarns << "Degenerate face found!" << llendl; + LL_WARNS() << "Degenerate face found!" << LL_ENDL; return false; } }*/ @@ -329,7 +329,7 @@ bool validate_model(const LLModel* mdl) { if (mdl->getNumVolumeFaces() == 0) { - llwarns << "Model has no faces!" << llendl; + LL_WARNS() << "Model has no faces!" << LL_ENDL; return false; } @@ -337,13 +337,13 @@ bool validate_model(const LLModel* mdl) { if (mdl->getVolumeFace(i).mNumVertices == 0) { - llwarns << "Face has no vertices." << llendl; + LL_WARNS() << "Face has no vertices." << LL_ENDL; return false; } if (mdl->getVolumeFace(i).mNumIndices == 0) { - llwarns << "Face has no indices." << llendl; + LL_WARNS() << "Face has no indices." << LL_ENDL; return false; } @@ -362,7 +362,7 @@ BOOL stop_gloderror() if (error != GLOD_NO_ERROR) { - llwarns << "GLOD error detected, cannot generate LOD: " << std::hex << error << llendl; + LL_WARNS() << "GLOD error detected, cannot generate LOD: " << std::hex << error << LL_ENDL; return TRUE; } @@ -930,7 +930,7 @@ void LLFloaterModelPreview::onPhysicsParamCommit(LLUICtrl* ctrl, void* data) { if (LLConvexDecomposition::getInstance() == NULL) { - llinfos << "convex decomposition tool is a stub on this platform. cannot get decomp." << llendl; + LL_INFOS() << "convex decomposition tool is a stub on this platform. cannot get decomp." << LL_ENDL; return; } @@ -978,7 +978,7 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data) { if (!sInstance->mCurRequest.empty()) { - llinfos << "Decomposition request still pending." << llendl; + LL_INFOS() << "Decomposition request still pending." << LL_ENDL; return; } @@ -1029,13 +1029,13 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata) } else { - llwarns << "no iface" << llendl; + LL_WARNS() << "no iface" << LL_ENDL; return; } if (which_mode <= 0) { - llwarns << "which_mode out of range, " << which_mode << llendl; + LL_WARNS() << "which_mode out of range, " << which_mode << LL_ENDL; } S32 file_mode = iface->getItemCount() - 1; @@ -1120,8 +1120,8 @@ void LLFloaterModelPreview::initDecompControls() // protected against stub by stage_count being 0 for stub above LLConvexDecomposition::getInstance()->registerCallback(j, LLPhysicsDecomp::llcdCallback); - //llinfos << "Physics decomp stage " << stage[j].mName << " (" << j << ") parameters:" << llendl; - //llinfos << "------------------------------------" << llendl; + //LL_INFOS() << "Physics decomp stage " << stage[j].mName << " (" << j << ") parameters:" << LL_ENDL; + //LL_INFOS() << "------------------------------------" << LL_ENDL; for (S32 i = 0; i < param_count; ++i) { @@ -1135,12 +1135,12 @@ void LLFloaterModelPreview::initDecompControls() std::string type = "unknown"; - llinfos << name << " - " << description << llendl; + LL_INFOS() << name << " - " << description << LL_ENDL; if (param[i].mType == LLCDParam::LLCD_FLOAT) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mFloat); - //llinfos << "Type: float, Default: " << param[i].mDefault.mFloat << llendl; + //LL_INFOS() << "Type: float, Default: " << param[i].mDefault.mFloat << LL_ENDL; LLUICtrl* ctrl = getChild(name); @@ -1190,7 +1190,7 @@ void LLFloaterModelPreview::initDecompControls() else if (param[i].mType == LLCDParam::LLCD_INTEGER) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue); - //llinfos << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << llendl; + //LL_INFOS() << "Type: integer, Default: " << param[i].mDefault.mIntOrEnumValue << LL_ENDL; LLUICtrl* ctrl = getChild(name); @@ -1216,7 +1216,7 @@ void LLFloaterModelPreview::initDecompControls() else if (param[i].mType == LLCDParam::LLCD_BOOLEAN) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mBool); - //llinfos << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << llendl; + //LL_INFOS() << "Type: boolean, Default: " << (param[i].mDefault.mBool ? "True" : "False") << LL_ENDL; LLCheckBoxCtrl* check_box = getChild(name); if (check_box) @@ -1228,16 +1228,16 @@ void LLFloaterModelPreview::initDecompControls() else if (param[i].mType == LLCDParam::LLCD_ENUM) { mDecompParams[param[i].mName] = LLSD(param[i].mDefault.mIntOrEnumValue); - //llinfos << "Type: enum, Default: " << param[i].mDefault.mIntOrEnumValue << llendl; + //LL_INFOS() << "Type: enum, Default: " << param[i].mDefault.mIntOrEnumValue << LL_ENDL; { //plug into combo box - //llinfos << "Accepted values: " << llendl; + //LL_INFOS() << "Accepted values: " << LL_ENDL; LLComboBox* combo_box = getChild(name); for (S32 k = 0; k < param[i].mDetails.mEnumValues.mNumEnums; ++k) { - //llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue - // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl; + //LL_INFOS() << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue + // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << LL_ENDL; std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName); std::string localized_name; @@ -1250,9 +1250,9 @@ void LLFloaterModelPreview::initDecompControls() combo_box->setCommitCallback(onPhysicsParamCommit, (void*) ¶m[i]); } - //llinfos << "----" << llendl; + //LL_INFOS() << "----" << LL_ENDL; } - //llinfos << "-----------------------------" << llendl; + //LL_INFOS() << "-----------------------------" << LL_ENDL; } } @@ -1499,14 +1499,14 @@ bool LLModelLoader::doLoadModel() if (!dom) { - llinfos<<" Error with dae - traditionally indicates a corrupt file."<getVersion(); //0=1.4 @@ -1516,7 +1516,7 @@ bool LLModelLoader::doLoadModel() { docVersion = VERSIONTYPE_COUNT; } - llinfos<<"Dae version "<getDomRoot(); if (!root) { - llwarns << "document has no root" << llendl; + LL_WARNS() << "document has no root" << LL_ENDL; return false; } @@ -1698,7 +1698,7 @@ bool LLModelLoader::doLoadModel() daeElement* pScene = root->getDescendant("visual_scene"); if ( !pScene ) { - llwarns<<"No visual scene - unable to parse bone offsets "<typeID() != domTranslate::ID() ) { - llwarns<< "The found element is not a translate node" <getPreviewAvatar()->getJoint( lookingForJoint ); if ( pJoint ) @@ -1916,7 +1916,7 @@ bool LLModelLoader::doLoadModel() else { //Most likely an error in the asset. - llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl; + LL_WARNS()<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << LL_ENDL; } } } @@ -1944,7 +1944,7 @@ bool LLModelLoader::doLoadModel() } else { - llwarns<<"Possibly misnamed/missing joint [" < &jointListFromA } if ( !result ) { - llinfos<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< llendl; + LL_INFOS()<<" Asset did not contain the joint (if you're u/l a fully rigged asset w/joint positions - it is required)." << *masterJointIt<< LL_ENDL; break; } } @@ -2468,7 +2468,7 @@ bool LLModelPreview::isRigSuitableForJointPositionUpload( const std::vectorgetName() == NULL ) { - llinfos<<"Parsed node has no name "<getId() ) { - llinfos<<"Parsed node ID: "<getId()<getId()<getVertices(); if ( !pVertices ) { - llinfos<<"No vertices!"<getName() == NULL) { - llwarns << "nameless node, can't process" << llendl; + LL_WARNS() << "nameless node, can't process" << LL_ENDL; return; } - //llwarns<<"ProcessJointNode# Node:" <getName()<getName()<typeID() != domTranslate::ID() ) { - //llwarns<< "The found element is not a translate node" <( jointResolver.getElement() ); if ( pMatrix ) { - //llinfos<<"A matrix SID was however found!"<getValue(); for ( int i = 0; i < 4; i++ ) { @@ -2731,7 +2731,7 @@ void LLModelLoader::processJointNode( domNode* pNode, JointTransformMap& jointTr } else { - llwarns<< "The found element is not translate or matrix node - most likely a corrupt export!" <getAttribute("id") << "\"" << llendl; + LL_WARNS()<< "Could not find a child [" << name << "] for the element: \"" << pElement->getAttribute("id") << "\"" << LL_ENDL; return NULL; } @@ -2850,7 +2850,7 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement ) if (mTransform.determinant() < 0) { //negative scales are not supported - llinfos << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << llendl; + LL_INFOS() << "Negative scale detected, unsupported transform. domInstance_geometry: " << LLModel::getElementLabel(instance_geo) << LL_ENDL; badElement = true; } @@ -2880,7 +2880,7 @@ void LLModelLoader::processElement( daeElement* element, bool& badElement ) } else { - llinfos<<"Unable to resolve geometry URL."< LLModel::NUM_LODS - 1) { - llwarns << "Invalid level of detail: " << lod << llendl; + LL_WARNS() << "Invalid level of detail: " << lod << LL_ENDL; assert(lod >= LLModel::LOD_IMPOSTOR && lod < LLModel::NUM_LODS); return; } @@ -3538,7 +3538,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable if (mModelLoader) { - llwarns << "Incompleted model load operation pending." << llendl; + LL_WARNS() << "Incompleted model load operation pending." << LL_ENDL; return; } @@ -3848,7 +3848,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim // Allow LoD from -1 to LLModel::LOD_PHYSICS if (which_lod < -1 || which_lod > LLModel::NUM_LODS - 1) { - llwarns << "Invalid level of detail: " << which_lod << llendl; + LL_WARNS() << "Invalid level of detail: " << which_lod << LL_ENDL; assert(which_lod >= -1 && which_lod < LLModel::NUM_LODS); return; } @@ -4136,7 +4136,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim if (!validate_face(target_model->getVolumeFace(names[i]))) { - llerrs << "Invalid face generated during LOD generation." << llendl; + LL_ERRS() << "Invalid face generated during LOD generation." << LL_ENDL; } } @@ -4151,7 +4151,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim if (!validate_model(target_model)) { - llerrs << "Invalid model generated when creating LODs" << llendl; + LL_ERRS() << "Invalid model generated when creating LODs" << LL_ENDL; } delete [] sizes; @@ -4596,7 +4596,7 @@ void LLModelPreview::updateLodControls(S32 lod) { if (lod < LLModel::LOD_IMPOSTOR || lod > LLModel::LOD_HIGH) { - llwarns << "Invalid level of detail: " << lod << llendl; + LL_WARNS() << "Invalid level of detail: " << lod << LL_ENDL; assert(lod >= LLModel::LOD_IMPOSTOR && lod <= LLModel::LOD_HIGH); return; } @@ -4909,7 +4909,7 @@ void LLModelPreview::createPreviewAvatar( void ) } else { - llinfos<<"Failed to create preview avatar for upload model window"<