Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Hasler <nils.hasler>2022-03-08 18:17:07 +0300
committerBastien Montagne <bastien@blender.org>2022-03-08 18:19:32 +0300
commita2c3cfdd764b1d84f5fb31454813bd0dd9c05ebe (patch)
tree1cd03be8e7cdabf14fb785b3f995bdc997630d98
parent1af4eb6f32cd62d84f5a91b2d2fcb19fe0757d67 (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
-rw-r--r--io_anim_bvh/__init__.py2
-rw-r--r--io_anim_bvh/import_bvh.py4
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/import_fbx.py2
4 files changed, 5 insertions, 5 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)
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index cf7b75a8..39a7815c 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -5,7 +5,7 @@
bl_info = {
"name": "FBX format",
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
- "version": (4, 33, 1),
+ "version": (4, 34, 1),
"blender": (3, 2, 0),
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 7efd3ab1..731ad388 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -591,7 +591,7 @@ def blen_read_animations_action_item(action, item, cnodes, fps, anim_offset, glo
bl_obj = item.bl_obj
# We want to create actions for objects, but for bones we 'reuse' armatures' actions!
- grpname = item.bl_obj.name
+ grpname = bl_obj.name
# Since we might get other channels animated in the end, due to all FBX transform magic,
# we need to add curves for whole loc/rot/scale in any case.