summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAura Linden <aura@lindenlab.com>2015-10-27 15:15:34 -0700
committerAura Linden <aura@lindenlab.com>2015-10-27 15:15:34 -0700
commit97374a5362f097afd3027ea51757de2e36af4798 (patch)
treed8873f7076c0858c80faec7a3bf8d398c8d99c60 /indra/newview
parent2f6166a5a4f8d5be679cef0699142c4ef061fb55 (diff)
Fixes SL-202 joint offset and skin weight import. Race condition still exists.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llappviewer.cpp2
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp20
-rwxr-xr-xindra/newview/llfloatermodelpreview.h2
-rwxr-xr-xindra/newview/llvoavatar.cpp63
-rwxr-xr-xindra/newview/llvoavatar.h5
5 files changed, 10 insertions, 82 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fbf2a04bcc..bf16c12ce0 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2784,7 +2784,7 @@ bool LLAppViewer::initConfiguration()
//
gWindowTitle = LLTrans::getString("APP_NAME");
#if LL_DEBUG
- gWindowTitle += std::string(" [DEBUG]")
+ gWindowTitle += std::string(" [DEBUG]");
#endif
if (!gArgs.empty())
{
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index c971faac5f..1926d76ce1 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1721,6 +1721,13 @@ void LLModelPreview::getLegalJointNames(JointNameSet& legal_joint_names)
legal_joint_names.push_back(joint->getName());
}
}
+
+ std::stringstream cvstr;
+ for (S32 i = 0; i < av->mNumCollisionVolumes; i++)
+ {
+ legal_joint_names.push_back(av->mCollisionVolumes[i].getName());
+ cvstr << legal_joint_names[i];
+ }
}
void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable_slm)
@@ -3352,19 +3359,6 @@ void LLModelPreview::update()
}
//-----------------------------------------------------------------------------
-// getTranslationForJointOffset()
-//-----------------------------------------------------------------------------
-LLVector3 LLModelPreview::getTranslationForJointOffset( std::string joint )
-{
- LLMatrix4 jointTransform;
- if ( mJointTransformMap.find( joint ) != mJointTransformMap.end() )
- {
- jointTransform = mJointTransformMap[joint];
- return jointTransform.getTranslation();
- }
- return LLVector3(0.0f,0.0f,0.0f);
-}
-//-----------------------------------------------------------------------------
// createPreviewAvatar
//-----------------------------------------------------------------------------
void LLModelPreview::createPreviewAvatar( void )
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 25c650a725..d9351029ec 100755
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -300,8 +300,6 @@ public:
void setRigWithSceneParity( bool state ) { mRigParityWithScene = state; }
const bool getRigWithSceneParity( void ) const { return mRigParityWithScene; }
- LLVector3 getTranslationForJointOffset( std::string joint );
-
static bool sIgnoreLoadedCallback;
protected:
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 68bb39eb98..3b482e1bc0 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -213,24 +213,6 @@ struct LLTextureMaskData
**
**/
-//------------------------------------------------------------------------
-// LLVOAvatarBoneInfo
-// Trans/Scale/Rot etc. info about each avatar bone. Used by LLVOAvatarSkeleton.
-//------------------------------------------------------------------------
-struct LLVOAvatarCollisionVolumeInfo : public LLInitParam::Block<LLVOAvatarCollisionVolumeInfo>
-{
- LLVOAvatarCollisionVolumeInfo()
- : name("name"),
- pos("pos"),
- rot("rot"),
- scale("scale")
- {}
-
- Mandatory<std::string> name;
- Mandatory<LLVector3> pos,
- rot,
- scale;
-};
struct LLAppearanceMessageContents
{
@@ -252,49 +234,6 @@ struct LLAppearanceMessageContents
bool mHoverOffsetWasSet;
};
-struct LLVOAvatarChildJoint : public LLInitParam::ChoiceBlock<LLVOAvatarChildJoint>
- {
- Alternative<Lazy<struct LLVOAvatarBoneInfo, IS_A_BLOCK> > bone;
- Alternative<LLVOAvatarCollisionVolumeInfo> collision_volume;
-
- LLVOAvatarChildJoint()
- : bone("bone"),
- collision_volume("collision_volume")
- {}
-};
-
-
-
-struct LLVOAvatarBoneInfo : public LLInitParam::Block<LLVOAvatarBoneInfo, LLVOAvatarCollisionVolumeInfo>
-{
- LLVOAvatarBoneInfo()
- : pivot("pivot")
- {}
-
- Mandatory<LLVector3> pivot;
- Multiple<LLVOAvatarChildJoint> children;
-};
-
-//------------------------------------------------------------------------
-// LLVOAvatarSkeletonInfo
-// Overall avatar skeleton
-//------------------------------------------------------------------------
-struct LLVOAvatarSkeletonInfo : public LLInitParam::Block<LLVOAvatarSkeletonInfo>
-{
- LLVOAvatarSkeletonInfo()
- : skeleton_root(""),
- num_bones("num_bones"),
- num_collision_volumes("num_collision_volumes"),
- version("version")
- {}
-
- Mandatory<std::string> version;
- Mandatory<S32> num_bones,
- num_collision_volumes;
- Mandatory<LLVOAvatarChildJoint> skeleton_root;
-};
-
-
//-----------------------------------------------------------------------------
// class LLBodyNoiseMotion
@@ -1527,7 +1466,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
for (S32 i = 0; i < mNumCollisionVolumes; ++i)
{
mCollisionVolumes[i].updateWorldMatrix();
-
+
glh::matrix4f mat((F32*) mCollisionVolumes[i].getXform()->getWorldMatrix().mMatrix);
glh::matrix4f inverse = mat.inverse();
glh::matrix4f norm_mat = inverse.transpose();
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 5b4379165a..7a2355b447 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -68,11 +68,8 @@ class LLVoiceVisualizer;
class LLHUDNameTag;
class LLHUDEffectSpiral;
class LLTexGlobalColor;
-struct LLVOAvatarBoneInfo;
-struct LLVOAvatarChildJoint;
-//class LLViewerJoint;
+
struct LLAppearanceMessageContents;
-struct LLVOAvatarSkeletonInfo;
class LLViewerJointMesh;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~