Пример #1
0
def load_skeleton(file_path, joint_filter=None, scale=1.0):
    target_bvh = BVHReader(file_path)
    bvh_joints = list(target_bvh.get_animated_joints())
    if joint_filter is not None:
        animated_joints = [j for j in bvh_joints if j in joint_filter]
    else:
        print("set default joints")
        animated_joints = bvh_joints
    skeleton = SkeletonBuilder().load_from_bvh(target_bvh, animated_joints)
    skeleton.scale(scale)
    return skeleton
Пример #2
0
 def load_skeleton(self, skeleton_path):
     bvh = BVHReader(skeleton_path)
     self.animated_joints = list(bvh.get_animated_joints())
     if has_mgrd:
         self.mgrd_skeleton = MGRDSkeletonBVHLoader(skeleton_path).load()
     self.skeleton = SkeletonBuilder().load_from_bvh(BVHReader(skeleton_path), self.animated_joints)