ScriptSpot

Forum topic · General Scripting

Create Named Selection Set for Edit Poly Modifier

By Ewok · 2012-04-25

Description

Hi

I'm able to create a named selection set for an Editable Poly:

k = #{1..3, 5..7}
appendSubSelSet "SelSet01" 
$.Faces["SelSet01"] = k

But I'm completely lost when trying to do the same thing for an Edit poly Modifier.

Does anyone have an idea how to do this?

Comments (4)

jsl1979 · 2017-12-14

Does anyone know the maxscript for adding selected objects to an already created selection set. I can make a selection set via maxscript, but if i use maxscript to try and add more objects to the already created script, then it just replaces the objects in the selection set. Any suggestions on how to accomplish this with maxscript would be helpful.

Thanks.

jahman · 2017-12-14

join selectionSet node with current selection and replace old selection set


NamedSelectionSetManager.ReplaceNamedSelSetByName (join (selection as array) selectionSets[#mySet]) "mySet"

Edit_Poly : Modifier

barigazy · 2012-04-25

See "Edit_Poly : Modifier" topic in MaxScriptHelp

k = #{1..3, 5..7}
$.EditPoly.Select #Face k
$.EditPoly.SetEPolySelLevel #Face

Ewok · 2012-04-25

Thank you barigazy,

the code does select the faces, but unfortunately, it doesn't create a Named Selection Set as the Editable Poly code does.

What I'm looking for is the Edit_Poly equivalent for

$.Faces["SelSet01"] = k

that tells the newly created Named Selection Set "SelSet01" what it contains.

I just can't figure out by what to replace

$.Faces