اگه بخوای دو تا Locator رو به هم Point Constrain کنی ، Script وجود داره ولی برای اون نه !
برای اون باید خودت Script بسازی.من بلدم ولی باور کن وقتشو ندارم چون خیلی کار میبره.
Scriptزیر برای Locator هست :
global proc objectSnap()
{
string $list[] = `ls -sl`;
int $len = size($list);
if ($len < 2) {
error "must select at least two objects";
return;
}
float $trans[16] = `xform -q -ws -m $list[$len-1]`;
float $rp[3];
float $sp[3];
// copy the locator local position too
float $locator[3];
string $shape, $shapes[];
if (`objectType $list[$len-1]` == "locator")
$shape = $list[$len-1];
else if (`objectType $list[$len-1]` == "transform") {
$rp = `getAttr ($list[$len-1]+".rp")`;
$sp = `getAttr ($list[$len-1]+".sp")`;
$shapes = `listRelatives -s $list[$len-1]`;
if (size($shapes)) $shape = $shapes[0];
}
if (`objectType $shape` == "locator") {
$locator[0] = `getAttr ($list[$len-1]+".localPositionX")`;
$locator[1] = `getAttr ($list[$len-1]+".localPositionY")`;
$locator[2] = `getAttr ($list[$len-1]+".localPositionZ")`;
}
int $i = 0;
for (; $i < $len - 1; $i++) {
xform -ws -m
$trans[0] $trans[1] $trans[2] $trans[3]
$trans[4] $trans[5] $trans[6] $trans[7]
$trans[8] $trans[9] $trans[10] $trans[11]
$trans[12] $trans[13] $trans[14] $trans[15]
$list[$i];
// locator
$shape = "";
if (`objectType $list[$len-1]` == "locator")
$shape = $list[$len-1];
else if (`objectType $list[$len-1]` == "transform") {
setAttr -type double3 ($list[$i]+".rp") $rp[0] $rp[1]
$rp[2];
setAttr -type double3 ($list[$i]+".sp") $sp[0] $sp[1]
$sp[2];
$shapes = `listRelatives -s $list[$len-1]`;
if (size($shapes)) $shape = $shapes[0];
}
if (`objectType $shape` == "locator")
{ setAttr ($list[$i]+".localPositionX") $locator[0];
setAttr ($list[$i]+".localPositionY") $locator[1];
setAttr ($list[$i]+".localPositionZ") $locator[2];
}
}
}