MaxScript - 样条平滑?

MaxScript - Spline Smooth?

我尝试在 3dsmax 2017 中使用侦听器制作此脚本,但它不只记录样条曲线的动作 - 平滑(如屏幕截图所示)。

当我 select subobject level - Vertex, and select all,然后我右键单击并选择 smooth, ,我得到了我需要的结果。 我需要使用脚本来制作它,因为我有许多需要平滑的样条曲线。 任何帮助表示赞赏。

select $Line001
subobjectLevel = 1
modPanel.setCurrentObject $.baseObject

我尝试了几个在网上找到的脚本,但它们在 3dsmax 2017 中不起作用。 因此,如果您有适用于 3dsmax 2017.screenshot

的解决方案示例

请参阅 maxscript 参考中的 SplineShape 主题。

for spline = 1 to numSplines $
    where (selectedKnots = getKnotSelection $ spline).count > 0 do
        for knot in selectedKnots do setKnotType $ spline knot #smooth

updateShape $