diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-05-26 12:52:09 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-05-26 12:52:09 -0400 |
commit | b5f4eab65bf458db9247562fd0b265687259890e (patch) | |
tree | 79ff5f1e0cda3b3eccefe61290ee79ef1da8f7a6 | |
parent | bda6285f1ca671ac2348ed3bbd916b24c8ad5b9d (diff) |
SL-117, SL-315 - resetSkeleton() tweaks, additional validation of skeleton file
-rw-r--r-- | indra/newview/llvoavatar.cpp | 15 | ||||
-rw-r--r-- | scripts/content_tools/skel_tool.py | 5 |
2 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 25565715c2..0423f0e380 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1852,8 +1852,8 @@ void LLVOAvatar::resetSkeleton() } // Save mPelvis state - LLVector3 pelvis_pos = getJoint("mPelvis")->getPosition(); - LLQuaternion pelvis_rot = getJoint("mPelvis")->getRotation(); + //LLVector3 pelvis_pos = getJoint("mPelvis")->getPosition(); + //LLQuaternion pelvis_rot = getJoint("mPelvis")->getRotation(); // Clear all attachment pos overrides clearAttachmentPosOverrides(); @@ -1908,11 +1908,14 @@ void LLVOAvatar::resetSkeleton() rebuildAttachmentPosOverrides(); // Restore mPelvis state - getJoint("mPelvis")->setRotation(pelvis_rot); - getJoint("mPelvis")->setPosition(pelvis_pos); + //getJoint("mPelvis")->setRotation(pelvis_rot); + //getJoint("mPelvis")->setPosition(pelvis_pos); - // Restart animations - resetAnimations(); + // Restart animations BENTO - not needed? Removing this fixes a + // problem seen if avatar is sitting and animated relative to sit + // point. + + //resetAnimations(); LL_DEBUGS("Avatar") << avString() << " reset ends" << LL_ENDL; } diff --git a/scripts/content_tools/skel_tool.py b/scripts/content_tools/skel_tool.py index 5d4ea0e059..f7301c55e1 100644 --- a/scripts/content_tools/skel_tool.py +++ b/scripts/content_tools/skel_tool.py @@ -155,6 +155,7 @@ def validate_child_order(tree, ogtree, fix=False): # - corresponding right and left joints should be mirror symmetric. # - childless elements should be in short form (<bone /> instead of <bone></bone>) # - digits of precision should be consistent (again, except for old joints) +# - new bones should have pos, pivot the same def validate_skel_tree(tree, ogtree, reftree, fix=False): print "validate_skel_tree" (num_bones,num_cvs) = (0,0) @@ -205,6 +206,10 @@ def validate_skel_tree(tree, ogtree, reftree, fix=False): enforce_precision_rules(element) for field in ["pos","pivot"]: enforce_symmetry(tree, element, field, fix) + if element.get("support")=="extended": + if element.get("pos") != element.get("pivot"): + print "extended joint",element.get("name"),"has mismatched pos, pivot" + if element.tag == "linden_skeleton": num_bones = int(element.get("num_bones")) |