From db1af2445dac667eb24c69d005509b8ff007cc9e Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Thu, 9 Dec 2010 17:30:17 -0800 Subject: Initial code for the upload model wizard - loading model is working, not much else --- indra/newview/llfloatermodelwizard.h | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 indra/newview/llfloatermodelwizard.h (limited to 'indra/newview/llfloatermodelwizard.h') diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h new file mode 100644 index 0000000000..c766697d47 --- /dev/null +++ b/indra/newview/llfloatermodelwizard.h @@ -0,0 +1,58 @@ +/** + * @file llfloatermodelwizard.h + * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERMODELWIZARD_H +#define LLFLOATERMODELWIZARD_H + +class LLModelPreview; + +class LLFloaterModelWizard : public LLFloater +{ +public: + LLFloaterModelWizard(const LLSD& key); + virtual ~LLFloaterModelWizard() {}; + /*virtual*/ BOOL postBuild(); + void draw(); + void loadModel(); + //void onSave(); + //void onReset(); + //void onCancel(); + ///*virtual*/ void onOpen(const LLSD& key); + +private: + + LLModelPreview* mModelPreview; + LLRect mPreviewRect; +}; +/* +namespace LLFloaterDisplayNameUtil +{ + // Register with LLFloaterReg + void registerFloater(); +} +*/ + + +#endif -- cgit v1.2.3 From e7f3f3bdbbec310030209e09d389cd434adb7991 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Mon, 20 Dec 2010 17:32:05 -0800 Subject: model upload wizard - added optimization and state changes --- indra/newview/llfloatermodelwizard.h | 38 ++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'indra/newview/llfloatermodelwizard.h') diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index c766697d47..ab69d93b63 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -35,24 +35,36 @@ public: virtual ~LLFloaterModelWizard() {}; /*virtual*/ BOOL postBuild(); void draw(); - void loadModel(); - //void onSave(); - //void onReset(); - //void onCancel(); - ///*virtual*/ void onOpen(const LLSD& key); private: - + enum EWizardState + { + CHOOSE_FILE = 0, + OPTIMIZE, + PHYSICS, + REVIEW, + UPLOAD + }; + + void setState(int state); + void setButtons(int state); + void onClickCancel(); + void onClickBack(); + void onClickNext(); + bool onEnableNext(); + bool onEnableBack(); + void loadModel(); + static void onPreviewLODCommit(LLUICtrl*,void*); + void onAccuracyPerformance(const LLSD& data); + static void onUpload(void* data); + LLModelPreview* mModelPreview; LLRect mPreviewRect; + int mState; + + + }; -/* -namespace LLFloaterDisplayNameUtil -{ - // Register with LLFloaterReg - void registerFloater(); -} -*/ #endif -- cgit v1.2.3 From 6175e8147ff85073c67de89f08e5ecea891e1ef8 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Tue, 21 Dec 2010 17:01:03 -0800 Subject: fixed wizard model not previewing issues and added pan/zoom --- indra/newview/llfloatermodelwizard.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llfloatermodelwizard.h') diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index ab69d93b63..b7fd28aa9d 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -36,6 +36,11 @@ public: /*virtual*/ BOOL postBuild(); void draw(); + BOOL handleMouseDown(S32 x, S32 y, MASK mask); + BOOL handleMouseUp(S32 x, S32 y, MASK mask); + BOOL handleHover(S32 x, S32 y, MASK mask); + BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); + private: enum EWizardState { @@ -62,6 +67,8 @@ private: LLRect mPreviewRect; int mState; + S32 mLastMouseX; + S32 mLastMouseY; }; -- cgit v1.2.3 From d196348d0f4bd542eee3702329dab28952b8a5e5 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Fri, 31 Dec 2010 12:53:39 -0800 Subject: Physics stage of wizard --- indra/newview/llfloatermodelwizard.h | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloatermodelwizard.h') diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index b7fd28aa9d..eaf188ed40 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -26,13 +26,35 @@ #ifndef LLFLOATERMODELWIZARD_H #define LLFLOATERMODELWIZARD_H + +#include "llmeshrepository.h" +#include "llmodel.h" +#include "llthread.h" + + class LLModelPreview; + class LLFloaterModelWizard : public LLFloater { public: + + class DecompRequest : public LLPhysicsDecomp::Request + { + public: + S32 mContinue; + LLPointer mModel; + + DecompRequest(const std::string& stage, LLModel* mdl); + virtual S32 statusCallback(const char* status, S32 p1, S32 p2); + virtual void completed(); + + }; + + static LLFloaterModelWizard* sInstance; + LLFloaterModelWizard(const LLSD& key); - virtual ~LLFloaterModelWizard() {}; + virtual ~LLFloaterModelWizard(); /*virtual*/ BOOL postBuild(); void draw(); @@ -41,6 +63,14 @@ public: BOOL handleHover(S32 x, S32 y, MASK mask); BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); + + void initDecompControls(); + + LLPhysicsDecomp::decomp_params mDecompParams; + std::set > mCurRequest; + std::string mStatusMessage; + static void executePhysicsStage(std::string stage_name); + private: enum EWizardState { @@ -59,9 +89,9 @@ private: bool onEnableNext(); bool onEnableBack(); void loadModel(); - static void onPreviewLODCommit(LLUICtrl*,void*); + void onPreviewLODCommit(LLUICtrl*); void onAccuracyPerformance(const LLSD& data); - static void onUpload(void* data); + void onUpload(); LLModelPreview* mModelPreview; LLRect mPreviewRect; -- cgit v1.2.3 From f243f7e550b9dadd26d119bfeb4b215aa809997c Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Thu, 6 Jan 2011 16:42:18 -0800 Subject: added callback for updating wizard dimensions and costs from the model preview properly enabling/disabling wizard buttons xml ui fixes --- indra/newview/llfloatermodelwizard.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatermodelwizard.h') diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index eaf188ed40..335f4f4b56 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -57,13 +57,15 @@ public: virtual ~LLFloaterModelWizard(); /*virtual*/ BOOL postBuild(); void draw(); + void refresh(); BOOL handleMouseDown(S32 x, S32 y, MASK mask); BOOL handleMouseUp(S32 x, S32 y, MASK mask); BOOL handleHover(S32 x, S32 y, MASK mask); BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); - + void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost); + void initDecompControls(); LLPhysicsDecomp::decomp_params mDecompParams; -- cgit v1.2.3 From 3a47555dc27ffa74f5427e0ef44fa25b505f6c16 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Wed, 12 Jan 2011 13:38:47 -0800 Subject: SH-777 Wizard top buttons need to be clickable and switch between wizard steps --- indra/newview/llfloatermodelwizard.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloatermodelwizard.h') diff --git a/indra/newview/llfloatermodelwizard.h b/indra/newview/llfloatermodelwizard.h index 335f4f4b56..50e4ab1a96 100644 --- a/indra/newview/llfloatermodelwizard.h +++ b/indra/newview/llfloatermodelwizard.h @@ -65,7 +65,8 @@ public: BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost); - + void modelLoadedCallback(); + void onPhysicsChanged(); void initDecompControls(); LLPhysicsDecomp::decomp_params mDecompParams; @@ -84,7 +85,7 @@ private: }; void setState(int state); - void setButtons(int state); + void updateButtons(); void onClickCancel(); void onClickBack(); void onClickNext(); @@ -102,6 +103,8 @@ private: S32 mLastMouseX; S32 mLastMouseY; + U32 mLastEnabledState; + }; -- cgit v1.2.3 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/llfloatermodelwizard.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloatermodelwizard.h') 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 }; -- cgit v1.2.3