summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloatermodelpreview.cpp23
-rw-r--r--indra/newview/llfloatermodelpreview.h3
-rwxr-xr-xindra/newview/llviewerobject.cpp2
-rw-r--r--indra/newview/llviewerobject.h2
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_model_preview.xml5
5 files changed, 23 insertions, 12 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 881f087d7b..4f683076a8 100644..100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -496,6 +496,11 @@ BOOL LLFloaterModelPreview::postBuild()
{
validate_url = "http://secondlife.com/my/account/mesh.php";
}
+ else if (current_grid == "damballah")
+ {
+ // Staging grid has its own naming scheme.
+ validate_url = "http://secondlife-staging.com/my/account/mesh.php";
+ }
else
{
validate_url = llformat("http://secondlife.%s.lindenlab.com/my/account/mesh.php",current_grid.c_str());
@@ -744,6 +749,11 @@ void LLFloaterModelPreview::draw()
if (!mModelPreview->mLoading)
{
+ if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_MATERIALS )
+ {
+ childSetTextArg("status", "[STATUS]", getString("status_material_mismatch"));
+ }
+ else
if ( mModelPreview->getLoadState() > LLModelLoader::ERROR_PARSING )
{
childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING)));
@@ -3304,7 +3314,7 @@ void LLModelPreview::rebuildUploadData()
F32 max_scale = 0.f;
//reorder materials to match mBaseModel
- for (U32 i = 0; i < LLModel::NUM_LODS; i++)
+ for (U32 i = 0; i < LLModel::NUM_LODS-1; i++)
{
if (mBaseModel.size() == mModel[i].size())
{
@@ -3316,6 +3326,7 @@ void LLModelPreview::rebuildUploadData()
if ( !mModel[i][j]->matchMaterialOrder(mBaseModel[j], refFaceCnt, modelFaceCnt ) )
{
+ setLoadState( LLModelLoader::ERROR_MATERIALS );
mFMP->childDisable( "calculate_btn" );
}
}
@@ -4351,11 +4362,6 @@ void LLModelPreview::updateStatusMessages()
{
skinAndRigOk = false;
}
- else
- if ( !isLegacyRigValid() )
- {
- mFMP->childDisable("calculate_btn");
- }
}
if(upload_ok && mModelLoader)
@@ -5071,6 +5077,8 @@ BOOL LLModelPreview::render()
if (!mModel[mPreviewLOD].empty())
{
+ mFMP->childEnable("reset_btn");
+
bool regen = mVertexBuffer[mPreviewLOD].empty();
if (!regen)
{
@@ -5083,7 +5091,7 @@ BOOL LLModelPreview::render()
}
//make sure material lists all match
- for (U32 i = 0; i < LLModel::NUM_LODS; i++)
+ for (U32 i = 0; i < LLModel::NUM_LODS-1; i++)
{
if (mBaseModel.size() == mModel[i].size())
{
@@ -5568,6 +5576,7 @@ void LLFloaterModelPreview::onReset(void* user_data)
assert_main_thread();
LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) user_data;
+ fmp->childDisable("reset_btn");
LLModelPreview* mp = fmp->mModelPreview;
std::string filename = mp->mLODFile[3];
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 47de99ce25..64324854a5 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -70,7 +70,8 @@ public:
GENERATING_VERTEX_BUFFERS,
GENERATING_LOD,
DONE,
- ERROR_PARSING //basically loading failed
+ ERROR_PARSING, //basically loading failed
+ ERROR_MATERIALS,
} eLoadState;
U32 mState;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d81e67bfe2..46e4fc3b02 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3219,7 +3219,7 @@ F32 LLViewerObject::getLinksetPhysicsCost()
return mLinksetPhysicsCost;
}
-F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes)
+F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const
{
return 0.f;
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 53e951e483..be5b9819b1 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -340,7 +340,7 @@ public:
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
- virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL);
+ virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) const;
virtual U32 getTriangleCount();
virtual U32 getHighLODTriangleCount();
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 fbaf4f0a8a..eebc5ddc72 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"></string>
<string name="status_parse_error">Error: Dae parsing issue - see log for details.</string>
+ <string name="status_material_mismatch">Error: Material of model is not a subset of reference model.</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>
@@ -789,7 +790,7 @@
<check_box name="physics_use_hull" follows="left|top" width="130" left_pad="5" height="20" label="Use Convex Hull"/> -->
</panel>
- <!-- ==== STEP 2: Analyse ==== -->
+ <!-- ==== STEP 2: Analyze ==== -->
<view_border
bevel_style="none"
follows="top|left"
@@ -818,7 +819,7 @@
name="method_label"
text_color="White"
top_pad="0">
- Step 2: Analyse
+ Step 2: Analyze
</text>
<text
follows="top|left"