Simple Request: Set spline interpolation to a given amount for all selected splines?

Hi,

I've been bringing hundreds .AI files in to work with them. The default "interpolation" level is always 6, and I want to set all select spline interpolation levels to a lower number.

When googling for this, I came across this for something called a "Spline shape." I have never converted anything to a "spline shape" before, only an "editable spline" in my workflow.

I looked up the command here: http://www.cgplusplus.com/online-reference/maxscript-reference/source/sp...
**.steps Integer default: 6**

Just not sure how to integrate it into the script itself so that it applies only to selected splines. Is it considered a custom attribute? Does it work for "editable splines"?

AttachmentSize
splineinterpolation.jpg143.75 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nnq2603's picture

Need to work on spline under modifiers for better life saving

Barigazy did a great job but it'd be better if there's a script that can change/set interpolation of spline under another modifiers. This one only work when we selected all pure spline, or select single spline under the modifier. It can't go through all objects in selections/scene to see spline under modifier.

jahman's picture

.

-- set steps of selected shapes to zero
(for s in selection where isKindOf s.baseobject Shape and isProperty s.baseobject #steps collect s.baseobject).steps = 0
-- set all scene shapes steps to zero
(for s in shapes where isKindOf s.baseobject Shape and isProperty s.baseobject #steps collect s.baseobject).steps = 0
nnq2603's picture

Thanks Jahman for help in spline script.

Thanks a lot for your support, have a nice day!

anm8rjp's picture

Thanks for taking the time to write this script

barigazy, Many Thanks!!! Saved me a ton of time.

Stenrik's picture

Many Thanks!

Thank you, Barigazy, really appreciate this, saves me a lot of time. I really like how the script works through certain modifiers like "bend." Extra useful there.

barigazy's picture

...

Copy this code to Maxscript editor and save it as *.ms file

try(destroyDialog ::sRoll)catch()
rollout sRoll "Interplation"
(
	spinner spn_steps "Steps:" type:#integer range:[0,1e3,6] fieldwidth:68 pos:[5,5]
	button btn_steps "Set Value" width:110 height:18 pos:[5,25]
 
	on btn_steps pressed do if selection.count == 0 then messageBox "Select Some Shapes!" title:"Info" beep:off else
	(
		for s in selection where isKindOf s shape and isProperty s #steps do s.steps = spn_steps.value
	)
)
createDialog sRoll 120 50 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

bga

nnq2603's picture

Spline interpolation set AIO

Awesome, thanks for ur help man. Save a lot of works.

EPXLSD's picture

SUPER! Thank u!!!

SUPER! Thank u!!!

EPXLSD

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.