diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index d5619f5259..58cf8dfd7e 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -5458,8 +5458,24 @@ void LLFloaterModelPreview::toggleCalculateButton() void LLFloaterModelPreview::toggleCalculateButton(bool visible) { mCalculateBtn->setVisible(visible); + + bool uploadingSkin = childGetValue("upload_skin").asBoolean(); + bool uploadingJointPositions = childGetValue("upload_joints").asBoolean(); + if ( uploadingSkin ) + { + //Disable the calculate button *if* the rig is invalid - which is determined during the critiquing process + if ( uploadingJointPositions && !mModelPreview->isRigValidForJointPositionUpload() ) + { + mCalculateBtn->setVisible( false ); + } + else + if ( !mModelPreview->isLegacyRigValid() ) + { + mCalculateBtn->setVisible( false ); + } + } + mUploadBtn->setVisible(!visible); - //mUploadBtn->setEnabled(mHasUploadPerm); mUploadBtn->setEnabled(mHasUploadPerm && !mUploadModelUrl.empty()); if (visible) |