summaryrefslogtreecommitdiff
path: root/scripts/content_tools/anim_tool.py
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-10-20 21:43:54 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-10-20 21:43:54 +0300
commit97b676b60f2fc598129e4bcb85110b28e255105c (patch)
tree83d6a815ff40c03a19c06c233af2583196f663e8 /scripts/content_tools/anim_tool.py
parent4aaa686a2df36fb20815f5c1ee24a030e5829a1f (diff)
parente45b6159666b3aa271eaaa366fb4bcade2c2a28b (diff)
Merge branch 'master' into DRTVWR-565-maint-P
Diffstat (limited to 'scripts/content_tools/anim_tool.py')
-rw-r--r--scripts/content_tools/anim_tool.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/content_tools/anim_tool.py b/scripts/content_tools/anim_tool.py
index e7b86a88fa..4a0773951e 100644
--- a/scripts/content_tools/anim_tool.py
+++ b/scripts/content_tools/anim_tool.py
@@ -611,6 +611,7 @@ def main(*argv):
parser = argparse.ArgumentParser(description="process SL animations")
parser.add_argument("--verbose", help="verbose flag", action="store_true")
parser.add_argument("--dump", help="dump to stdout", action="store_true")
+ parser.add_argument("--use_aliases", help="use alias names for bones", 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)
@@ -637,6 +638,7 @@ def main(*argv):
parser.add_argument("--no_hud", help="omit hud joints from list of attachments", action="store_true")
parser.add_argument("--base_priority", help="set base priority", type=int)
parser.add_argument("--joint_priority", help="set joint priority for all joints", type=int)
+ parser.add_argument("--force_joints", help="don't check validity of joint names", action="store_true")
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")
args = parser.parse_args(argv)
@@ -661,7 +663,12 @@ def main(*argv):
if lad_tree is None:
raise Error("failed to parse " + args.lad)
if args.joints:
- joints = resolve_joints(args.joints, skel_tree, lad_tree, args.no_hud)
+ if args.force_joints:
+ joints = args.joints
+ else:
+ joints = resolve_joints(args.joints, skel_tree, lad_tree, args.no_hud)
+ if args.use_aliases:
+ joints = map(lambda name: "avatar_" + name, joints)
if args.verbose:
print("joints resolved to",joints)
for name in joints: