summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-09-28 13:45:42 -0500
committerDave Parks <davep@lindenlab.com>2010-09-28 13:45:42 -0500
commit613894c8cca25f9fa86da7056da3594fe8771d46 (patch)
tree4667e95a7041fe8d2b08209c73a803f8370a01f1 /indra/llprimitive
parent7c2b9221d6678ea7a04f529efaa2e557abce504d (diff)
SH-238 Add check boxes to upload skin weights (or not) and/or joint positions (or not).
Remove llfloaterimportcollada Reviewed by Prep.
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmodel.cpp10
-rw-r--r--indra/llprimitive/llmodel.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index f3f9c29157..b2f80de12a 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1288,11 +1288,11 @@ LLModel* LLModel::loadModelFromDomMesh(domMesh *mesh)
}
//static
-LLSD LLModel::writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, BOOL nowrite)
+LLSD LLModel::writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, bool upload_skin, bool upload_joints, bool nowrite)
{
std::ofstream os(filename.c_str(), std::ofstream::out | std::ofstream::binary);
- LLSD header = writeModel(os, physics, high, medium, low, impostor, decomp, nowrite);
+ LLSD header = writeModel(os, physics, high, medium, low, impostor, decomp, upload_skin, upload_joints, nowrite);
os.close();
@@ -1300,7 +1300,7 @@ LLSD LLModel::writeModel(std::string filename, LLModel* physics, LLModel* high,
}
//static
-LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, BOOL nowrite)
+LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* impostor, LLModel::physics_shape& decomp, bool upload_skin, bool upload_joints, bool nowrite)
{
LLSD mdl;
@@ -1313,7 +1313,7 @@ LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LL
physics
};
- bool skinning = high && !high->mSkinWeights.empty();
+ bool skinning = upload_skin && high && !high->mSkinWeights.empty();
if (skinning)
{ //write skinning block
@@ -1343,7 +1343,7 @@ LLSD LLModel::writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LL
}
}
- if ( high->mAlternateBindMatrix.size() > 0 )
+ if ( upload_joints && high->mAlternateBindMatrix.size() > 0 )
{
for (U32 i = 0; i < high->mJointList.size(); ++i)
{
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index ff22d39e60..e6696b984f 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -60,8 +60,8 @@ public:
typedef std::vector<std::vector<LLVector3> > physics_shape;
LLModel(LLVolumeParams& params, F32 detail);
- static LLSD writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, BOOL nowrite = FALSE);
- static LLSD writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, BOOL nowrite = FALSE);
+ static LLSD writeModel(std::string filename, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, bool upload_skin, bool upload_joints, bool nowrite = FALSE);
+ static LLSD writeModel(std::ostream& ostr, LLModel* physics, LLModel* high, LLModel* medium, LLModel* low, LLModel* imposotr, LLModel::physics_shape& physics_shape, bool upload_skin, bool upload_joints, bool nowrite = FALSE);
static LLSD writeModelToStream(std::ostream& ostr, LLSD& mdl, BOOL nowrite = FALSE);
static LLModel* loadModelFromAsset(std::string filename, S32 lod);
static LLModel* loadModelFromDae(std::string filename);