diff options
Diffstat (limited to 'scripts/content_tools')
-rw-r--r-- | scripts/content_tools/anim_tool.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py index 3496617b21..3aef8cd5ab 100644 --- a/scripts/content_tools/anim_tool.py +++ b/scripts/content_tools/anim_tool.py @@ -610,12 +610,16 @@ def main(*argv): parser = argparse.ArgumentParser(description="process SL animations") parser.add_argument("--verbose", help="verbose flag", action="store_true") - parser.add_argument("--dump", metavar="FILEPATH", help="dump to specified file") + parser.add_argument("--dump", help="dump to stdout", action="store_true") parser.add_argument("--rot", help="specify sequence of rotations", type=float_triple, nargs="+") parser.add_argument("--rand_pos", help="request NUM random positions (default %(default)s)", metavar="NUM", type=int, default=2) parser.add_argument("--reset_pos", help="request original positions", action="store_true") parser.add_argument("--pos", help="specify sequence of positions", type=float_triple, nargs="+") + parser.add_argument("--duration", help="specify duration", type=float) + parser.add_argument("--loop_in", help="specify loop in time", type=float) + parser.add_argument("--loop_out", help="specify loop out time", type=float) + parser.add_argument("--num_pos", help="number of positions to create", type=int, default=2) parser.add_argument("--delete_joints", help="specify joints to be deleted", nargs="+", metavar="JOINT") parser.add_argument("--joints", help="specify joints to be added or modified", nargs="+", @@ -696,8 +700,17 @@ def main(*argv): print "set joint priority",args.joint_priority for joint in anim.joints: joint.joint_priority = args.joint_priority + if args.duration is not None: + print "set duration",args.duration + anim.duration = args.duration + if args.loop_in is not None: + print "set loop_in",args.loop_in + anim.loop_in_point = args.loop_in + if args.loop_out is not None: + print "set loop_out",args.loop_out + anim.loop_out_point = args.loop_out if args.dump: - anim.dump(args.dump) + anim.dump("-") if args.summary: anim.summary() if args.outfilename: |