Compatible with Newtek LightWave 9.6 and above.
// LScript Modeler - www.StephenCulley.co.uk
//
// web address: http://www.stephenculley.co.uk
// email address: email@stephenculley.co.uk
/*
LScript Modeler - Rest On Ground
Modeler_RestOnGround.ls
*/
@version 2.2
@warnings
@script modeler
@name *Rest On Ground
// Title
sTitle = "*Rest On Ground";
// Version
sVersion = "v1.0";
main
{
// Selection - Point (DIRECT)
selmode(DIRECT);
iPointCount = pointcount();
if(iPointCount < 1) error("No points selected.");
editbegin();
vOffset = pointinfo(points[1]);
if(iPointCount > 1)
{
for(iCurrentPoint = 2; iCurrentPoint <= iPointCount; iCurrentPoint++)
{
vPoint = pointinfo(points[iCurrentPoint]);
if(vPoint.y < vOffset.y) vOffset = vPoint;
}
}
vOffset = <0.0,-vOffset.y,0.0>;
for(iCurrentPoint = 1; iCurrentPoint <= iPointCount; iCurrentPoint++)
{
pointmove(points[iCurrentPoint],pointinfo(points[iCurrentPoint]) + vOffset); // Move point
}
editend();
}
https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs
No comments:
Post a Comment