From 590d0e35e542fe3d973e5a67e1a7db34c0429701 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 12 Aug 2015 15:23:57 -0400 Subject: SL-109 WIP - brought over work from SL-125 repo that was not dynamic skeleton related --- indra/newview/character/avatar_skeleton.xml | 42 +++++++++++++++-------------- indra/newview/llfloatermodelpreview.cpp | 15 +++++++++++ indra/newview/llvoavatar.cpp | 12 ++++++--- 3 files changed, 46 insertions(+), 23 deletions(-) diff --git a/indra/newview/character/avatar_skeleton.xml b/indra/newview/character/avatar_skeleton.xml index f81e58e807..7a088484d8 100755 --- a/indra/newview/character/avatar_skeleton.xml +++ b/indra/newview/character/avatar_skeleton.xml @@ -1,9 +1,11 @@ - + - - - + + + + + @@ -15,6 +17,22 @@ + + + + + + + + + + + + + + + + @@ -33,14 +51,6 @@ - - - - - - - - @@ -53,14 +63,6 @@ - - - - - - - - diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 72c9170b06..2a2c0b81f0 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1343,6 +1343,21 @@ LLModelLoader::LLModelLoader( std::string filename, S32 lod, LLModelPreview* pre mJointMap["mFootLeft"] = "mFootLeft"; mJointMap["mToeLeft"] = "mToeLeft"; + // FIXME BENTO change this to use the skeleton info rather than hardwiring + mJointMap["mLeftWingShoulder"] = "mLeftWingShoulder"; + mJointMap["mLeftWingElbow"] = "mLeftWingElbow"; + mJointMap["mLeftWingWrist"] = "mLeftWingWrist"; + mJointMap["mLeftWingTip"] = "mLeftWingTip"; + mJointMap["mRightWingShoulder"] = "mRightWingShoulder"; + mJointMap["mRightWingElbow"] = "mRightWingElbow"; + mJointMap["mRightWingWrist"] = "mRightWingWrist"; + mJointMap["mRightWingTip"] = "mRightWingTip"; + + mJointMap["mTail_1"] = "mTail_1"; + mJointMap["mTail_2"] = "mTail_2"; + mJointMap["mTail_3"] = "mTail_3"; + mJointMap["mTail_4"] = "mTail_4"; + mJointMap["avatar_mPelvis"] = "mPelvis"; mJointMap["avatar_mTorso"] = "mTorso"; mJointMap["avatar_mChest"] = "mChest"; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f753448770..253271322c 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5435,8 +5435,14 @@ BOOL LLVOAvatar::loadSkeletonNode () LLViewerJointAttachment* attachment = new LLViewerJointAttachment(); attachment->setName(info->mName); - LLJoint *parentJoint = getJoint(info->mJointName); - if (!parentJoint) + LLJoint *parent_joint = getJoint(info->mJointName); + if (!parent_joint) + { + // If the intended location for attachment point is unavailable, stick it in a default location. + LL_INFOS() << "attachment pt " << info->mName << " using mPelvis as default parent" << LL_ENDL; + parent_joint = getJoint("mPelvis"); + } + if (!parent_joint) { LL_WARNS() << "No parent joint by name " << info->mJointName << " found for attachment point " << info->mName << LL_ENDL; delete attachment; @@ -5491,7 +5497,7 @@ BOOL LLVOAvatar::loadSkeletonNode () mAttachmentPoints[attachmentID] = attachment; // now add attachment joint - parentJoint->addChild(attachment); + parent_joint->addChild(attachment); } } -- cgit v1.2.3