arunspooja
05-22-2006, 07:36 AM
Good Afternoon friends
I have problem in animating the centerpivot.
I.e, i have created a attribute "pivot" to change the "centerpivot" of an object with out pressing "insert" in keyboard.
I have written the below expression and applied it on a "polygon sphere" by adding custom attributes
such as "pivot"->for switching(On or Off)
and p_x,p_y,p_z are some other custom attributes i have added to vary the pivot of an object.
but its keying properly and when i switch "pivot" from "1" to "0" its animating randomly and total animation is collapsed.
I dont know what's wrong.
If any one find the solution, reply
Thankyou
int $x;
int $y;
int $z;
if((pSphere1.pivot)!=0)
{
EnterEditMode;
pSphere1.scalePivotX=pSphere1.p_x;
pSphere1.scalePivotY=pSphere1.p_y;
pSphere1.scalePivotZ=pSphere1.p_z;
pSphere1.rotatePivotX=pSphere1.p_x;
pSphere1.rotatePivotY=pSphere1.p_y;
pSphere1.rotatePivotZ=pSphere1.p_z;
$x=.I[4];
$y=.I[5];
$z=.I[6];
move -a $x $y $z pSphere1.scalePivot pSphere1.rotatePivot;
EnterEditMode;
}
else
{
pSphere1.scalePivotX=0;
pSphere1.scalePivotY=0;
pSphere1.scalePivotZ=0;
pSphere1.rotatePivotX=0;
pSphere1.rotatePivotY=0;
pSphere1.rotatePivotZ=0;
}
I have problem in animating the centerpivot.
I.e, i have created a attribute "pivot" to change the "centerpivot" of an object with out pressing "insert" in keyboard.
I have written the below expression and applied it on a "polygon sphere" by adding custom attributes
such as "pivot"->for switching(On or Off)
and p_x,p_y,p_z are some other custom attributes i have added to vary the pivot of an object.
but its keying properly and when i switch "pivot" from "1" to "0" its animating randomly and total animation is collapsed.
I dont know what's wrong.
If any one find the solution, reply
Thankyou
int $x;
int $y;
int $z;
if((pSphere1.pivot)!=0)
{
EnterEditMode;
pSphere1.scalePivotX=pSphere1.p_x;
pSphere1.scalePivotY=pSphere1.p_y;
pSphere1.scalePivotZ=pSphere1.p_z;
pSphere1.rotatePivotX=pSphere1.p_x;
pSphere1.rotatePivotY=pSphere1.p_y;
pSphere1.rotatePivotZ=pSphere1.p_z;
$x=.I[4];
$y=.I[5];
$z=.I[6];
move -a $x $y $z pSphere1.scalePivot pSphere1.rotatePivot;
EnterEditMode;
}
else
{
pSphere1.scalePivotX=0;
pSphere1.scalePivotY=0;
pSphere1.scalePivotZ=0;
pSphere1.rotatePivotX=0;
pSphere1.rotatePivotY=0;
pSphere1.rotatePivotZ=0;
}
