The Time Serpent
09-10-2003, 05:49 PM
here what ive came up so far
global proc locConstrain()
{
// checks for the names of the locator and the vertex
string $sel[] = `ls -sl`;
// checks for the world space position of the vertex
float $pos[] = `pointPosition -w $sel[1]`;
// assigns the world space x,y,z values of the vertex
float $mPX = $pos[0];
float $mPY = $pos[1];
float $mPZ = $pos[2];
// assigns the locator name and x,y,z attributes
string $lPX = $sel[0] + ".translateX";
string $lPY = $sel[0] + ".translateY";
string $lPZ = $sel[0] + ".translateZ";
setAttr $lPX $mPX;
setAttr $lPY $mPY;
setAttr $lPZ $mPZ;
}
now the question is how i can make it update continuously? (the constraints are doin it but how?)
global proc locConstrain()
{
// checks for the names of the locator and the vertex
string $sel[] = `ls -sl`;
// checks for the world space position of the vertex
float $pos[] = `pointPosition -w $sel[1]`;
// assigns the world space x,y,z values of the vertex
float $mPX = $pos[0];
float $mPY = $pos[1];
float $mPZ = $pos[2];
// assigns the locator name and x,y,z attributes
string $lPX = $sel[0] + ".translateX";
string $lPY = $sel[0] + ".translateY";
string $lPZ = $sel[0] + ".translateZ";
setAttr $lPX $mPX;
setAttr $lPY $mPY;
setAttr $lPZ $mPZ;
}
now the question is how i can make it update continuously? (the constraints are doin it but how?)
