script (MEL) |
Only available in MEL |
snap2to2 |
In categories: Modeling, NURBS |
Go to: Synopsis. Return value. MEL examples.
snap2to2 ( string $objectList[] )
This is a manual version of snap align action available in Maya.
Some of the component selection in Maya doesn't preserve ordering.
For example, if you select curve edit point 5, followed by curve
edit point 3, the list of selected items will be equivalent to that
one if you selected the two points in the reverse order. Polygon
vertices and NURBS curve control points are another example of this.
In the event of needing to use snap align function with one of these
point components, you will need to use this script as follows:
Select 4 points in turn (2 on the object to move and 2 on the target
location). Note the echoed "select -r" statement in the command
editor.
Use snap2to2 with those for objects; for example, if your command
window showed:
select -r curve1.ep[3;
select -r curve1.ep[1];
select -r nurbsPlane1.ep[1][1];
select -r nurbsPlane1.ep[2][2];
you would type:
snap2to2 { "curve1.ep[3]", "curve1.ep[1]",
"nurbsPlane1.ep[1][1]", "nurbsPlane1.ep[2][2]" };
None
Arguments
Variable Name |
Variable Type |
Description |
$objectList | string | list of points on objects to use for snapping
|
snap2to2 { "curve1.ep[3]", "curve1.ep[1]",
"nurbsPlane1.ep[1][1]", "nurbsPlane1.ep[2][2]" };