setOrientation() issue

I have a small problem I'm trying to solve and it has to do with setting the Orientation in the joint editor.

Normally, I use these methods to set the joint transform:
setOrigin()
setEndPoint()
setOrientation()

However, setOrientation() only accepts quaternions as a parameter.  This is a major problem for me.  Daz Studio is screwing up the quaternion to euler angle conversion, and I can't find a fix for it.

If you look at the Joint Editor in the Tools Setting, Orientation is displayed as 3 separate controls of X Rotation, Y Rotation, and Z Rotation.  I was wondering if it was possible to access those controls programmatically, either by script or code.  Reason being, I would like to set those values directly as angles, rather than going through a quaternion.  Is that possible?

https://i.imgur.com/eNIDGbW.png

 

Comments

  • cridgitcridgit Posts: 1,757
    edited May 2022

    Redacted

    Post edited by cridgit on
  • Seven193Seven193 Posts: 1,080

    Thanks, I found the correct control for Orientation, and it works great:
     

     DzFloatProperty *prop=NULL; DzVec3 angles(0,0,0); prop = pBone->getOrientXControl(); if(prop) prop->setValue( angles.x ); prop = pBone->getOrientYControl(); if(prop) prop->setValue( angles.y ); prop = pBone->getOrientZControl(); if(prop) prop->setValue( angles.z );

     

Sign In or Register to comment.