ScriptSpot

Forum topic · Scripts Wanted

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

By Stenrik · 2016-07-05

Description

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"?

Attachments
Comments (8)

Need to work on spline under modifiers for better life saving

nnq2603 · 2020-07-03

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 · 2020-07-03


-- 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

Thanks Jahman for help in spline script.

nnq2603 · 2020-07-17

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

Thanks for taking the time to write this script

anm8rjp · 2017-01-25

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

Many Thanks!

Stenrik · 2016-07-07

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 · 2016-07-06

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)

EPXLSD · 2016-10-19

SUPER! Thank u!!!

Spline interpolation set AIO

nnq2603 · 2016-10-28

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