summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-01 17:41:58 -0500
committerDave Parks <davep@lindenlab.com>2010-10-01 17:41:58 -0500
commiteb3a78ebe4c58cceea485697d58df7d4796c0a1f (patch)
treef3bd36c94c95fdc0ccbabdc70a7df4d617f41500
parente3a515f91c796208e7eca0784ce65ce7626565a1 (diff)
remove lod requirements check from model importer.
-rw-r--r--indra/newview/llfloatermodelpreview.cpp36
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml2
2 files changed, 6 insertions, 32 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index f98a708dae..02e76d8b17 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -2954,50 +2954,24 @@ void LLModelPreview::updateStatusMessages()
if (lod != lod_high)
{
- if (total_submeshes[lod] == 0)
- { //no model loaded for this lod, see if one is required
- for (U32 i = 0; i < verts[lod_high].size(); ++i)
- {
- const F32 ratio = 0.5f;
- const S32 required_verts = 128;
-
- F32 scaler = powf(ratio, lod_high-lod);
- S32 max_verts = (S32)(verts[lod_high][i]*scaler);
-
- if (max_verts > required_verts)
- { //some model in this slot might have more than 128 vertices
-
- //if any model higher up the chain has more than 128 vertices,
- // lod is required here
- for (S32 j = lod+1; j <= LLModel::LOD_HIGH; ++j)
- {
- if (verts[j].size() > i && verts[j][i] > 128)
- {
- message = "required";
- upload_message = "missing_lod";
- }
- }
- }
- }
- }
- else if (total_submeshes[lod] != total_submeshes[lod_high])
+ if (total_submeshes[lod] && total_submeshes[lod] != total_submeshes[lod_high])
{
message = "mesh_mismatch";
upload_message = "bad_lod";
}
- else if (tris[lod].size() != tris[lod_high].size())
+ else if (!tris[lod].empty() && tris[lod].size() != tris[lod_high].size())
{
message = "model_mismatch";
upload_message = "bad_lod";
}
- else
+ else if (!verts[lod].empty())
{
for (U32 i = 0; i < verts[lod].size(); ++i)
{
const F32 ratio = 0.5f;
- F32 scaler = powf(ratio, lod_high-lod);
- S32 max_verts = (S32)(verts[lod_high][i]*scaler);
+ F32 scaler = 1.f;
+ S32 max_verts = (S32)(verts[lod+1][i]*scaler);
if (verts[lod][i] > max_verts)
{
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index e7c2a8bc6f..6512548441 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -175,7 +175,7 @@
<text bottom_delta="20" left="15" follows="top|left" height="15" name="description_label" text_color="1 0.82 0.46 1">
(No charge for upload during First Look)
</text>
- <text bottom_delta="20" left="15" follows="top|left" height="15" name="upload_message">
+ <text bottom_delta="20" left="15" width="280" follows="top|left" height="15" name="upload_message">
[MESSAGE]
</text>
<text bottom_delta="45" left="15" follows="top|left" height="15" name="debug section">