summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llappearance/llavatarappearance.h1
-rw-r--r--indra/llappearance/llavatarjoint.cpp6
-rw-r--r--indra/llappearance/llavatarjoint.h1
-rwxr-xr-xindra/llcharacter/lljoint.cpp7
-rwxr-xr-xindra/llcharacter/lljoint.h15
-rwxr-xr-xindra/newview/llviewerjoint.cpp4
-rwxr-xr-xindra/newview/llviewerjoint.h2
-rwxr-xr-xindra/newview/llvoavatar.cpp6
-rwxr-xr-xindra/newview/llvoavatar.h1
9 files changed, 43 insertions, 0 deletions
diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index 39271aeadb..3865da7098 100755
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -125,6 +125,7 @@ public:
protected:
virtual LLAvatarJoint* createAvatarJoint() = 0;
+ virtual LLAvatarJoint* createAvatarJoint(S32 joint_num) = 0;
virtual LLAvatarJointMesh* createAvatarJointMesh() = 0;
void makeJointAliases(LLAvatarBoneInfo *bone_info);
diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp
index 8133d4405a..29642be099 100644
--- a/indra/llappearance/llavatarjoint.cpp
+++ b/indra/llappearance/llavatarjoint.cpp
@@ -52,6 +52,12 @@ LLAvatarJoint::LLAvatarJoint() :
init();
}
+LLAvatarJoint::LLAvatarJoint(S32 joint_num) :
+ LLJoint(joint_num)
+{
+ init();
+}
+
LLAvatarJoint::LLAvatarJoint(const std::string &name, LLJoint *parent) :
LLJoint(name, parent)
{
diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h
index 4510007856..fec91503c7 100644
--- a/indra/llappearance/llavatarjoint.h
+++ b/indra/llappearance/llavatarjoint.h
@@ -46,6 +46,7 @@ class LLAvatarJoint :
{
public:
LLAvatarJoint();
+ LLAvatarJoint(S32 joint_num);
// *TODO: Only used for LLVOAvatarSelf::mScreenp. *DOES NOT INITIALIZE mResetAfterRestoreOldXform*
LLAvatarJoint(const std::string &name, LLJoint *parent = NULL);
virtual ~LLAvatarJoint();
diff --git a/indra/llcharacter/lljoint.cpp b/indra/llcharacter/lljoint.cpp
index af50a3f574..264ec44c02 100755
--- a/indra/llcharacter/lljoint.cpp
+++ b/indra/llcharacter/lljoint.cpp
@@ -121,6 +121,13 @@ LLJoint::LLJoint() :
touch();
}
+LLJoint::LLJoint(S32 joint_num) :
+ mJointNum(joint_num)
+{
+ init();
+ touch();
+}
+
//-----------------------------------------------------------------------------
// LLJoint()
// Class Constructor
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index f5007a3f06..e666f177e7 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -143,6 +143,21 @@ public:
public:
LLJoint();
+
+ // Note: these joint_num constructors are a bad idea because there
+ // are only a couple of places in the code where it is useful to
+ // have a joint num for a joint (for joints that are used in
+ // animations), and including them as part of the constructor then
+ // forces us to maintain an alternate path through the entire
+ // large-ish class hierarchy of joint types. The only reason they
+ // are still here now is to avoid breaking the baking service
+ // (appearanceutility) builds; these constructors are not used in
+ // the viewer. Once the appearance utility is updated to remove
+ // these joint num references, which it shouldn't ever need, from
+ // its own classes, we can also remove all the joint_num
+ // constructors from LLJoint, LLViewerJoint, LLAvatarJoint, and
+ // createAvatarJoint.
+ LLJoint(S32 joint_num);
// *TODO: Only used for LLVOAvatarSelf::mScreenp. *DOES NOT INITIALIZE mResetAfterRestoreOldXform*
LLJoint( const std::string &name, LLJoint *parent=NULL );
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index 7bd93942b3..b7bd131246 100755
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -48,6 +48,10 @@ LLViewerJoint::LLViewerJoint() :
LLAvatarJoint()
{ }
+LLViewerJoint::LLViewerJoint(S32 joint_num) :
+ LLAvatarJoint(joint_num)
+{ }
+
LLViewerJoint::LLViewerJoint(const std::string &name, LLJoint *parent) :
LLAvatarJoint(name, parent)
{ }
diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h
index 75efafd138..abe11bbf5c 100755
--- a/indra/newview/llviewerjoint.h
+++ b/indra/newview/llviewerjoint.h
@@ -44,6 +44,8 @@ class LLViewerJoint :
{
public:
LLViewerJoint();
+ LLViewerJoint(S32 joint_num);
+
// *TODO: Only used for LLVOAvatarSelf::mScreenp. *DOES NOT INITIALIZE mResetAfterRestoreOldXform*
LLViewerJoint(const std::string &name, LLJoint *parent = NULL);
virtual ~LLViewerJoint();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 15e1f88d76..762ff95840 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1175,6 +1175,12 @@ LLAvatarJoint* LLVOAvatar::createAvatarJoint()
}
// virtual
+LLAvatarJoint* LLVOAvatar::createAvatarJoint(S32 joint_num)
+{
+ return new LLViewerJoint(joint_num);
+}
+
+// virtual
LLAvatarJointMesh* LLVOAvatar::createAvatarJointMesh()
{
return new LLViewerJointMesh();
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 31c69bf88d..e1b4885bbb 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -356,6 +356,7 @@ protected:
protected:
/*virtual*/ LLAvatarJoint* createAvatarJoint(); // Returns LLViewerJoint
+ /*virtual*/ LLAvatarJoint* createAvatarJoint(S32 joint_num); // Returns LLViewerJoint
/*virtual*/ LLAvatarJointMesh* createAvatarJointMesh(); // Returns LLViewerJointMesh
public:
void updateHeadOffset();