summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-07-14 01:07:01 -0500
committerDave Parks <davep@lindenlab.com>2011-07-14 01:07:01 -0500
commit561d40d5c316b4879ea56965f6b320e8e1c70a88 (patch)
treed7783f1da298c8254f2e16df9634a875b9564be3
parent685c98275c1f29446874e1e3e491ce92a645d01c (diff)
SH-715 Disable simplify/analyze button while counterpart is executing.
-rw-r--r--indra/llprimitive/llmodel.cpp2
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp33
2 files changed, 20 insertions, 15 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index ba7abd4c79..434fb7650b 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -2284,8 +2284,6 @@ LLSD LLModel::Decomposition::asLLSD() const
for (U32 k = 0; k < 3; k++)
{
- llassert(src[k] <= 0.51f && src[k] >= -0.51f);
-
//convert to 16-bit normalized across domain
U16 val = (U16) (((src[k]-min.mV[k])/range.mV[k])*65535);
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 0748ed8039..ef846ec42e 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -780,19 +780,6 @@ void LLFloaterModelPreview::draw()
childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost));
childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size()));
- if (!mCurRequest.empty())
- {
- LLMutexLock lock(mStatusLock);
- childSetTextArg("status", "[STATUS]", mStatusMessage);
- }
- else
- {
- childSetVisible("Simplify", true);
- childSetVisible("simplify_cancel", false);
- childSetVisible("Decompose", true);
- childSetVisible("decompose_cancel", false);
- }
-
if (mModelPreview)
{
gGL.color3f(1.f, 1.f, 1.f);
@@ -992,12 +979,14 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data)
sInstance->setStatusMessage(sInstance->getString("decomposing"));
sInstance->childSetVisible("Decompose", false);
sInstance->childSetVisible("decompose_cancel", true);
+ sInstance->childDisable("Simplify");
}
else if (stage == "Simplify")
{
sInstance->setStatusMessage(sInstance->getString("simplifying"));
sInstance->childSetVisible("Simplify", false);
sInstance->childSetVisible("simplify_cancel", true);
+ sInstance->childDisable("Decompose");
}
}
}
@@ -4345,6 +4334,24 @@ void LLModelPreview::updateStatusMessages()
child->setEnabled(enable);
child = panel->findNextSibling(child);
}
+
+ if (fmp->mCurRequest.empty())
+ {
+ fmp->childSetVisible("Simplify", true);
+ fmp->childSetVisible("simplify_cancel", false);
+ fmp->childSetVisible("Decompose", true);
+ fmp->childSetVisible("decompose_cancel", false);
+
+ if (phys_hulls > 0)
+ {
+ fmp->childEnable("Simplify");
+ }
+
+ if (phys_tris || phys_hulls > 0)
+ {
+ fmp->childEnable("Decompose");
+ }
+ }
}
const char* lod_controls[] =