Difference between revisions of "PlaceLineOnPlane MEL"
From scripting
(Created page with " global proc string PlaceLineOnPlane(float $x1, float $y1, float $x2, float $y2, string $PlaneName, string $NameStr) { //0001D LLC 2015 Nick Pisca vector $xyz1 = `pointPos...") |
(No difference)
|
Latest revision as of 19:40, 24 April 2017
global proc string PlaceLineOnPlane(float $x1, float $y1, float $x2, float $y2, string $PlaneName, string $NameStr) { //0001D LLC 2015 Nick Pisca vector $xyz1 = `pointPosition ($PlaneName + ".uv["+($x1)+"]["+($y1)+"]")`; vector $xyz2 = `pointPosition ($PlaneName + ".uv["+($x2)+"]["+($y2)+"]")`; string $NN; if ($NameStr == "") { $NN = `curve -d 1 -p ($xyz1.x) ($xyz1.y) 0.0 -p ($xyz2.x) ($xyz2.y) 0.0` ; } else { $NN = `curve -d 1 -p ($xyz1.x) ($xyz1.y) 0.0 -p ($xyz2.x) ($xyz2.y) 0.0 -n $NameStr` ; } return $NN; }
For information on NURBS, read pages 43-49, 109-116 in YSYT.