Feedback

Please leave feedback and comments. I am always interested to hear how people get on using these LScripts!

Friday, 10 June 2011

LScript - Modeler_2PointPoly


LScript (Modeler) to produce standalone 2 point polys for use with "VOLT" and some other of my lscripts. It produces 2 point poly's that are unconnected and all located at <0.0,0.0,0.0> that can then be displaced inside of layout.

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 - 2 Point Poly

    Modeler_2PointPoly.ls

*/

@version 2.2
@warnings
@script modeler
@name *2 Point Poly

    // Title
    sTitle = "*2 Point Poly";

    // Version
    sVersion = "v1.0";

    ctrl_c0;

main
{

    // Recall
    iNumber = recall("iNumber",1024);

    reqbegin(sTitle + " " + sVersion);

    // Reset
    ctrl_res0 = ctlbutton("Reset",50,"button_reset"); // Button Reset
    ctlsep();

    // Control
    ctrl_c0 = ctlinteger("Number",iNumber);

    // Developer
    ctlsep();
    ctrl_dev0 = ctltext("","developer: Stephen Culley","http://www.stephenculley.co.uk");

    return if !reqpost();

    iNumber = getvalue(ctrl_c0);

    // Store
    store("iNumber",iNumber);

    moninit(iNumber,"Processing...");  // Progress Monitor

        editbegin();
            
            for(n = 1; n <= iNumber; n++)
              {
              aPoints[1] = addpoint(0.0,0.0,0.0);
              aPoints[2] = addpoint(0.0,0.0,0.0);
              addpolygon(aPoints);
            
              monstep(); // Progress Monitor
              } 

        editend();

    monend(); // Progress Monitor
}

button_reset
{
    setvalue(ctrl_c0,1024); // Number
}
All scripts available at my Google Drive at
https://drive.google.com/open?id=1cR_q2GVUAJHumic1-A3eXV16acQnVTWs

No comments:

Post a comment