PDA

View Full Version : sript WIP: Constrain to a point


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?)

CaptainSam
09-13-2003, 05:50 PM
Theres a script called rivet that does this already. You may wanna check that out

CGTalk Moderation
01-16-2006, 02:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.