diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-08-17 16:31:28 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-08-17 16:31:28 -0400 |
commit | 72d5ff36f56c4afee85f5863f64f237980341014 (patch) | |
tree | 3afd0fa622ad507e087d7b5b2d6724a71119cbec /indra/newview/llvoavatar.cpp | |
parent | 9044a8b8156e5812f99c39d35be096a35df8f6d0 (diff) |
MAINT-6647 - ignore previously created slm files on model upload. SL-442 - change coloring for show bones, to highlight joint positions and rigging
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index db0316ebcd..946db6713e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1428,12 +1428,15 @@ void LLVOAvatar::renderBones() avatar_joint_list_t::iterator iter = mSkeleton.begin(); avatar_joint_list_t::iterator end = mSkeleton.end(); - static LLVector3 BASE_COLOR_OCCLUDED(1.0f, 0.0f, 0.0f); - static LLVector3 BASE_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); - static LLVector3 EXTENDED_COLOR_OCCLUDED(0.0f, 1.0f, 0.0f); - static LLVector3 EXTENDED_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); + // For bones with position overrides defined + static LLVector3 OVERRIDE_COLOR_OCCLUDED(1.0f, 0.0f, 0.0f); + static LLVector3 OVERRIDE_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); + // For bones which are rigged to by at least one attachment static LLVector3 RIGGED_COLOR_OCCLUDED(0.0f, 1.0f, 1.0f); static LLVector3 RIGGED_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); + // For bones not otherwise colored + static LLVector3 OTHER_COLOR_OCCLUDED(0.0f, 1.0f, 0.0f); + static LLVector3 OTHER_COLOR_VISIBLE(0.5f, 0.5f, 0.5f); static F32 SPHERE_SCALEF = 0.001f; @@ -1446,25 +1449,27 @@ void LLVOAvatar::renderBones() } jointp->updateWorldMatrix(); - LLJoint::SupportCategory sc = jointp->getSupport(); + LLVector3 occ_color, visible_color; - if (jointIsRiggedTo(jointp->getName())) + LLVector3 pos; + LLUUID mesh_id; + if (jointp->hasAttachmentPosOverride(pos,mesh_id)) { - occ_color = RIGGED_COLOR_OCCLUDED; - visible_color = RIGGED_COLOR_VISIBLE; + occ_color = OVERRIDE_COLOR_OCCLUDED; + visible_color = OVERRIDE_COLOR_VISIBLE; } else { - if (sc == LLJoint::SUPPORT_BASE) + if (jointIsRiggedTo(jointp->getName())) { - occ_color = BASE_COLOR_OCCLUDED; - visible_color = BASE_COLOR_VISIBLE; + occ_color = RIGGED_COLOR_OCCLUDED; + visible_color = RIGGED_COLOR_VISIBLE; } else { - occ_color = EXTENDED_COLOR_OCCLUDED; - visible_color = EXTENDED_COLOR_VISIBLE; + occ_color = OTHER_COLOR_OCCLUDED; + visible_color = OTHER_COLOR_VISIBLE; } } LLVector3 begin_pos(0,0,0); |