Bug #1032

BVH import vs collada export (collada export renames bones)

Added by Joel Palmius over 2 years ago. Updated over 2 years ago.

Status:NewStart date:05/28/2016
Priority:LowDue date:
Assignee:Jonas Hauquier% Done:


Category:File export
Target version:MakeHuman 1.2.0


Test case:

  • Set skeleton to default
  • Export via collada
  • Import in blender
  • Mark skeleton and export as bvh
  • Try to use bvh file as pose in MH

-> MH crash: "does not contain a joint for upperleg02.L"

Traceback (most recent call last):
  File "./core/events3d.py", line 212, in callEvent
  File "plugins/3_libraries_pose.py", line 93, in onFileSelected
    gui3d.app.do(PoseAction("Change pose", self, self.currentPose, filename))
  File "./core/mhmain.py", line 857, in do
    if action.do():
  File "plugins/3_libraries_pose.py", line 65, in do
  File "plugins/3_libraries_pose.py", line 154, in loadPose
    anim = self.loadBvh(filepath, convertFromZUp="auto")
  File "plugins/3_libraries_pose.py", line 178, in loadBvh
    self.bvh_bone_length = self.calculateBvhBoneLength(bvh_file)
  File "plugins/3_libraries_pose.py", line 187, in calculateBvhBoneLength
    raise RuntimeError('Failed to auto scale BVH file %s, it does not contain a joint for "%s"' % (bvh_file.name, COMPARE_BONE))
RuntimeError: Failed to auto scale BVH file mountain, it does not contain a joint for "upperleg02.L" 

Do the same with MHX2 and it works.

The reason seem to be that the collada export renames all the dots to underscores, so after the collada export, the bone is named upperleg02_L, not upperleg02.L.

I assume there is a good reason for this, but maybe it would be possible to try for both dot and underscore when looking for bones upon import?


#1 Updated by Joel Palmius over 2 years ago

  • Description updated (diff)

Also available in: Atom