diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-11 21:19:22 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2016-04-11 21:19:22 -0400 |
commit | 67eb559dc7c1be049898dd4216fbbd884496448d (patch) | |
tree | 619392d5349c01503b975858b2fa75ae047e1c47 /scripts/content_tools | |
parent | 17152cc7ab5e354da75e23b310972310066f7aad (diff) |
SL-344 - additional sliders, additional avatar_lad validation in skel_tool.py
Diffstat (limited to 'scripts/content_tools')
-rw-r--r-- | scripts/content_tools/skel_tool.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/content_tools/skel_tool.py b/scripts/content_tools/skel_tool.py index e5a7ce5f61..3b99be5e33 100644 --- a/scripts/content_tools/skel_tool.py +++ b/scripts/content_tools/skel_tool.py @@ -256,6 +256,22 @@ def validate_lad_tree(ladtree,skeltree): if not bone_name in bone_names: print "skel param references invalid bone",bone_name print etree.tostring(bone) + drivers = {} + for driven_param in ladtree.iter("driven"): + driver = driven_param.getparent().getparent() + driven_id = driven_param.get("id") + driver_id = driver.get("id") + if not driven_id in drivers: + drivers[driven_id] = set() + drivers[driven_id].add(driver_id) + for driven_id in drivers: + dset = drivers[driven_id] + if len(dset) != 1: + print "driven_id",driven_id,"has multiple drivers",dset + else: + if args.verbose: + print "driven_id",driven_id,"has one driver",dset + def remove_joint_by_name(tree, name): print "remove joint:",name @@ -325,6 +341,7 @@ def compare_skel_trees(atree,btree): if __name__ == "__main__": parser = argparse.ArgumentParser(description="process SL animations") + parser.add_argument("--verbose", action="store_true",help="verbose flag") parser.add_argument("--ogfile", help="specify file containing base bones") parser.add_argument("--ref_file", help="specify another file containing replacements for missing fields") parser.add_argument("--lad_file", help="specify avatar_lad file to check") |