BVH import crashes on specific armature #104712

Closed
opened 2023-06-22 23:05:29 +02:00 by Butterscotch · 3 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: AMD Radeon RX 7900 XTX ATI Technologies Inc. 4.5.0 Core Profile Context 23.5.2.230523

Blender Version
Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3
Worked: Unknown, 2.83.20 was tested and gave the same results

Addon Information
Name: BioVision Motion Capture (BVH) format (1, 0, 1)
Author: Campbell Barton

Short description of error
Importing this BVH file crashes the addon. It appears to be having trouble with the armature.
As a baseline, you can import the file into http://www.akjava.com/demo/bvhplayer/ to see how it should look.

Exact steps for others to reproduce the error
Based on the default startup:

  1. Open an empty scene.
  2. Attempt to import the provided BVH file (file is recorded at scale 0.01, but the import issue happens at any scale).
**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: AMD Radeon RX 7900 XTX ATI Technologies Inc. 4.5.0 Core Profile Context 23.5.2.230523 **Blender Version** Broken: version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: `e1ccd9d4a1d3` Worked: Unknown, 2.83.20 was tested and gave the same results **Addon Information** Name: BioVision Motion Capture (BVH) format (1, 0, 1) Author: Campbell Barton **Short description of error** Importing this BVH file crashes the addon. It appears to be having trouble with the armature. As a baseline, you can import the file into http://www.akjava.com/demo/bvhplayer/ to see how it *should* look. **Exact steps for others to reproduce the error** Based on the default startup: 1. Open an empty scene. 2. Attempt to import the provided BVH file (file is recorded at scale 0.01, but the import issue happens at any scale).
Butterscotch added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-06-22 23:05:30 +02:00
Author

Small update on this, it appears the BVH has two joints named the same LEFT_HAND and RIGHT_HAND both existing twice. I don't know what the expected behaviour for this should be, but it could be nice to have it automatically re-named to something like LEFT_HAND.001 for duplicates, much like if you named two bones the same when editing the armature in Blender.

If this is intended behaviour, then feel free to close this issue as I have no other problems.

Small update on this, it appears the BVH has two joints named the same `LEFT_HAND` and `RIGHT_HAND` both existing twice. I don't know what the expected behaviour for this should be, but it could be nice to have it automatically re-named to something like `LEFT_HAND.001` for duplicates, much like if you named two bones the same when editing the armature in Blender. If this is intended behaviour, then feel free to close this issue as I have no other problems.
Member

Hi, thanks for the report. No crash here, instead I get AttributeError.

Traceback (most recent call last):
  File "C:\Users\prati\OneDrive\Desktop\temp-blender-builds\blender-4.0.0-alpha+main.ecb3262bf049-windows.amd64-release\4.0\scripts\addons\io_anim_bvh\__init__.py", line 132, in execute
    return import_bvh.load(context, report=self.report, **keywords)
  File "C:\Users\prati\OneDrive\Desktop\temp-blender-builds\blender-4.0.0-alpha+main.ecb3262bf049-windows.amd64-release\4.0\scripts\addons\io_anim_bvh\import_bvh.py", line 699, in load
    bvh_node_dict2armature(
  File "C:\Users\prati\OneDrive\Desktop\temp-blender-builds\blender-4.0.0-alpha+main.ecb3262bf049-windows.amd64-release\4.0\scripts\addons\io_anim_bvh\import_bvh.py", line 471, in bvh_node_dict2armature
    bvh_node.temp.parent = bvh_node.parent.temp
AttributeError: 'BVH_Node' object has no attribute 'temp'
Hi, thanks for the report. No crash here, instead I get AttributeError. ``` Traceback (most recent call last): File "C:\Users\prati\OneDrive\Desktop\temp-blender-builds\blender-4.0.0-alpha+main.ecb3262bf049-windows.amd64-release\4.0\scripts\addons\io_anim_bvh\__init__.py", line 132, in execute return import_bvh.load(context, report=self.report, **keywords) File "C:\Users\prati\OneDrive\Desktop\temp-blender-builds\blender-4.0.0-alpha+main.ecb3262bf049-windows.amd64-release\4.0\scripts\addons\io_anim_bvh\import_bvh.py", line 699, in load bvh_node_dict2armature( File "C:\Users\prati\OneDrive\Desktop\temp-blender-builds\blender-4.0.0-alpha+main.ecb3262bf049-windows.amd64-release\4.0\scripts\addons\io_anim_bvh\import_bvh.py", line 471, in bvh_node_dict2armature bvh_node.temp.parent = bvh_node.parent.temp AttributeError: 'BVH_Node' object has no attribute 'temp' ```
Pratik Borhade added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-08-09 08:16:31 +02:00
Member

Yes, renaming duplicate names has fixed the problem.

I don't know what the expected behaviour for this should be, but it could be nice to have it automatically re-named to something like LEFT_HAND.001 for duplicates

@ideasman42 , can you check? :)

Yes, renaming duplicate names has fixed the problem. > I don't know what the expected behaviour for this should be, but it could be nice to have it automatically re-named to something like LEFT_HAND.001 for duplicates @ideasman42 , can you check? :)
Pratik Borhade added the
Module
Add-ons (BF-Blender)
label 2023-08-09 08:20:21 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-08-09 09:52:18 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104712
No description provided.