Jump to content

aligning groups of verts on edit spline?


stayinwonderland
 Share

Recommended Posts

Cant remember where I found it, but this flattens splines

 

(
on isEnabled return
(
 selection.count == 1 and \
 (classof selection[1] == SplineShape or\
 classof selection[1] == Line) \
 and selection[1].modifiers.count == 0
)
on execute do
(
 new_z = $.pos.z
 for s = 1 to (numSplines $) do
 (
   for k = 1 to (numKnots $ s) do
   (
     knt = getKnotPoint $ s k
     in_vec = getInVec $ s k
     out_vec = getOutVec $ s k
     knt.z = in_vec.z = out_vec.z = new_z
     setInVec $ s k in_vec
     setOutVec $ s k out_vec
     setKnotPoint $ s k knt
   )--end k loop
 )--end s loop
 updateshape $
)--end execute
)--end script 

 

I guess it might be possible to edit the script to do what you want?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...