summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermodelpreview.h')
-rw-r--r--indra/newview/llfloatermodelpreview.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 8a01f7db2c..68fa0fa4c1 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -76,6 +76,7 @@ public:
LLMatrix4 mTransform;
BOOL mFirstTransform;
LLVector3 mExtents[2];
+ bool mTrySLM;
std::map<daeElement*, LLPointer<LLModel> > mModel;
@@ -96,7 +97,10 @@ public:
LLModelLoader(std::string filename, S32 lod, LLModelPreview* preview);
virtual void run();
-
+ bool doLoadModel();
+ bool loadFromSLM(const std::string& filename);
+ void loadModelCallback();
+
void loadTextures() ; //called in the main thread.
void processElement(daeElement* element);
std::vector<LLImportMaterial> getMaterials(LLModel* model, domInstance_geometry* instance_geo);
@@ -117,9 +121,8 @@ public:
void handlePivotPoint( daeElement* pRoot );
bool isNodeAPivotPoint( domNode* pNode );
- void setLoadState( U32 state ) { mState = state; }
- U32 getLoadState( void ) { return mState; }
-
+ void setLoadState(U32 state);
+
//map of avatar joints as named in COLLADA assets to internal joint names
std::map<std::string, std::string> mJointMap;
std::deque<std::string> mMasterJointList;
@@ -183,6 +186,7 @@ protected:
friend class LLPhysicsDecomp;
static void onImportScaleCommit(LLUICtrl*, void*);
+ static void onPelvisOffsetCommit(LLUICtrl*, void*);
static void onUploadJointsCommit(LLUICtrl*,void*);
static void onUploadSkinCommit(LLUICtrl*,void*);
@@ -286,6 +290,8 @@ public:
void clearMaterials();
U32 calcResourceCost();
void rebuildUploadData();
+ void saveUploadData(bool save_skinweights, bool save_joint_poisitions);
+ void saveUploadData(const std::string& filename, bool save_skinweights, bool save_joint_poisitions);
void clearIncompatible(S32 lod);
void updateStatusMessages();
void clearGLODGroup();
@@ -293,13 +299,19 @@ public:
const bool getModelPivot( void ) const { return mHasPivot; }
void setHasPivot( bool val ) { mHasPivot = val; }
void setModelPivot( const LLVector3& pivot ) { mModelPivot = pivot; }
+ const bool isRigValid( void ) const { return mRigValid; }
+ void setRigValid( bool rigValid ) { mRigValid = rigValid; }
static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
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); }
+ void setLoadState( U32 state ) { mLoadState = state; }
+ U32 getLoadState() { return mLoadState; }
+
protected:
+ friend class LLModelLoader;
friend class LLFloaterModelPreview;
friend class LLFloaterModelWizard;
friend class LLFloaterModelPreview::DecompRequest;
@@ -323,7 +335,8 @@ public:
U32 mResourceCost;
std::string mLODFile[LLModel::NUM_LODS];
bool mLoading;
-
+ U32 mLoadState;
+
std::map<std::string, bool> mViewOption;
//GLOD object parameters (must rebuild object if these change)
@@ -331,6 +344,8 @@ public:
U32 mBuildQueueMode;
U32 mBuildOperator;
U32 mBuildBorderMode;
+ S32 mRequestedTriangleCount[LLModel::NUM_LODS];
+
LLModelLoader* mModelLoader;
@@ -356,6 +371,10 @@ public:
LLVector3 mModelPivot;
bool mHasPivot;
+
+ float mPelvisZOffset;
+
+ bool mRigValid;
};