X rotate not working

Ok so, I'm trying to write a script that will change the values or set the values in the whole timeline. The script is as below-

 

var g8 = Scene.getPrimarySelection();

var skeleton = Scene.getSelectedSkeletonList ();

for (var fig_idx = 0; fig_idx != skeleton.length; ++ fig_idx) {

var bone = skeleton[fig_idx].findBoneByLabel ("Right Shoulder Bend");

c = bone.getXRotControl ();

c1 = bone.getYRotControl ();

c2 = bone.getZRotControl ();

//c.setValue (c.getValue () + 15 );

//c1.setValue (c1.getValue () - 15 );

}

 

var msg = c.getValue();

MessageBox.information( msg, " is the value.", "&OK" );

//return;

Now, the issue here is that when I use the function getXRotControl(), it's returning zero, while the value on the dial is -5.59, while both the Y and Z rotation values are showing properly, its only the x values I'm unable to get. While everything is working for all the other bones. This means that the function getXRotControl() is not working properly for the bones "Right Shoulder Bend" and "Right Shoulder Twist" and also for left shoulders too. I need to add +15 twist to each frame, since twist dial is red, it corresponds to x rotate.

Post edited by srbvik91_3ba41f4763 on

Comments

  • I doubt it's relevant, if this is the only bone and paramter with the issue, but on the bend/Twist pairs there is cloning of properties so that you can set all of them by seelcting only a single bone out of the pair (because Twist will be doing the actual XRotating, while Bend does the Y and Z). The thighs, though, do a similar thing and they presumably are not erroring.

  • I doubt it's relevant, if this is the only bone and paramter with the issue, but on the bend/Twist pairs there is cloning of properties so that you can set all of them by seelcting only a single bone out of the pair (because Twist will be doing the actual XRotating, while Bend does the Y and Z). The thighs, though, do a similar thing and they presumably are not erroring.

    Thanks for the reply, I get what you're saying but xRotate is not working on both left and right shoulder twist bones, whereas everything is rotating properly in other bones including x rotate. I haven't tried thigh bones though, I'll try it but right now my system is rendering an animation. What is even more irritating is that when I try to get the value of "c", it returns 0 (X rotate value), while both c1 and c2 (Y and Z rotate) are returning their values properly, so I believe that the function getXRotControl() is either not working properly or it is an issue related to bone pairs as you said there is cloning of properties. Its been a few days I've been stuck on this, and this is a very small error that shouldn't even occur in the first place,

Sign In or Register to comment.