Skip to content

Commit

Permalink
remove_joints update bvh rot_order
Browse files Browse the repository at this point in the history
  • Loading branch information
JLPM22 committed Apr 28, 2024
1 parent f12c0da commit 855cd69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pymotion/io/bvh.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,10 @@ def remove_joints(self, delete_joints: list[int]):

# Update data
self.data["names"] = [self.data["names"][i] for i in keep_joints]
self.data["rot_order"] = self.data["rot_order"][..., keep_joints, :]
self.data["positions"] = new_pos
self.data["rotations"] = np.degrees(
quat.to_euler(
new_rots, order=np.tile(self.data["rot_order"][..., keep_joints, :], (rots.shape[0], 1, 1))
)
quat.to_euler(new_rots, order=np.tile(self.data["rot_order"], (rots.shape[0], 1, 1)))
)
self.data["parents"] = new_parents
self.data["offsets"] = new_offsets
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exclude = ["*test*"]

[project]
name = "upc-pymotion"
version = "0.1.4"
version = "0.1.5"
description = "A Python library for working with motion data in NumPy or PyTorch."
readme = "README.md"
authors = [{ name = "Jose Luis Ponton", email = "[email protected]" }]
Expand Down

0 comments on commit 855cd69

Please sign in to comment.