From 93dc8f09ea5f44bb5bdd73a469c984cf7d714149 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 8 Oct 2010 00:11:22 -0500 Subject: Fix for bad labels on physics shape in importer. Fix for crash due to race condition when uploading meshes. --- indra/newview/llfloatermodelpreview.cpp | 5 ++++- indra/newview/llmeshrepository.cpp | 5 +++++ indra/newview/skins/default/xui/en/floater_model_preview.xml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 161b8ed9c8..fdf781ae0b 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -272,6 +272,7 @@ BOOL LLFloaterModelPreview::postBuild() { if (lod == LLModel::LOD_PHYSICS) { + childSetTextArg(info_name[lod], "[TRIANGLES]", std::string("0")); childSetTextArg(info_name[lod], "[HULLS]", std::string("0")); childSetTextArg(info_name[lod], "[POINTS]", std::string("0")); } @@ -2953,7 +2954,7 @@ void LLModelPreview::updateStatusMessages() S32 total_verts[LLModel::NUM_LODS]; S32 total_submeshes[LLModel::NUM_LODS]; - for (S32 lod = 0; lod <= LLModel::LOD_HIGH; ++lod) + for (S32 lod = 0; lod < LLModel::NUM_LODS; ++lod) { //initialize total for this lod to 0 total_tris[lod] = total_verts[lod] = total_submeshes[lod] = 0; @@ -2986,6 +2987,8 @@ void LLModelPreview::updateStatusMessages() std::string upload_message; + mFMP->childSetTextArg(info_name[LLModel::LOD_PHYSICS], "[TRIANGLES]", llformat("%d", total_tris[LLModel::LOD_PHYSICS])); + for (S32 lod = 0; lod <= LLModel::LOD_HIGH; ++lod) { mFMP->childSetTextArg(info_name[lod], "[TRIANGLES]", llformat("%d", total_tris[lod])); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 15e4149e5d..0af885068e 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1334,6 +1334,11 @@ void LLMeshUploadThread::run() gMeshRepo.mDecompThread->submitRequest(request); } + while (!mPhysicsComplete) + { + apr_sleep(100); + } + //upload textures bool done = false; do 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 6512548441..e1d1a769da 100644 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml @@ -150,7 +150,7 @@ [TRIANGLES] Triangles, [HULLS] Hulls, [POINTS] Points - + Include: -- cgit v1.2.3