Select (highlight) editable poly in modify list?

How do i do this. I need my editable poly to be selected in able to use soft selection in a script...

max modify mode --go to modify panel
modPanel.setCurrentObject $.modifiers [#Editable_poly_Here_Would_be_To_Simple_...] --**HELP HERE**
subObjectLevel = 1 --go to vertex selection lev
$.useSoftSelection = true --use softsel
polyop.setVertSelection $ #{5000} --select vert
polyop.moveVert $ #all [0,0,10] useSoftSel:true --move vert influence all verts in obj

Comments

Comment viewing options

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

Try this

m = plane()
m.lengthsegs = 100
m.widthsegs = 100
convertTo m editable_poly
select m
max modify mode --go to modify panel
subObjectLevel = 1 --go to vertex selection lev
m.useSoftSelection = true
movePos = [0,0,-10]
polyop.setVertSelection m #{5000}
update m
polyop.moveVert m #all -movePos useSoftSel:true

try this.

For some reason softselection only works with the modify panel open and the edit poly as the highlighted object. The movevert must be applied on all vertices because softselection can affect all vertices (stupid? y/n). I need to be in modify mode with my editable poly selected. Though in the script above it draws a plane converts it to editable poly and there are no modifiers. In my scene there are different modifiers on all meshes... Mmh maxscript seems like a world of workarounds with (if you are lucky) one single solution.

barigazy's picture

Use to higlight base

Use to higlight base object

max modify mode
modPanel.setCurrentObject $.baseobject

Are you try on sphere and more then one selected verts?

bga

kevinmrn's picture

Ok just tried your lines and

Ok just tried your lines and it seems to work!

Thanks man!!

kevinmrn's picture

I'm testing on a sphere yes,

I'm testing on a sphere yes, but in the end it should be affecting multiple meshes. Goal is to have a spline which affects these multiple meshes with softselection...

kevinmrn's picture

Come on guys there must be

Come on guys there must be someone online? Its not that hard of a question, i've been looking for a solution for ages. Because above the editable_poly there are other modifiers such as skin etc. I need to be able to select the editable poly modifier to use softselection.

barigazy's picture

Questions:

#1.Are you use Edit_Poly modifier as first modifier and the stuck or you have more then one?
#2.Are you assigne to this modifier different name?

bga

barigazy's picture

...

obj = Sphere radius:20 segs:32
addmodifier obj (Edit_Poly())
ep = obj.modifiers[1]
max modify mode
modPanel.setCurrentObject ep
ep.useSoftSel = on
subObjectLevel = 1
ep.Select #Vertex #{1..97}
ep.MoveSelection [0,0,10]

bga

kevinmrn's picture

its not the modifier I'm

its not the modifier I'm looking for I need the editable_poly highlighted not edit poly. Guess that answers the second question as well...

kevinmrn's picture

I'm looking to edit from the

I'm looking to edit from the editable poly because I have loads of models with a skin applied. So I dissable skin and always deform and then I'm looking to go back to editable_poly... Or is it possible to put the edit poly right underneath the skin?

barigazy's picture

This time no need to jump in

This time no need to jump in modify panel to perform operation.
But still i don't know why softselection not work properly

obj.baseobject.useSoftSel = on
polyop.setVertSelection obj.baseobject #{1..97}
polyop.moveVert obj.baseobject #{1..97} [0,0,10] useSoftSel:on
update obj

bga

Comment viewing options

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