From 3528753a3a5e2f569872c49cdf6154833f483245 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 25 Mar 2011 14:10:35 -0700 Subject: SH-1104 Add additional panel before review step. --- indra/newview/llfloatermodelpreview.cpp | 5 +- indra/newview/llfloatermodelwizard.cpp | 33 ++++- indra/newview/llfloatermodelwizard.h | 1 + .../skins/default/xui/en/floater_model_wizard.xml | 150 ++++++++++++++++++++- 4 files changed, 183 insertions(+), 6 deletions(-) diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 2587ab69c3..254f9f8a5e 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -4518,9 +4518,12 @@ void LLModelPreview::setPreviewLOD(S32 lod) mFMP->childSetTextArg("lod_table_footer", "[DETAIL]", mFMP->getString(lod_name[mPreviewLOD])); mFMP->childSetText("lod_file", mLODFile[mPreviewLOD]); - // the wizard has two lod drop downs + // the wizard has three lod drop downs LLComboBox* combo_box2 = mFMP->getChild("preview_lod_combo2"); combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order + + LLComboBox* combo_box3 = mFMP->getChild("preview_lod_combo3"); + combo_box2->setCurrentByIndex((NUM_LOD-1)-mPreviewLOD); // combo box list of lods is in reverse order LLColor4 highlight_color = LLUIColorTable::instance().getColor("MeshImportTableHighlightColor"); LLColor4 normal_color = LLUIColorTable::instance().getColor("MeshImportTableNormalColor"); diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index eafea1fe03..ad6e4ebe9c 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -46,6 +46,7 @@ static const std::string stateNames[]={ "choose_file", "optimize", "physics", + "physics2", "review", "upload"}; @@ -58,6 +59,7 @@ LLFloaterModelWizard::LLFloaterModelWizard(const LLSD& key) mCommitCallbackRegistrar.add("Wizard.Choose", boost::bind(&LLFloaterModelWizard::setState, this, CHOOSE_FILE)); mCommitCallbackRegistrar.add("Wizard.Optimize", boost::bind(&LLFloaterModelWizard::setState, this, OPTIMIZE)); mCommitCallbackRegistrar.add("Wizard.Physics", boost::bind(&LLFloaterModelWizard::setState, this, PHYSICS)); + mCommitCallbackRegistrar.add("Wizard.Physics2", boost::bind(&LLFloaterModelWizard::setState, this, PHYSICS2)); mCommitCallbackRegistrar.add("Wizard.Review", boost::bind(&LLFloaterModelWizard::setState, this, REVIEW)); mCommitCallbackRegistrar.add("Wizard.Upload", boost::bind(&LLFloaterModelWizard::setState, this, UPLOAD)); } @@ -125,15 +127,29 @@ void LLFloaterModelWizard::setState(int state) getChildView("cancel")->setVisible(true); } - if (state == REVIEW) + if (state == PHYSICS2) { if (mLastEnabledState < state) { executePhysicsStage("Decompose"); } - + mModelPreview->mViewOption["show_physics"] = true; + getChildView("next")->setVisible(true); + getChildView("next")->setEnabled(true); + getChildView("upload")->setVisible(false); + getChildView("close")->setVisible(false); + getChildView("back")->setVisible(true); + getChildView("back")->setEnabled(true); + getChildView("cancel")->setVisible(true); + } + + if (state == REVIEW) + { + + mModelPreview->mViewOption["show_physics"] = false; + getChildView("close")->setVisible(false); getChildView("next")->setVisible(false); getChildView("back")->setVisible(true); @@ -182,6 +198,18 @@ void LLFloaterModelWizard::updateButtons() button->setEnabled(FALSE); } } + + LLButton *physics_button = getChild(stateNames[PHYSICS]+"_btn"); + + if (mState == PHYSICS2) + { + physics_button->setVisible(false); + } + else + { + physics_button->setVisible(true); + } + } void LLFloaterModelWizard::loadModel() @@ -486,6 +514,7 @@ BOOL LLFloaterModelWizard::postBuild() getChild("next")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onClickNext, this)); getChild("preview_lod_combo")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); getChild("preview_lod_combo2")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); + getChild("preview_lod_combo3")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPreviewLODCommit, this, _1)); getChild("accuracy_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onAccuracyPerformance, this, _2)); getChild("upload")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onUpload, this)); getChild("physics_slider")->setCommitCallback(boost::bind(&LLFloaterModelWizard::onPhysicsChanged, this)); diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index 50e4ab1a96..b166d26295 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -80,6 +80,7 @@ private: CHOOSE_FILE = 0, OPTIMIZE, PHYSICS, + PHYSICS2, REVIEW, UPLOAD }; 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 f133d75eee..a6dd6c099d 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -45,6 +45,24 @@ +