Flatten selected verticles in Editable Mesh


#1

hello
i’m trying to modify this script to make selected verticles flat on Z axis in EditableMesh

unfortunately replacing polyop with meshop do not work
could anyone suggest solution please?

(
sel=polyop.getvertselection $
for i in sel do
(
pos=polyop.getvert $ i
polyop.setvert $ i [pos.x,pos.y,0]
)
)

#2
(

	sel= getvertselection $
	for i in sel do
	(
		pos = getvert $ i
		setvert $ i [pos.x,pos.y,0]
	)
	update $
)

#3

thank you!