emmalowe Posted November 3, 2018 Share Posted November 3, 2018 Hi all, I am new to 3ds Max. I have created a script to create spline in between two splines. It did run initially but all of a sudden it started giving me an error call needs function or class. Can some one please help me to resolve the error. ( local new_spline new_spline = splineShape () addNewSpline new_spline spl1 = selection[1] spl2 = selection[2] for s = 1 to (numsplines spl1) do ( for k = 1 to (numknots spl1 s) do ( current1 = getKnotPoint spl1 s k current2 = getKnotPoint spl2 s k local spl1SelInVec = vert spl1 s k current1 (getInVec spl1 s k) (getOutVec spl1 s k) local spl2SelInVec = vert spl2 s k current2 (getInVec spl2 s k) (getOutVec spl2 s k) local dir = normalize (spl2SelInVec.pos-spl1SelInVec.pos) local dist = (distance spl1SelInVec.pos spl2SelInVec.pos)/2.0 local midpos = spl1SelInVec.pos + dir * dist local dirInVec = normalize (spl2SelInVec.invec-spl1SelInVec.invec) local distInVec = (distance spl1SelInVec.invec spl2SelInVec.invec)/2.0 local midposInVec = spl1SelInVec.invec + dirInVec * distInVec local dirOutvec = normalize (spl2SelInVec.outvec-spl1SelInVec.outvec) local distOutvec = (distance spl1SelInVec.outvec spl2SelInVec.outvec)/2.0 local midposOutvec = spl1SelInVec.outvec + dirOutvec * distOutvec addKnot new_spline 1 #beziercorner #curve midpos midposInVec midposOutvec ) ) q = querybox "Close Spline?" title:"Inbetween Spline" if q then ( close new_spline 1 updateshape new_spline ) select new_spline ) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now