How to get joint orientation by daz script

ftd1992ftd1992 Posts: 0

I want get joint orientation by daz script, but fail.

Some joint result is true like Left Shoulder Bend,but some joint result is error.

I need help.

image

(function () {

function radialAngle() {

var pi = Math.PI;

return 180 / pi;

};

var bone = Scene.getPrimarySelection();

var nAngle = radialAngle();

var rot = bone.getLocalRot();

var rotOrder = bone.getRotationOrder();

 

var o = bone.getOrientation()

oEuler = o.getValue(rotOrder.firstAxis, rotOrder.secondAxis, rotOrder.thirdAxis);

oEulerD = oEuler.multiply(DzVec3(nAngle, nAngle, nAngle));

print(oEulerD)

})();

Post edited by Richard Haseltine on

Comments

  • Moved to the scripting forum. I'm afraid I don't have anything constructive to add, other than to point out that the lined button with <> at bottom-right will give you a box you can post code into so that it keeps its formatting.

  • OmnifluxOmniflux Posts: 360

    What error are you seeing and on which joint?

    I have no error on G8F Left Forearm Bend, although the result with your script does not match the values in the Joint Editor (it does with Left Shoulder Bend).

Sign In or Register to comment.