diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 3 | ||||
-rw-r--r-- | indra/newview/llfloatermodeluploadbase.h | 14 | ||||
-rw-r--r-- | indra/newview/lluploadfloaterobservers.h | 6 |
4 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index cfb413491d..5a1cd9091a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -445,6 +445,7 @@ BOOL LLFloaterModelPreview::postBuild() mModelPreview = new LLModelPreview(512, 512, this ); mModelPreview->setPreviewTarget(16.f); mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5)); + mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::toggleCalculateButton, this, _1)); //set callbacks for left click on line editor rows for (U32 i = 0; i <= LLModel::LOD_HIGH; i++) @@ -561,8 +562,6 @@ void LLFloaterModelPreview::loadModel(S32 lod, const std::string& file_name) void LLFloaterModelPreview::onClickCalculateBtn() { - childSetTextArg("weights", "[EQ]", llformat("%d", mModelPreview->mResourceCost)); - mModelPreview->rebuildUploadData(); bool upload_skinweights = childGetValue("upload_skin").asBoolean(); @@ -654,9 +653,6 @@ void LLFloaterModelPreview::onUploadSkinCommit(LLUICtrl*,void* userdata) { return; } - - fp->toggleCalculateButton(true); - fp->mModelPreview->refresh(); fp->mModelPreview->resetPreviewTarget(); fp->mModelPreview->clearBuffers(); @@ -686,7 +682,6 @@ void LLFloaterModelPreview::onGenerateNormalsCommit(LLUICtrl* ctrl, void* userda { LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata; - fp->toggleCalculateButton(true); fp->mModelPreview->generateNormals(); } @@ -711,7 +706,6 @@ void LLFloaterModelPreview::onLODParamCommit(LLUICtrl* ctrl, void* userdata) { LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata; - fp->toggleCalculateButton(true); fp->mModelPreview->onLODParamCommit(false); } @@ -719,7 +713,6 @@ void LLFloaterModelPreview::onLODParamCommit(LLUICtrl* ctrl, void* userdata) void LLFloaterModelPreview::onLODParamCommitTriangleLimit(LLUICtrl* ctrl, void* userdata) { LLFloaterModelPreview* fp = (LLFloaterModelPreview*) userdata; - fp->toggleCalculateButton(true); fp->mModelPreview->onLODParamCommit(true); } @@ -4473,6 +4466,8 @@ void LLModelPreview::updateStatusMessages() crease->forceSetValue(mRequestedCreaseAngle[mPreviewLOD]); } + mModelUpdatedSignal(true); + } void LLModelPreview::setPreviewTarget(F32 distance) @@ -5441,6 +5436,7 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) void LLFloaterModelPreview::onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) { mUploadModelUrl = upload_url; + childSetTextArg("weights", "[EQ]", llformat("%d", mModelPreview->mResourceCost)); childSetTextArg("weights", "[PH]", llformat("%.3f", physics)); childSetTextArg("weights", "[FEE]", llformat("%d", fee)); childSetVisible("weights", true); @@ -5449,6 +5445,7 @@ void LLFloaterModelPreview::onModelPhysicsFeeReceived(F64 physics, S32 fee, std: void LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) { + toggleCalculateButton(true); llwarns << "LLFloaterModelPreview::setModelPhysicsFeeErrorStatus(" << status << " : " << reason << ")" << llendl; } diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 6d5e46d9e4..7f27da4699 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -297,6 +297,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex { typedef boost::signals2::signal<void (F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost)> details_signal_t; typedef boost::signals2::signal<void (void)> model_loaded_signal_t; + typedef boost::signals2::signal<void (bool)> model_updated_signal_t; public: LLModelPreview(S32 width, S32 height, LLFloater* fmp); @@ -356,6 +357,7 @@ public: boost::signals2::connection setDetailsCallback( const details_signal_t::slot_type& cb ){ return mDetailsSignal.connect(cb); } boost::signals2::connection setModelLoadedCallback( const model_loaded_signal_t::slot_type& cb ){ return mModelLoadedSignal.connect(cb); } + boost::signals2::connection setModelUpdatedCallback( const model_updated_signal_t::slot_type& cb ){ return mModelUpdatedSignal.connect(cb); } void setLoadState( U32 state ) { mLoadState = state; } U32 getLoadState() { return mLoadState; } @@ -441,6 +443,7 @@ private: details_signal_t mDetailsSignal; model_loaded_signal_t mModelLoadedSignal; + model_updated_signal_t mModelUpdatedSignal; LLVector3 mModelPivot; bool mHasPivot; diff --git a/indra/newview/llfloatermodeluploadbase.h b/indra/newview/llfloatermodeluploadbase.h index a4e300563d..bb5e710273 100644 --- a/indra/newview/llfloatermodeluploadbase.h +++ b/indra/newview/llfloatermodeluploadbase.h @@ -24,8 +24,8 @@ * $/LicenseInfo$ */ -#ifndef LLFLOATERMODELUPLOADBASE_H_ -#define LLFLOATERMODELUPLOADBASE_H_ +#ifndef LL_LLFLOATERMODELUPLOADBASE_H +#define LL_LLFLOATERMODELUPLOADBASE_H #include "lluploadfloaterobservers.h" @@ -37,13 +37,13 @@ public: virtual ~LLFloaterModelUploadBase(){}; - virtual void setPermissonsErrorStatus(U32 status, const std::string& reason){}; + virtual void setPermissonsErrorStatus(U32 status, const std::string& reason) = 0; - virtual void onPermissionsReceived(const LLSD& result){}; + virtual void onPermissionsReceived(const LLSD& result) = 0; - virtual void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url){}; + virtual void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url) = 0; - virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason){}; + virtual void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason) = 0; protected: @@ -54,4 +54,4 @@ protected: bool mHasUploadPerm; }; -#endif /* LLFLOATERMODELUPLOADBASE_H_ */ +#endif /* LL_LLFLOATERMODELUPLOADBASE_H */ diff --git a/indra/newview/lluploadfloaterobservers.h b/indra/newview/lluploadfloaterobservers.h index 23206549e7..fb4be72378 100644 --- a/indra/newview/lluploadfloaterobservers.h +++ b/indra/newview/lluploadfloaterobservers.h @@ -24,8 +24,8 @@ * $/LicenseInfo$ */ -#ifndef LLUPLOADFLOATEROBSERVERS_H_ -#define LLUPLOADFLOATEROBSERVERS_H_ +#ifndef LL_LLUPLOADFLOATEROBSERVERS_H +#define LL_LLUPLOADFLOATEROBSERVERS_H #include "llfloater.h" #include "llhttpclient.h" @@ -76,4 +76,4 @@ private: LLHandle<LLUploadPermissionsObserver> mObserverHandle; }; -#endif /* LLUPLOADFLOATEROBSERVERS_H_ */ +#endif /* LL_LLUPLOADFLOATEROBSERVERS_H */ |