{"id":17172889,"url":"https://github.com/20tab/bvh-python","last_synced_at":"2025-04-04T19:10:12.635Z","repository":{"id":44164878,"uuid":"103154223","full_name":"20tab/bvh-python","owner":"20tab","description":"Python module for parsing BVH (Biovision hierarchical data) mocap files","archived":false,"fork":false,"pushed_at":"2024-01-12T16:08:54.000Z","size":93,"stargazers_count":243,"open_issues_count":8,"forks_count":46,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T18:13:06.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/20tab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-11T15:35:26.000Z","updated_at":"2025-03-28T07:43:43.000Z","dependencies_parsed_at":"2022-08-24T18:30:57.904Z","dependency_job_id":"0bc5ec78-ad19-49db-a0ae-6a1796194c81","html_url":"https://github.com/20tab/bvh-python","commit_stats":{"total_commits":12,"total_committers":5,"mean_commits":2.4,"dds":"0.41666666666666663","last_synced_commit":"b7e00585aef1c9577831ee08aa5e33553b329cc0"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fbvh-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fbvh-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fbvh-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/20tab%2Fbvh-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/20tab","download_url":"https://codeload.github.com/20tab/bvh-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234921,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T23:48:40.045Z","updated_at":"2025-04-04T19:10:12.604Z","avatar_url":"https://github.com/20tab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bvh-python\nPython module for parsing BVH (Biovision hierarchical data) mocap files\n\n#### Instance Bvh object from .bvh file\n```python\n\u003e\u003e\u003e from bvh import Bvh\n\u003e\u003e\u003e with open('tests/test_freebvh.bvh') as f:\n\u003e\u003e\u003e    mocap = Bvh(f.read())\n```\n #### Get mocap tree\n```python\n\u003e\u003e\u003e [str(item) for item in mocap.root]\n['HIERARCHY', 'ROOT mixamorig:Hips', 'MOTION', 'Frames: 69', 'Frame Time: 0.0333333']\n```\n #### Get ROOT OFFSET\n```python\n\u003e\u003e\u003e next(mocap.root.filter('ROOT'))['OFFSET']\n['0.0000', '0.0000', '0.0000']\n```\n #### Get JOINT OFFSET\n```python\n\u003e\u003e\u003e mocap.joint_offset('mixamorig:Head')\n(-0.0, 10.3218, 3.1424)\n```\n #### Get Frames\n```python\n\u003e\u003e\u003e mocap.nframes\n69\n```\n #### Get Frame Time\n```python\n\u003e\u003e\u003e mocap.frame_time\n0.0333333\n```\n #### Get JOINT CHANNELS\n```python\n\u003e\u003e\u003e mocap.joint_channels('mixamorig:Neck')\n['Zrotation', 'Yrotation', 'Xrotation']\n```\n #### Get Frame CHANNEL\n```python\n\u003e\u003e\u003e mocap.frame_joint_channel(22, 'mixamorig:Spine', 'Xrotation')\n11.8096\n```\n #### Get all JOINT names\n```python\n\u003e\u003e\u003e mocap.get_joints_names()\n['mixamorig:Hips', 'mixamorig:Spine', 'mixamorig:Spine1', 'mixamorig:Spine2', 'mixamorig:Neck', 'mixamorig:Head', 'mixamorig:HeadTop_End', 'mixamorig:LeftEye', 'mixamorig:RightEye', 'mixamorig:LeftShoulder', 'mixamorig:LeftArm', 'mixamorig:LeftForeArm', 'mixamorig:LeftHand', 'mixamorig:LeftHandMiddle1', 'mixamorig:LeftHandMiddle2', 'mixamorig:LeftHandMiddle3', 'mixamorig:LeftHandThumb1', 'mixamorig:LeftHandThumb2', 'mixamorig:LeftHandThumb3', 'mixamorig:LeftHandIndex1', 'mixamorig:LeftHandIndex2', 'mixamorig:LeftHandIndex3', 'mixamorig:LeftHandRing1', 'mixamorig:LeftHandRing2', 'mixamorig:LeftHandRing3', 'mixamorig:LeftHandPinky1', 'mixamorig:LeftHandPinky2', 'mixamorig:LeftHandPinky3', 'mixamorig:RightShoulder', 'mixamorig:RightArm', 'mixamorig:RightForeArm', 'mixamorig:RightHand', 'mixamorig:RightHandMiddle1', 'mixamorig:RightHandMiddle2', 'mixamorig:RightHandMiddle3', 'mixamorig:RightHandThumb1', 'mixamorig:RightHandThumb2', 'mixamorig:RightHandThumb3', 'mixamorig:RightHandIndex1', 'mixamorig:RightHandIndex2', 'mixamorig:RightHandIndex3', 'mixamorig:RightHandRing1', 'mixamorig:RightHandRing2', 'mixamorig:RightHandRing3', 'mixamorig:RightHandPinky1', 'mixamorig:RightHandPinky2', 'mixamorig:RightHandPinky3', 'mixamorig:RightUpLeg', 'mixamorig:RightLeg', 'mixamorig:RightFoot', 'mixamorig:RightToeBase', 'mixamorig:LeftUpLeg', 'mixamorig:LeftLeg', 'mixamorig:LeftFoot', 'mixamorig:LeftToeBase']\n```\n #### Get single JOINT name\n```python\n\u003e\u003e\u003e mocap.get_joints_names()[17]\n'mixamorig:LeftHandThumb2'\n```\n #### Get JOINT parent index\n```python\n\u003e\u003e\u003e mocap.joint_parent_index('mixamorig:Neck')\n3\n```\n #### Get JOINT parent name\n```python\n\u003e\u003e\u003e mocap.joint_parent('mixamorig:Head').name\n'mixamorig:Neck'\n```\n #### Search single item\n```python\n\u003e\u003e\u003e [str(node) for node in mocap.search('JOINT', 'LeftShoulder')]\n['JOINT LeftShoulder']\n```\n #### Search all items\n```python\n\u003e\u003e\u003e [str(node) for node in mocap.search('JOINT')]\n['JOINT mixamorig:Spine', 'JOINT mixamorig:Spine1', 'JOINT mixamorig:Spine2', 'JOINT mixamorig:Neck', 'JOINT mixamorig:Head', 'JOINT mixamorig:HeadTop_End', 'JOINT mixamorig:LeftEye', 'JOINT mixamorig:RightEye', 'JOINT mixamorig:LeftShoulder', 'JOINT mixamorig:LeftArm', 'JOINT mixamorig:LeftForeArm', 'JOINT mixamorig:LeftHand', 'JOINT mixamorig:LeftHandMiddle1', 'JOINT mixamorig:LeftHandMiddle2', 'JOINT mixamorig:LeftHandMiddle3', 'JOINT mixamorig:LeftHandThumb1', 'JOINT mixamorig:LeftHandThumb2', 'JOINT mixamorig:LeftHandThumb3', 'JOINT mixamorig:LeftHandIndex1', 'JOINT mixamorig:LeftHandIndex2', 'JOINT mixamorig:LeftHandIndex3', 'JOINT mixamorig:LeftHandRing1', 'JOINT mixamorig:LeftHandRing2', 'JOINT mixamorig:LeftHandRing3', 'JOINT mixamorig:LeftHandPinky1', 'JOINT mixamorig:LeftHandPinky2', 'JOINT mixamorig:LeftHandPinky3', 'JOINT mixamorig:RightShoulder', 'JOINT mixamorig:RightArm', 'JOINT mixamorig:RightForeArm', 'JOINT mixamorig:RightHand', 'JOINT mixamorig:RightHandMiddle1', 'JOINT mixamorig:RightHandMiddle2', 'JOINT mixamorig:RightHandMiddle3', 'JOINT mixamorig:RightHandThumb1', 'JOINT mixamorig:RightHandThumb2', 'JOINT mixamorig:RightHandThumb3', 'JOINT mixamorig:RightHandIndex1', 'JOINT mixamorig:RightHandIndex2', 'JOINT mixamorig:RightHandIndex3', 'JOINT mixamorig:RightHandRing1', 'JOINT mixamorig:RightHandRing2', 'JOINT mixamorig:RightHandRing3', 'JOINT mixamorig:RightHandPinky1', 'JOINT mixamorig:RightHandPinky2', 'JOINT mixamorig:RightHandPinky3', 'JOINT mixamorig:RightUpLeg', 'JOINT mixamorig:RightLeg', 'JOINT mixamorig:RightFoot', 'JOINT mixamorig:RightToeBase', 'JOINT mixamorig:LeftUpLeg', 'JOINT mixamorig:LeftLeg', 'JOINT mixamorig:LeftFoot', 'JOINT mixamorig:LeftToeBase']\n```\n#### Get joint's direct children\n```python\n\u003e\u003e\u003e mocap.joint_direct_children('mixamorig:Hips')\n[JOINT mixamorig:Spine, JOINT mixamorig:RightUpLeg, JOINT mixamorig:LeftUpLeg]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Fbvh-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F20tab%2Fbvh-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F20tab%2Fbvh-python/lists"}