Dec 2013
1 / 6
Dec 2013
Dec 2013

Hi, I am re-writing my rigging script and  I can not figure this one out. I need to freeze a joint's rotations but  this changes something in the joint and I can not figure out what. The joint might have values but the one I test does not i just freeze the rotations wich are already zero. The visual display in the viewport of the joint looks like its rotating, but the local rotiation axis and rotation value stayes the same(I check the values). If I freeze again it does it again. Does maya may be just redraw the joint differantly every time or am I missing somthing?

Sory for not giving example my code was a bit long but I found the part that breaks it. Run the script, and try to freeze the joint hip, see how al the joints changes visualy. I can not find any thing that actualy changed in the joints atributes or orientation, am I missing something? I get that I am using the y as primary axis and also as yup to orient but would this not just confuse the orient step, or does it actualy create history that affects the freeze later? :

  string $Side = "R";
  float $sizeMul = 1;
  int $sideMul = ((($Side == "L") - 0.5)*2);              // "R" = -1 "L" = 1
  float $hight = 13;
  float $SideWard =2;
 
  //Create joints
  select -cl;
  joint -p ($sideMul*$SideWard*$sizeMul) ($hight*$sizeMul) 0 -n ($Side+"_hip_IKj") -roo "yzx";
  joint -p ($sideMul*($SideWard)*$sizeMul) (($hight - 6) *$sizeMul) (0.2*$sizeMul) -n ($Side+"_knee_IKj") -roo "yzx";
  joint -p ($sideMul*($SideWard)*$sizeMul) (($hight - 12) *$sizeMul) 0 -n ($Side+"_ankle_IKj") -roo "zxy";
  joint -p ($sideMul*($SideWard)*$sizeMul) (($hight - 13) *$sizeMul) 0 -n ($Side+"_ankle_Tip");
  select -r ($Side+"_ankle_IKj");
  joint -p ($sideMul*($SideWard)*$sizeMul) 0 (2*$sizeMul) -o 0 0 0 -n ($Side+"_ball_IKj") -roo "yzx";
  joint -p ($sideMul*($SideWard)*$sizeMul) 0 (3*$sizeMul) -n ($Side+"_toe_IKj");
  setAttr ($Side+"_hip_IKj.segmentScaleCompensate") 0;
 
 
  //This breaks it
  joint -e  -oj yzx -secondaryAxisOrient yup -ch -zso ("R_hip_IKj");
  //This would be ok
  //joint -e  -oj xyz -secondaryAxisOrient yup -ch -zso ("R_hip_IKj");

The problem is that you aren't freezing the joints rotation. You are using the reorient joint option, changing the orientations of all of them instead. I have attached a picture to show what happened.

To freeze the rotations you would want to use the makeIdentity command.
makeIdentity -apply true -r 1;

Hi thanks for the reply good to know someone is listening. Strugling to get replys on this site these days. Any way. I dont think I explained my question well. I run the part of the script I posted including the line 

joint -e -oj yzx -secondaryAxisOrient yup -ch -zso ("R_hip_IKj")

to orient the joints.

Now I also freeze it like you said. My problem is every time I freeze it the joint changes in the vieport. The piramid looking (bone) curve part of the object turns in the viewport every time I freeze it but the orient axis stay the same. Seems to turn less the more I freeze. I can not find any thing differant with the new joint after refreezing multiple times excet for turning its visual representation in the viewport. So I want to know if I am missing something as is it a know error?

(If I oient with the line I commented out: 

joint -e -oj yzx -secondaryAxusOrient yup -ch -zso ("R_hip_IKj")

it does not hppen later when I freeze)

Ah, I see what you are talking about now.
I Believe that it is just redrawing the visuals for the joints.

I don't believe anything is actually changing.