diff --git a/indra/llappearance/llavatarappearance.h b/indra/llappearance/llavatarappearance.h
index 39271aeadb8b6dc38d91a1cfb0ad0b8d73779394..3865da709801543c91a486008ea8200208c47db0 100755
--- a/indra/llappearance/llavatarappearance.h
+++ b/indra/llappearance/llavatarappearance.h
@@ -125,6 +125,7 @@ class LLAvatarAppearance : public LLCharacter
 
 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 8133d4405a3338e78878b9d1d6b02bab52a5bb7d..29642be099a3d9c26c3fed801f332cf892ee948d 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 451000785648781130bf50eff184f7070ecfda2a..fec91503c787b863ca0a7223561649ce9a257dd4 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 af50a3f57434296f70277825b9a0cdbfdd76352e..264ec44c02fda96b5e20a6636a2cb972c5a1feb2 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 f5007a3f06cc58486a118b0a9ba77d0d255d0cd1..e666f177e717e22474d56a16e6ec92d5cc0c1d25 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -143,6 +143,21 @@ class LLJoint
 
 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 7bd93942b3c0eb42f40a48f3fefedee0c5a7ef30..b7bd131246a4ec3e647e229c3c494d6e8417c6ab 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 75efafd1380a997fb139118dd38cdd11bc6777f6..abe11bbf5c47a14dccfcea7c5ff0283539417b5b 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 15e1f88d765f5513fe8edec98debb5d0041c6082..762ff958407b47c49f63349cfc4594a60931aa07 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1174,6 +1174,12 @@ LLAvatarJoint* LLVOAvatar::createAvatarJoint()
 	return new LLViewerJoint();
 }
 
+// virtual
+LLAvatarJoint* LLVOAvatar::createAvatarJoint(S32 joint_num)
+{
+	return new LLViewerJoint(joint_num);
+}
+
 // virtual
 LLAvatarJointMesh* LLVOAvatar::createAvatarJointMesh()
 {
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 31c69bf88dd35e3751c0e7fc52574eef5f1e3a3c..e1b4885bbb4279feb812b755e4d1824e1bb5702f 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -356,6 +356,7 @@ class LLVOAvatar :
 
 protected:
 	/*virtual*/ LLAvatarJoint*	createAvatarJoint(); // Returns LLViewerJoint
+	/*virtual*/ LLAvatarJoint*	createAvatarJoint(S32 joint_num); // Returns LLViewerJoint
 	/*virtual*/ LLAvatarJointMesh*	createAvatarJointMesh(); // Returns LLViewerJointMesh
 public:
 	void				updateHeadOffset();