From d625706d84cbb69d99497d3ee328105907867181 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 22 Jun 2011 19:31:03 +0300 Subject: SH-1725 WIP Floater upload model wizard update: - XUI changed according to latest mockups - Added switching to advanced upload floater - Added "Recalculate geometry" and "Recalculate physics" buttons --- indra/newview/llfloatermodelpreview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index ccd6fef953..d78135779e 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -185,6 +185,7 @@ public: void updateResourceCost(); void loadModel(S32 lod); + void loadModel(S32 lod, const std::string& file_name); void onViewOptionChecked(const LLSD& userdata); bool isViewOptionChecked(const LLSD& userdata); -- cgit v1.2.3 From fc6f0f31be53d6adbc8e364ffdd4119943312578 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Wed, 29 Jun 2011 17:22:18 +0300 Subject: SH-1726 FIXED (Viewer modifications to advanced model upload to accommodate upload fee & prim equivalency) - Changed XUI according to the spec - Added requesting upload permission, physics weight and fee weight - Split requesting fee and uploading model steps in mesh repository --- indra/newview/llfloatermodelpreview.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index ab50890fb9..62878812c3 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -140,7 +140,7 @@ private: static bool isAlive(LLModelLoader* loader) ; }; -class LLFloaterModelPreview : public LLFloater +class LLFloaterModelPreview : public LLFloaterModelUploadBase { public: @@ -167,6 +167,8 @@ public: BOOL handleHover(S32 x, S32 y, MASK mask); BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); + /*virtual*/ void onOpen(const LLSD& key); + static void onMouseCaptureLostModelPreview(LLMouseHandler*); static void setUploadAmount(S32 amount) { sUploadAmount = amount; } @@ -194,6 +196,16 @@ public: void enableViewOption(const std::string& option); void disableViewOption(const std::string& option); + // shows warning message if agent has no permissions to upload model + /*virtual*/ void onPermReceived(const LLSD& result); + + // called when error occurs during permissions request + /*virtual*/ void setPermErrorStatus(U32 status, const std::string& reason); + + /*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url); + + /*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason); + protected: friend class LLModelPreview; friend class LLMeshFilePicker; @@ -259,6 +271,14 @@ protected: LLToggleableMenu* mViewOptionMenu; LLMutex* mStatusLock; +private: + void onClickCalculateBtn(); + + // Toggles between "Calculate weights & fee" and "Upload" buttons. + void toggleCalculateButton(bool visible); + + LLButton* mUploadBtn; + LLButton* mCalculateBtn; }; class LLMeshFilePicker : public LLFilePickerThread -- cgit v1.2.3 From e4b12b83e8721e0856af0305f6cee46cd6092024 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 29 Jun 2011 22:03:29 +0300 Subject: SH-1725 WIP Added upload permissions and fee requests to Upload Model Wizard. - Enabled warning for users without upload permissions. - Enabled "Calculate weights & fee" button. - Temporarily enabled to upload meshes if upload permission capability request has failed. --- indra/newview/llfloatermodelpreview.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 62878812c3..6d5e46d9e4 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -197,10 +197,10 @@ public: void disableViewOption(const std::string& option); // shows warning message if agent has no permissions to upload model - /*virtual*/ void onPermReceived(const LLSD& result); + /*virtual*/ void onPermissionsReceived(const LLSD& result); // called when error occurs during permissions request - /*virtual*/ void setPermErrorStatus(U32 status, const std::string& reason); + /*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason); /*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url); -- cgit v1.2.3 From c7bbe8e63149af214175bffcf4d3710654584c1d Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 30 Jun 2011 15:38:58 +0300 Subject: SH-1726 ADDITIONAL FIX (Viewer modifications to advanced model upload to accomodate upload fee & prim equivilancy) - Added a signal on model change to initiate recalculating (calculate phys&fee button is shown again) - Show 'calculate phys&fee' button on fee request error --- indra/newview/llfloatermodelpreview.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llfloatermodelpreview.h') 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 details_signal_t; typedef boost::signals2::signal model_loaded_signal_t; + typedef boost::signals2::signal 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; -- cgit v1.2.3 From 06b1202747c07409c877cb89432f0df0bfacba47 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 30 Jun 2011 19:58:27 +0300 Subject: - SH-1726 ADDITIONAL FIX (Viewer modifications to advanced model upload to accommodate upload fee & prim equivalency) added the link for "Find out how" in warning text of advanced upload floater advanced upload, button returns to "get fees" whenever any option that affects price changes --- indra/newview/llfloatermodelpreview.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 7f27da4699..eccc9ce1b6 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -273,6 +273,7 @@ protected: private: void onClickCalculateBtn(); + void toggleCalculateButton(); // Toggles between "Calculate weights & fee" and "Upload" buttons. void toggleCalculateButton(bool visible); -- cgit v1.2.3 From 8accd2cc045e016d6198f13b27001b7b31028da7 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 1 Jul 2011 16:39:49 -0400 Subject: SH-1725 SH-1726 FIX mesh upload wizard & advanced don't handle upload errors gracefully Restructured the code to be a bit cleaner, now have callbacks with appropriate functionality in both the wizard and advanced uploaders. If the upload fails, it requires the user to re-submit the recalculate request. --- indra/newview/llfloatermodelpreview.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index eccc9ce1b6..119c593221 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -206,6 +206,10 @@ public: /*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason); + /*virtual*/ void onModelUploadSuccess(); + + /*virtual*/ void onModelUploadFailure(); + protected: friend class LLModelPreview; friend class LLMeshFilePicker; -- cgit v1.2.3 From 71eb68a85d5a5157622ae8f42bac1c21f00d54cd Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 6 Jul 2011 18:54:50 -0500 Subject: Fix for "set to default" button not resetting some data. --- indra/newview/llfloatermodelpreview.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 119c593221..56098c6250 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -162,6 +162,8 @@ public: virtual BOOL postBuild(); + void initModelPreview(); + BOOL handleMouseDown(S32 x, S32 y, MASK mask); BOOL handleMouseUp(S32 x, S32 y, MASK mask); BOOL handleHover(S32 x, S32 y, MASK mask); @@ -187,7 +189,7 @@ public: void updateResourceCost(); void loadModel(S32 lod); - void loadModel(S32 lod, const std::string& file_name); + void loadModel(S32 lod, const std::string& file_name, bool force_disable_slm = false); void onViewOptionChecked(const LLSD& userdata); bool isViewOptionChecked(const LLSD& userdata); @@ -324,7 +326,7 @@ public: virtual BOOL needsRender() { return mNeedsUpdate; } void setPreviewLOD(S32 lod); void clearModel(S32 lod); - void loadModel(std::string filename, S32 lod); + void loadModel(std::string filename, S32 lod, bool force_disable_slm = false); void loadModelCallback(S32 lod); void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false); void generateNormals(); -- cgit v1.2.3 From 2a6e18d147a3ef3f5a8780233c1cef2f7b69af4a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 7 Jul 2011 18:32:42 -0500 Subject: SH-1774 Fix for preserving material assignments between multiple custom LoDs. --- indra/newview/llfloatermodelpreview.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 56098c6250..e252c9a677 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -109,7 +109,7 @@ public: void loadTextures() ; //called in the main thread. void processElement(daeElement* element, bool& badElement); - std::vector getMaterials(LLModel* model, domInstance_geometry* instance_geo); + std::map getMaterials(LLModel* model, domInstance_geometry* instance_geo); LLImportMaterial profileToMaterial(domProfile_COMMON* material); std::string getElementLabel(daeElement *element); LLColor4 getDaeColor(daeElement* element); @@ -182,8 +182,6 @@ public: static void onUpload(void* data); - static void onClearMaterials(void* data); - static void refresh(LLUICtrl* ctrl, void* data); void updateResourceCost(); @@ -330,7 +328,6 @@ public: void loadModelCallback(S32 lod); void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false); void generateNormals(); - void clearMaterials(); U32 calcResourceCost(); void rebuildUploadData(); void saveUploadData(bool save_skinweights, bool save_joint_poisitions); -- cgit v1.2.3 From 7029c8ff534419a3bcfd0e5fc39a4739e4cdc19c Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Sat, 9 Jul 2011 14:58:14 -0700 Subject: Fix for SH-2028. Also fixed layout issues with new upload warning and upload price text when floater is resized. --- indra/newview/llfloatermodelpreview.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e252c9a677..fb4a39535d 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -202,7 +202,7 @@ public: // called when error occurs during permissions request /*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason); - /*virtual*/ void onModelPhysicsFeeReceived(F64 physics, S32 fee, std::string upload_url); + /*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url); /*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason); -- cgit v1.2.3 From 29d5413ea6c2d0782ab55916d9d9428ae00c1ace Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 9 Jul 2011 17:01:33 -0500 Subject: SH-2007 Code cleanup, expand minimum header size to 4KB, better comments around magic numbers, remove dead calcResourceCost --- indra/newview/llfloatermodelpreview.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index e252c9a677..f434987b9e 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -184,8 +184,6 @@ public: static void refresh(LLUICtrl* ctrl, void* data); - void updateResourceCost(); - void loadModel(S32 lod); void loadModel(S32 lod, const std::string& file_name, bool force_disable_slm = false); -- cgit v1.2.3 From 922bc0aa6ac35175618c54d1e5649678f6b62417 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 12 Jul 2011 13:22:01 -0500 Subject: SH-2053 Don't poke the UI from a background thread -- it tends to get crashy. --- indra/newview/llfloatermodelpreview.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 29a61d6ed3..3a5f7602fe 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -201,7 +201,7 @@ public: /*virtual*/ void setPermissonsErrorStatus(U32 status, const std::string& reason); /*virtual*/ void onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url); - + void handleModelPhysicsFeeReceived(); /*virtual*/ void setModelPhysicsFeeErrorStatus(U32 status, const std::string& reason); /*virtual*/ void onModelUploadSuccess(); @@ -273,6 +273,8 @@ protected: LLToggleableMenu* mViewOptionMenu; LLMutex* mStatusLock; + LLSD mModelPhysicsFee; + private: void onClickCalculateBtn(); void toggleCalculateButton(); -- cgit v1.2.3 From 9b7165121acd3fc93ef9b17354cca515cd6849cf Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 14 Jul 2011 11:36:32 -0400 Subject: Fix for Sh-2047: Partial joint arrays are now able to upload --- indra/newview/llfloatermodelpreview.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.h') diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 3a5f7602fe..c24e171024 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -365,9 +365,6 @@ public: void setLoadState( U32 state ) { mLoadState = state; } U32 getLoadState() { return mLoadState; } - //setRestJointFlag: If an asset comes through that changes the joints, we want the reset to persist - void setResetJointFlag( bool state ) { if ( !mResetJoints ) mResetJoints = state; } - const bool getResetJointFlag( void ) const { return mResetJoints; } void setRigWithSceneParity( bool state ) { mRigParityWithScene = state; } const bool getRigWithSceneParity( void ) const { return mRigParityWithScene; } -- cgit v1.2.3