Error when trying to Import a Pose on a MHX rig

Issue #986 resolved
Nicholas Marshall created an issue

I get the same error with Rigify.

File "/home/nmarshall/.config/blender/3.0/scripts/addons/Diffeomorphic-import_daz-7ec475d56fd3/animation.py", line 1026, in loadAnimation
offset,prop = self.getSingleAnimation(filepath, context, offset)
File "/home/nmarshall/.config/blender/3.0/scripts/addons/Diffeomorphic-import_daz-7ec475d56fd3/animation.py", line 508, in getSingleAnimation
result = self.animateBones(context, animations, offset, prop, filepath)
File "/home/nmarshall/.config/blender/3.0/scripts/addons/Diffeomorphic-import_daz-7ec475d56fd3/animation.py", line 782, in animateBones
self.transformBone(rig, bname, tfm, value, n, offset, True)
File "/home/nmarshall/.config/blender/3.0/scripts/addons/Diffeomorphic-import_daz-7ec475d56fd3/animation.py", line 908, in transformBone
setBoneTwist(tfm, pb)
File "/home/nmarshall/.config/blender/3.0/scripts/addons/Diffeomorphic-import_daz-7ec475d56fd3/node.py", line 989, in setBoneTwist
euler = pb.matrix_basis.to_3x3().to_euler(pb.rotation_mode)
ValueError: Matrix.to_euler(): invalid euler order 'QUATERNION'

location: <unknown location>:-1

Using the latest version of Diffeomorphic. And Blender 3.0.1

Daz Rigs work fine.

I have tried Poses I made in DAZ and Pose from exporting from Diffeomorphic. Neither work.

Comments (9)

  1. Thomas Larsson repo owner

    Fixed in last commit. I had never used the mhx rig when the character was imported with quaternions before.

  2. Alessandro Padovani

    Thomas, am I correct that quaternions are intended to be used with the daz/simple rig ? I mean both rigify and mhx do have their setup so I guess they will ignore quaternions. Just to understand things thank you.

  3. Thomas Larsson repo owner

    Apparently the rotation order of the mhx bones is the same as the original daz bones. This wasn’t a deliberate design question, it just happened that way. But it is not obviously wrong, I think.

  4. Alessandro Padovani

    Ok so the quaternion option also affects mhx, but not rigify. Thank you.

    p.s. In my opinion mhx should always use quaternions though, being a ik rig. I mean euler is not good for free ik joints, it’s only good for fk rigs as daz.

  5. Thomas Larsson repo owner

    With quaternions the limit rotation constraints are lost. But perhaps they can be retained, if one specifies the rotation order in the constraint itself. Will look into that.

  6. Alessandro Padovani

    Rotation limits make little sense for quaternions though. I mean usually quaternions are used for free joints in shoulders and hip to avoid ik flipping. Don’t know how quaternions would react to limits, especially in blender that’s quite rude at handling limits as we experienced in #902.

  7. Nicholas Marshall reporter

    Thanks that patch fixed this issue for me.

    What opinions results in characters being imported with quaternions?

  8. Log in to comment