summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-04-01 16:49:27 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-04-01 16:49:27 -0400
commit793ff1c94a7e434edcc3fcfb3f570172bed01262 (patch)
treeba92cc9f2197d98baea5069e736b9e4afda5c382 /indra/newview
parent1ccb583181410ebd0742b0e47047ff74cfadd45c (diff)
parente04b7f007f71be65395d01184264f18f1662246a (diff)
merge
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp29
-rwxr-xr-xindra/newview/llfloatermodelpreview.h2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_model_preview.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_wizard.xml1
4 files changed, 26 insertions, 7 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d356e22072..ff687386de 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -381,8 +381,6 @@ BOOL LLFloaterModelPreview::postBuild()
LLFloaterModelPreview::~LLFloaterModelPreview()
{
sInstance = NULL;
-
- const LLModelLoader *model_loader = mModelPreview->mModelLoader;
if ( mModelPreview && mModelPreview->getResetJointFlag() )
{
@@ -576,7 +574,14 @@ void LLFloaterModelPreview::draw()
if (!mModelPreview->mLoading)
{
- childSetTextArg("status", "[STATUS]", getString("status_idle"));
+ if ( mModelPreview->getLoadState() > LLModelLoader::ERROR_PARSING )
+ {
+ childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING)));
+ }
+ else
+ {
+ childSetTextArg("status", "[STATUS]", getString("status_idle"));
+ }
}
childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost));
@@ -1282,6 +1287,12 @@ bool LLModelLoader::doLoadModel()
{
LLPointer<LLModel> model = LLModel::loadModelFromDomMesh(mesh);
+ if(model->getStatus() != LLModel::NO_ERRORS)
+ {
+ setLoadState(ERROR_PARSING + model->getStatus()) ;
+ return true ; //abort
+ }
+
if (model.notNull() && validate_model(model))
{
mModelList.push_back(model);
@@ -2499,7 +2510,7 @@ U32 LLModelPreview::calcResourceCost()
if (mFMP && mModelLoader)
{
- if ( getLoadState() != LLModelLoader::ERROR_PARSING )
+ if ( getLoadState() < LLModelLoader::ERROR_PARSING )
{
mFMP->childEnable("ok_btn");
}
@@ -2853,7 +2864,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)
setPreviewLOD(lod);
- if ( getLoadState() == LLModelLoader::ERROR_PARSING )
+ if ( getLoadState() >= LLModelLoader::ERROR_PARSING )
{
mFMP->childDisable("ok_btn");
}
@@ -2935,8 +2946,14 @@ void LLModelPreview::loadModelCallback(S32 lod)
LLMutexLock lock(this);
if (!mModelLoader)
{
+ mLoading = false ;
return;
}
+ if(getLoadState() >= LLModelLoader::ERROR_PARSING)
+ {
+ mLoading = false ;
+ return ;
+ }
mModelLoader->loadTextures() ;
@@ -3672,7 +3689,7 @@ void LLModelPreview::updateStatusMessages()
}
}
- bool errorStateFromLoader = getLoadState() == LLModelLoader::ERROR_PARSING ? true : false;
+ bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false;
bool skinAndRigOk = true;
bool uploadingSkin = mFMP->childGetValue("upload_skin").asBoolean();
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index a1f03762e4..dc6a33d0ab 100755
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -66,7 +66,7 @@ public:
GENERATING_VERTEX_BUFFERS,
GENERATING_LOD,
DONE,
- ERROR_PARSING, //basically loading failed
+ ERROR_PARSING //basically loading failed
} eLoadState;
U32 mState;
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 23dc28f54c..d08c3e7078 100755
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -6,6 +6,7 @@
<string name="status_idle">Idle</string>
<string name="status_reading_file">Loading...</string>
<string name="status_generating_meshes">Generating Meshes...</string>
+ <string name="status_vertex_number_overflow">Error: Vertex number is more than 65534, aborted!</string>
<string name="high">High</string>
<string name="medium">Medium</string>
<string name="low">Low</string>
diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
index fa340118d5..4b312c6ce7 100644
--- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml
@@ -1026,6 +1026,7 @@ Advanced users familiar with 3d content creation tools may prefer to use the [se
<string name="status_idle">Idle</string>
<string name="status_reading_file">Loading...</string>
<string name="status_generating_meshes">Generating Meshes...</string>
+ <string name="status_vertex_number_overflow">Error: Vertex number is more than 65534, aborted!</string>
<string name="high">High</string>
<string name="medium">Medium</string>
<string name="low">Low</string>