Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Converting Curves to Linear...

Converting Curves to Linear...

2005-04-18       - By Javier

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

Lee
selectyourcurves and run this.. (using jscript as scripting languate)
you might have to fix wrapped lines in this email...
j



nbs2lin(selection)

function nbs2lin(iCvs){
  for (var i=0;i<iCvs.count;i++){
    if (iCvs(i).type == "crvlist"){
      oCvs = jCvs(iCvs(i))
      var LinKnots= new Array();
      var NbLinKnots= new Array();
      var LinDeg = new Array();
     
      for (var j=0;j<oCvs.Count;j++){
        LinDeg.push(1)
        NbLinKnots.push(oCvs.NbControlPoints[j])
        for (var k=0;k<oCvs.NbControlPoints[j];k++){
          LinKnots.push(k)
        }
      }
    }  
    //use LinKnots and LinDeg instead of oCvs.Knots and oCvs.Degree)
    FreezeObj(iCvs(i))
    iCvs(i).ActivePrimitive.Geometry.set(oCvs.Count, oCvs.ControlPoints,
oCvs.NbControlPoints, LinKnots, NbLinKnots, oCvs.Closed, LinDeg ,
oCvs.Parametrization,  0 )
   
  }
}
function jCvs(in_cvs){

  var vbArgs = new VBArray(in_cvs.ActivePrimitive.Geometry.Get2( siSINurbs ));
  var args = vbArgs.toArray();
 
  var oCvs = new Object();
 
  oCvs.Count = args[0];   oCvs.NbCurves = oCvs.Count  
    var vbArg1 = new VBArray(args[1]);
  oCvs.ControlPoints = vbArg1.toArray();
    var vbArg2 = new VBArray(args[2])  
  oCvs.NbControlPoints = vbArg2.toArray();
    var vbArg3 = new VBArray(args[3]);
  oCvs.Knots = vbArg3.toArray();
    var vbArg4 = new VBArray(args[4]);
  oCvs.NbKbnots = vbArg4.toArray();
    var vbArg5 = new VBArray(args[5]);
  oCvs.Closed = vbArg5.toArray();
    var vbArg6 = new VBArray(args[6]);
  oCvs.Degree = vbArg6.toArray(); //NbControlPoints
    var vbArg7 = new VBArray(args[7]);
  oCvs.Parametrization = vbArg7.toArray();

  return oCvs;
}

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi