function Params()

Top  Previous  Next


The Params()  function is processed at the beginning  and creates all the parameters

to be appended on the objects data list. These parameters will compare on screen in a property list when the object

gets selected and are the core of the Smart-Object implementation.

Since the system units can change we need to be sure that the default

values are coherent, and for this purpose the system variable GetOneMillimiter()

returns one millimiter in the current units so we can scale accordingly the default values.




function Params()


  var one_meter = system.GetOneMillimiter()*1000.0;


 this.OpenGroup ("_dim", "Dimensions");


 this.PushParamDouble("_sx","Width","X Length ", "Length",  1.0*one_meter , 0  );

 this.PushParamDouble("_sy","Depth","Y Length", "Length",   1.0*one_meter , 0  );

 this.PushParamDouble("_sz","Heigth","Z Length", "Length",  1.0*one_meter , 0  );

 this.PushParamObject("_sa","Curve","curve,polycurve", PARAM_HIDDEN  );

 this.PushParamText("m","Material","Material of the box", "",  0 ,  0  );


 this.PushParamIntLimited("_lw","Limited value","Ratio", 50  ,  25  , 85 ,  PARAM_SLIDER  , 0  );        



 this.CloseGroup ();