summaryrefslogtreecommitdiff
path: root/scripts/content_tools
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-04-13 16:53:17 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-04-13 16:53:17 -0400
commit5adc782341fd2de7a791f989c991c07d3060b862 (patch)
treec8efbfddae7408bf40e85044ced6976cb5be41ef /scripts/content_tools
parent11c9853197312af135a9d7960ee125fc41c423b8 (diff)
SL-353 - improved handling of skeleton and lad options in anim_tool.py
Diffstat (limited to 'scripts/content_tools')
-rw-r--r--scripts/content_tools/anim_tool.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py
index 08706074dd..05fe6357b6 100644
--- a/scripts/content_tools/anim_tool.py
+++ b/scripts/content_tools/anim_tool.py
@@ -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$
Second Life Viewer Source Code
@@ -508,8 +510,8 @@ if __name__ == "__main__":
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("--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("--lad", help="name of the avatar_lad 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", 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("infilename", help="name of a .anim file to input")
parser.add_argument("outfilename", nargs="?", help="name of a .anim file to output")
@@ -529,8 +531,14 @@ if __name__ == "__main__":
joints = []
if args.skel:
skel_tree = etree.parse(args.skel)
+ if skel_tree is None:
+ print "failed to parse",args.skel
+ exit(1)
if args.lad:
lad_tree = etree.parse(args.lad)
+ if lad_tree is None:
+ print "failed to parse",args.lad
+ exit(1)
if args.joints:
joints = resolve_joints(args.joints, skel_tree, lad_tree)
if args.verbose: