diff options
author | Nils Hasler <nils.hasler> | 2022-03-08 18:17:07 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-03-08 18:19:32 +0300 |
commit | a2c3cfdd764b1d84f5fb31454813bd0dd9c05ebe (patch) | |
tree | 1cd03be8e7cdabf14fb785b3f995bdc997630d98 /io_anim_bvh | |
parent | 1af4eb6f32cd62d84f5a91b2d2fcb19fe0757d67 (diff) |
Group FCurves by bone name when importing from FBX or BVH
When importing an animation from FBX or BVH the fcurves are currently shown as a very long list in the dope sheet.
When you manually create a keyframe they are grouped by bone name, which is much more user friendly. This patch groups imported animations by bone name too.
The changes are trivial:
* In the FBX case it was falsely using the object name to group all curves rather than the bone name.
* The BVH importer simply wasn't using the grouping feature at all.
Reviewed By: mont29
Maniphest Tasks: T82472
Differential Revision: https://developer.blender.org/D11269
Diffstat (limited to 'io_anim_bvh')
-rw-r--r-- | io_anim_bvh/__init__.py | 2 | ||||
-rw-r--r-- | io_anim_bvh/import_bvh.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py index 43e582d5..8f712e3d 100644 --- a/io_anim_bvh/__init__.py +++ b/io_anim_bvh/__init__.py @@ -5,7 +5,7 @@ bl_info = { "name": "BioVision Motion Capture (BVH) format", "author": "Campbell Barton", - "version": (1, 0, 0), + "version": (1, 0, 1), "blender": (2, 81, 6), "location": "File > Import-Export", "description": "Import-Export BVH from armature objects", diff --git a/io_anim_bvh/import_bvh.py b/io_anim_bvh/import_bvh.py index cd30ad11..2f335513 100644 --- a/io_anim_bvh/import_bvh.py +++ b/io_anim_bvh/import_bvh.py @@ -569,7 +569,7 @@ def bvh_node_dict2armature( # For each location x, y, z. for axis_i in range(3): - curve = action.fcurves.new(data_path=data_path, index=axis_i) + curve = action.fcurves.new(data_path=data_path, index=axis_i, action_group=bvh_node.name) keyframe_points = curve.keyframe_points keyframe_points.add(num_frame) @@ -615,7 +615,7 @@ def bvh_node_dict2armature( # For each euler angle x, y, z (or quaternion w, x, y, z). for axis_i in range(len(rotate[0])): - curve = action.fcurves.new(data_path=data_path, index=axis_i) + curve = action.fcurves.new(data_path=data_path, index=axis_i, action_group=bvh_node.name) keyframe_points = curve.keyframe_points keyframe_points.add(num_frame) |