summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Linden <none@none>2014-08-28 11:25:17 -0700
committerGraham Linden <none@none>2014-08-28 11:25:17 -0700
commit3501487bfc9463bf2b732d790819bc2938816287 (patch)
treea343f0c69851d650841dfa5b026c7dfbd657e71e
parentea50327a27299efca6a1451b1b2e37aab2113297 (diff)
Make ImporterDebug facilities work again
-rwxr-xr-xindra/newview/app_settings/settings.xml6
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp33
2 files changed, 18 insertions, 21 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8895bba472..b63cba75ec 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7,11 +7,11 @@
<key>Comment</key>
<string>Enable debug output to more precisely identify sources of import errors. Warning: the output can slow down import on many machines.</string>
<key>Persist</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>Type</key>
- <string>Integer</string>
+ <string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>IMShowTime</key>
<map>
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 78a087b050..685048ace7 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1408,7 +1408,7 @@ void LLModelPreview::rebuildUploadData()
FindModel(mScene[i], name_to_match, lod_model, transform);
- S32 importerDebug = gSavedSettings.getS32("ImporterDebug");
+ BOOL importerDebug = gSavedSettings.getBOOL("ImporterDebug");
// Fall back to old method of index-based association if
// we could not find a match based on the mesh names
@@ -1418,7 +1418,7 @@ void LLModelPreview::rebuildUploadData()
if (i == LLModel::LOD_PHYSICS)
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Assigning collision for " << instance.mLabel << " to match " << lod_model->mLabel << LL_ENDL;
}
@@ -1426,7 +1426,7 @@ void LLModelPreview::rebuildUploadData()
}
else
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Assigning LOD" << i << " for " << instance.mLabel << " to found match " << lod_model->mLabel << LL_ENDL;
}
@@ -1463,7 +1463,7 @@ void LLModelPreview::rebuildUploadData()
{
if (i == LLModel::LOD_PHYSICS)
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Falling back collision for " << instance.mLabel << " to " << lod_model->mLabel << LL_ENDL;
}
@@ -1471,7 +1471,7 @@ void LLModelPreview::rebuildUploadData()
}
else
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Falling back LOD" << i << " for " << instance.mLabel << " to found " << lod_model->mLabel << LL_ENDL;
}
@@ -1485,7 +1485,7 @@ void LLModelPreview::rebuildUploadData()
{ //find reference instance for this model
if (mBaseModel[idx] == base_model)
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Falling back to model index " << idx << " for LOD " << i << " of " << instance.mLabel << LL_ENDL;
}
@@ -1503,14 +1503,14 @@ void LLModelPreview::rebuildUploadData()
instance.mLOD[i] = lod_model;
if (i == LLModel::LOD_PHYSICS)
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Indexed fallback to model index " << idx << ": LOD " << i << " named " << lod_model->mLabel << " for collision for " << instance.mLabel << LL_ENDL;
}
}
else
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "Indexed fallback to model index " << idx << " LOD " << i << " named " << lod_model->mLabel << " for LOD " << i << " for " << instance.mLabel << LL_ENDL;
}
@@ -1518,7 +1518,7 @@ void LLModelPreview::rebuildUploadData()
}
else
{
- if (importerDebug > 0)
+ if (importerDebug)
{
LL_INFOS() << "List of models for LOD " << i << " did not include index " << idx << LL_ENDL;
}
@@ -2434,8 +2434,8 @@ void LLModelPreview::updateStatusMessages()
std::string instance_name = instance.mLabel;
- S32 importerDebug = gSavedSettings.getS32("ImporterDebug");
- if (importerDebug > 0)
+ BOOL importerDebug = gSavedSettings.getBOOL("ImporterDebug");
+ if (importerDebug)
{
// Useful for debugging generalized complaints below about total submeshes which don't have enough
// context to address exactly what needs to be fixed to move towards compliance with the rules.
@@ -2444,14 +2444,11 @@ void LLModelPreview::updateStatusMessages()
LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Tris: " << cur_tris << LL_ENDL;
LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Faces: " << cur_submeshes << LL_ENDL;
- if (importerDebug > 1)
+ LLModel::material_list::iterator mat_iter = lod_model->mMaterialList.begin();
+ while (mat_iter != lod_model->mMaterialList.end())
{
- LLModel::material_list::iterator mat_iter = lod_model->mMaterialList.begin();
- while (mat_iter != lod_model->mMaterialList.end())
- {
- LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Material " << *(mat_iter) << LL_ENDL;
- mat_iter++;
- }
+ LL_INFOS() << "Instance " << lod_model->mLabel << " LOD " << i << " Material " << *(mat_iter) << LL_ENDL;
+ mat_iter++;
}
}