summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-03-23 11:36:00 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-03-23 11:36:00 -0700
commit3ad81bb4a642d25018b773d2ef005380664d8170 (patch)
treeb1bbf66c0babf6c541858b34d4a7f66ad19308b0 /indra/llprimitive
parenta2c659378b8b7c8a4128c61b5cde91eccc9db4e6 (diff)
parent62a958d341532287519a23a362ff7aebd501e1c9 (diff)
Merge
Diffstat (limited to 'indra/llprimitive')
-rwxr-xr-xindra/llprimitive/llmodel.cpp5
-rwxr-xr-xindra/llprimitive/llmodel.h4
-rw-r--r--indra/llprimitive/lltextureentry.cpp22
3 files changed, 13 insertions, 18 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index a9101378a4..3669fef0dc 100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -57,8 +57,10 @@ const int MODEL_NAMES_LENGTH = sizeof(model_names) / sizeof(std::string);
LLModel::LLModel(LLVolumeParams& params, F32 detail)
: LLVolume(params, detail), mNormalizedScale(1,1,1), mNormalizedTranslation(0,0,0)
+ , mPelvisOffset( 0.0f )
{
mDecompID = -1;
+ mLocalID = -1;
}
LLModel::~LLModel()
@@ -1497,6 +1499,7 @@ LLSD LLModel::writeModel(
}
}
+
if ( upload_joints && high->mAlternateBindMatrix.size() > 0 )
{
for (U32 i = 0; i < high->mJointList.size(); ++i)
@@ -1509,6 +1512,8 @@ LLSD LLModel::writeModel(
}
}
}
+
+ mdl["skin"]["pelvis_offset"] = high->mPelvisOffset;
}
}
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index c10ca1c11b..addf527d8d 100755
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -194,6 +194,7 @@ public:
LLVector3 mNormalizedScale;
LLVector3 mNormalizedTranslation;
+ float mPelvisOffset;
// convex hull decomposition
S32 mDecompID;
convex_hull_decomposition mConvexHullDecomp;
@@ -204,6 +205,9 @@ public:
std::vector<LLVector3> mHullCenter;
U32 mHullPoints;
+ //ID for storing this model in a .slm file
+ S32 mLocalID;
+
protected:
void addVolumeFacesFromDomMesh(domMesh* mesh);
virtual BOOL createVolumeFacesFromFile(const std::string& file_name);
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 861bde5c89..34eff17519 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -423,24 +423,10 @@ S32 LLTextureEntry::setBumpShinyFullbright(U8 bump)
S32 LLTextureEntry::setMediaTexGen(U8 media)
{
- if (mMediaFlags != media)
- {
- mMediaFlags = media;
-
- // Special code for media handling
- if( hasMedia() && mMediaEntry == NULL)
- {
- mMediaEntry = new LLMediaEntry;
- }
- else if ( ! hasMedia() && mMediaEntry != NULL)
- {
- delete mMediaEntry;
- mMediaEntry = NULL;
- }
-
- return TEM_CHANGE_MEDIA;
- }
- return TEM_CHANGE_NONE;
+ S32 result = TEM_CHANGE_NONE;
+ result |= setTexGen(media & TEM_TEX_GEN_MASK);
+ result |= setMediaFlags(media & TEM_MEDIA_MASK);
+ return result;
}
S32 LLTextureEntry::setBumpmap(U8 bump)