Update LLFloaterModelPreview and make it compile~

Collada include_directories and llfloatermodelpreview.*s added to CMakeLists.txt
Update to v-d, compile with AIFilePicker, comment spelling fixes.
Upload Mesh... entry added to File menu.
Updated AIFilePicker to have FFLOAD_COLLADA with an mFilter of "dae"
And, finally, add floater_model_preview.xml~
This commit is contained in:
Lirusaito
2013-01-06 11:56:33 -05:00
parent 297c386b16
commit ac60260da2
8 changed files with 999 additions and 352 deletions

View File

@@ -33,14 +33,14 @@
#ifndef LL_LLFLOATERMODELPREVIEW_H
#define LL_LLFLOATERMODELPREVIEW_H
#include "llmodel.h"
#include "llquaternion.h"
#include "llthread.h"
#include "lldynamictexture.h"
#include "llfloatermodeluploadbase.h"
#include "llquaternion.h"
#include "llmeshrepository.h"
#include "llmodel.h"
#include "llthread.h"
#include "llviewermenufile.h"
#include "llfloatermodeluploadbase.h"
class LLComboBox;
class LLVOAvatar;
@@ -70,7 +70,8 @@ public:
GENERATING_VERTEX_BUFFERS,
GENERATING_LOD,
DONE,
ERROR_PARSING //basically loading failed
ERROR_PARSING, //basically loading failed
ERROR_MATERIALS,
} eLoadState;
U32 mState;
@@ -170,14 +171,14 @@ public:
BOOL handleHover(S32 x, S32 y, MASK mask);
BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
/*virtual*/ void onOpen(const LLSD& key);
/*virtual*/ void onOpen(/*const LLSD& key*/);
static void onMouseCaptureLostModelPreview(LLMouseHandler*);
static void setUploadAmount(S32 amount) { sUploadAmount = amount; }
void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost);
static void onBrowseLOD(void* user_data);
void onBrowseLOD(S32 lod);
static void onReset(void* data);
@@ -188,6 +189,7 @@ public:
void loadModel(S32 lod);
void loadModel(S32 lod, const std::string& file_name, bool force_disable_slm = false);
void onViewOptionChecked(LLUICtrl* ctrl);
bool isViewOptionChecked(const LLSD& userdata);
bool isViewOptionEnabled(const LLSD& userdata);
void setViewOptionEnabled(const std::string& option, bool enabled);
@@ -213,31 +215,22 @@ protected:
friend class LLMeshFilePicker;
friend class LLPhysicsDecomp;
static void onImportScaleCommit(LLUICtrl* ctrl, void*);
static void onPelvisOffsetCommit(LLUICtrl* ctrl, void*);
static void onUploadJointsCommit(LLUICtrl* ctrl, void*);
static void onUploadSkinCommit(LLUICtrl* ctrl, void*);
static void onImportScaleCommit(LLUICtrl*, void*);
static void onPelvisOffsetCommit(LLUICtrl*, void*);
static void onUploadJointsCommit(LLUICtrl*,void*);
static void onUploadSkinCommit(LLUICtrl*,void*);
static void onPreviewLODCommit(LLUICtrl* ctrl, void*);
static void onPreviewLODCommit(LLUICtrl*,void*);
static void onGenerateNormalsCommit(LLUICtrl* ctrl, void*);
static void onGenerateNormalsCommit(LLUICtrl*,void*);
static void toggleGenerateNormals(LLUICtrl* ctrl, void*);
void toggleGenerateNormals();
static void onAutoFillCommit(LLUICtrl* ctrl, void*);
static void onAutoFillCommit(LLUICtrl*,void*);
static void toggleCalculateButtonCallBack(LLUICtrl* ctrl, void* userdata);
void onLODParamCommit(S32 lod, bool enforce_tri_limit);
static void onClickCalculateBtn(void* userdata);
static void onLoDSourceCommit(LLUICtrl* ctrl, void* userdata);
static void onViewOptionChecked(LLUICtrl* ctrl, void* userdata);
static void onLODParamCommit(LLUICtrl* ctrl, void* userdata);
static void onLODParamCommitEnforceTriLimit(LLUICtrl* ctrl, void* userdata);
static void onExplodeCommit(LLUICtrl* ctrl, void*);
static void onExplodeCommit(LLUICtrl*, void*);
static void onPhysicsParamCommit(LLUICtrl* ctrl, void* userdata);
static void onPhysicsStageExecute(LLUICtrl* ctrl, void* userdata);
@@ -252,19 +245,18 @@ protected:
void draw();
void initDecompControls();
void initDecompControls();
void setStatusMessage(const std::string& msg);
void setStatusMessage(const std::string& msg);
LLModelPreview* mModelPreview;
LLPhysicsDecomp::decomp_params mDecompParams;
S32 mLastMouseX;
S32 mLastMouseY;
LLRect mPreviewRect;
U32 mGLName;
static S32 sUploadAmount;
S32 mLastMouseX;
S32 mLastMouseY;
LLRect mPreviewRect;
static S32 sUploadAmount;
std::set<LLPointer<DecompRequest> > mCurRequest;
std::string mStatusMessage;
@@ -283,6 +275,11 @@ protected:
LLSD mModelPhysicsFee;
private:
void onClickCalculateBtn();
void toggleCalculateButton();
void onLoDSourceCommit(S32 lod);
// Toggles between "Calculate weights & fee" and "Upload" buttons.
void toggleCalculateButton(bool visible);
@@ -295,10 +292,11 @@ private:
LLButton* mCalculateBtn;
};
class LLMeshFilePicker : public LLFilePickerThread
class LLMeshFilePicker : public AIFilePicker
{
public:
LLMeshFilePicker(LLModelPreview* mp, S32 lod);
static void loadFromCollada(LLMeshFilePicker* filepicker);
virtual void notify(const std::string& filename);
private: