PDA

View Full Version : Problem connectAttr curveOnSurfaceCV


ap77
11-27-2009, 10:11 AM
Hi guys, i have a problem with getAttr/connectAttr the cvīs from a curveOnSurface.
I only get the "local coordinates" (uv-coordinates from the nurbsPlane), or the "world coordinates" from a "duplicated curve" ... but i didnīt duplicate the curve.
--> i have no idea whatīs going on and how to solve the problem.

I think i need something like the cvPosCmd.mll but i donīt have it and iīm not able to compile it for maya 8.5.

please help, thanks lois



//// just for example:
nurbsPlane -p 0 0 0 -ax 0 0 1 -w 10 -lr 1 -d 3 -u 5 -v 5 -ch 1; objectMoveCommand;
$curve = `curveOnSurface -d 3 -uv 0.272368 0.586511 -uv 0.212186 0.46404 -uv 0.0918215 0.219096 -uv 0.564078 0.0882223 -uv 0.871524 -0.016964 -uv 0.751432 0.859324 -uv 0.802271 0.855737 -uv 0.827691 0.853944 -k 0 -k 0 -k 0 -k 1 -k 2 -k 3 -k 4 -k 5 -k 5 -k 5 nurbsPlane1` ;


string $arclenInfo = `arclen -ch 1 $curve`;
select $arclenInfo;
$arclenInfo = `rename ("curveInfo_" + $curve)`;

// Curve Degree
int $degree = eval("getAttr " + $curve + ".degree");

// Curve Spans
int $spans = eval("getAttr " + $curve + ".spans");

// output the cv count
int $numCVs = $spans + $degree;
print ("numCVs = "+$numCVs+"\n");

// output all cvs
//float $cv[] = `pointPosition -l ( $curve + ".cp["+$i+"]" )`; //// local Coordinates ... W O R K S ... uv-coordinates on surface
//float $cv[] = `pointPosition -w ( $curve + ".cp["+$i+"]" )`; //// world Coordinates ... W O R K S ... xyz-coordinates in worldSpace

//$cPts = `getAttr ($arclenInfo + ".controlPoints[0]")`;
//print $cPts; print "\n";

$cube = `polyCube -w 0.5 -h 0.5 -d 0.5 -sx 1 -sy 1 -sz 1 -ax 0 0 1 -cuv 4 -ch 1`;
//print $cube[0]; print "\n";

connectAttr -f ($arclenInfo + ".controlPoints[0]") ($cube[0] + ".translate");
//// --> when i want to connect ...controlPoints[1] [2] [3] etc. it connects to the cvīs from a "duplicatCurve"
//// and not from the "original CurveOnSurface-cvīs" ... ???

CGTalk Moderation
11-27-2009, 10:11 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.