Skip to content
Snippets Groups Projects
Commit 5adc7823 authored by Brad Payne (Vir Linden)'s avatar Brad Payne (Vir Linden)
Browse files

SL-353 - improved handling of skeleton and lad options in anim_tool.py

parent 11c98531
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
"""\ """\
This module contains tools for manipulating the .anim files supported for Second Life animation upload. Note that this format is unrelated to any non-Second Life formats of the same name. This module contains tools for manipulating the .anim files supported
for Second Life animation upload. Note that this format is unrelated
to any non-Second Life formats of the same name.
$LicenseInfo:firstyear=2016&license=viewerlgpl$ $LicenseInfo:firstyear=2016&license=viewerlgpl$
Second Life Viewer Source Code Second Life Viewer Source Code
...@@ -508,8 +510,8 @@ def resolve_joints(names, skel_tree, lad_tree): ...@@ -508,8 +510,8 @@ def resolve_joints(names, skel_tree, lad_tree):
parser.add_argument("--delete_joints", help="specify joints to be deleted", nargs="+") parser.add_argument("--delete_joints", help="specify joints to be deleted", nargs="+")
parser.add_argument("--joints", help="specify joints to be added or modified", nargs="+") parser.add_argument("--joints", help="specify joints to be added or modified", nargs="+")
parser.add_argument("--summary", help="print summary of the output animation", action="store_true") parser.add_argument("--summary", help="print summary of the output animation", action="store_true")
parser.add_argument("--skel", help="name of the avatar_skeleton file") parser.add_argument("--skel", help="name of the avatar_skeleton file", default="avatar_skeleton.xml")
parser.add_argument("--lad", help="name of the avatar_lad file") parser.add_argument("--lad", help="name of the avatar_lad file", default="avatar_lad.xml")
parser.add_argument("--set_version", nargs=2, type=int, help="set version and sub-version to specified values") parser.add_argument("--set_version", nargs=2, type=int, help="set version and sub-version to specified values")
parser.add_argument("infilename", help="name of a .anim file to input") parser.add_argument("infilename", help="name of a .anim file to input")
parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output") parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output")
...@@ -529,8 +531,14 @@ def resolve_joints(names, skel_tree, lad_tree): ...@@ -529,8 +531,14 @@ def resolve_joints(names, skel_tree, lad_tree):
joints = [] joints = []
if args.skel: if args.skel:
skel_tree = etree.parse(args.skel) skel_tree = etree.parse(args.skel)
if skel_tree is None:
print "failed to parse",args.skel
exit(1)
if args.lad: if args.lad:
lad_tree = etree.parse(args.lad) lad_tree = etree.parse(args.lad)
if lad_tree is None:
print "failed to parse",args.lad
exit(1)
if args.joints: if args.joints:
joints = resolve_joints(args.joints, skel_tree, lad_tree) joints = resolve_joints(args.joints, skel_tree, lad_tree)
if args.verbose: if args.verbose:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment