Notifications
Clear all

[Closed] paste edit poly modifier not working in maxscript?

Hey guys,
I’m just trying to copy/paste an edit poly modifier using maxscript and it just doesnt work. is there any sort of limitation to that? If I just copy the command from the listener and use it as a script i get an error:


addModifier $.baseObject (Edit_Mesh ())
-- No ""addModifier"" function for Editable Mesh

any ideas why? I’m trying to make a loop to paste the same edit poly/edit mesh on a list of objects and i can’t manage, am i missing something?

cheers!
Alex

4 Replies
1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

You can use “before” argument in addModifier fn
Example

cube = Box()
 for mody in #((Bend()),(Melt()),(UVWmap()),(Relax())) do addmodifier cube mody
 -- if you want to add modifier right above cube (base object) you can try this
 addmodifier cube (Edit_Mesh ()) before:(cube.modifiers.count)

why are you using $.baseobject ?

for me adding the modifier using $ or better $selection works

i used the baseObject cos that’s what the listener was returning when I pasted the edit poly modifier…
The problem Im having is that this will work with any modifiers but not with edit poly…
could you guys try this quickly and see if this works for you?:

create a plane plane0001
convert to editable poly
duplicate this plane twice (plane0002, plane0003 )
add edit poly to plane0001
select some faces and extrude those.
copy/paste that edit poly to the other planes by hand ( it works )
now try to paste it via maxscript ( this is when it fails for me…)

any info on this really appreciated!

cheers