artoon
25-02-2005, 06:35 PM
Hi, I am using maya and I don't know much about mel.
I'll give you an example to show what I want to know.
Say I have a cube and a sphere (polys). I created a new attribute for the cube called "Spin" and I want to control the rotation Y of the sphere.
So far so good, all I have to do is open de connection editor and make the connections (or the expression editor - pSphere1.rotatey = pCube1.spin ).
But, I set the min value of the "Spin" to -10 and the max to 10 with defalt 0. If I connect them with those values, the sphere will rotate only 10 degrees in Y in both directions.
What I want to know is: what I have to type in the expression editor to connect the min value of the sphere (-360 degrees) to the min of the "Spin" value (-10) and the positive values as well (360 = 10) and when I scrub the "Spin" value to 10, the sphere rotates its max value (360).
Thanks in advance,
Artur
I'll give you an example to show what I want to know.
Say I have a cube and a sphere (polys). I created a new attribute for the cube called "Spin" and I want to control the rotation Y of the sphere.
So far so good, all I have to do is open de connection editor and make the connections (or the expression editor - pSphere1.rotatey = pCube1.spin ).
But, I set the min value of the "Spin" to -10 and the max to 10 with defalt 0. If I connect them with those values, the sphere will rotate only 10 degrees in Y in both directions.
What I want to know is: what I have to type in the expression editor to connect the min value of the sphere (-360 degrees) to the min of the "Spin" value (-10) and the positive values as well (360 = 10) and when I scrub the "Spin" value to 10, the sphere rotates its max value (360).
Thanks in advance,
Artur