ScriptSpot

Forum topic · General Scripting

Get Smooth modifier Treshold

By Maarten · 2018-02-25

Description

I've been trying to get the smooth modifier treshold value of the currently selected object but keep getting the error: -- Unknown property: "treshold" in smooth:Smooth

I am not sure what I am doing wrong as I looked up the 3ds max help file on the smooth modifier (http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__files_GUID_2147DA8…) and found the same command i am using for getting/setting the smooth treshold value. I get the same error when using the following line of code instead (for obj in geometry do (print (obj.modifiers[#Smooth].treshold)))

The code I am running is a single line:


$.modifiers[#Smooth].treshold --get the smooth modifier treshold of the currently selected obj

And as afore mentioned the error is:


-- Unknown property: "treshold" in smooth:Smooth
-- MAXScript callstack:
--	thread data: threadID:1284
--	------------------------------------------------------
--	[stack level: 0]
--	In top-level

I've attached an image showing my maxscript listener/output window (I executed the line of code in the listener) and the modify panel showing the modifiers.

Any help will be greatly appreciated. Thank you!

Attachments
Comments (1)

found my mistake

Maarten · 2018-03-07

Turns out not all my objects had a smooth modifier applied..stupid mistake but did not think about that at the time.