Notifications
Clear all

[Closed] creating and moving verts

Hi,

So any1 knows why my code moves only the last vert not all of them?

And is there any other way to create verts?


arr = #([0,0,0],
	[0,1,0],
	[0,2,0],
	[1,0,0],
	[1,1,0],
	[0,1,1],
	[0,0,1],
	[2,1,0])

m = editable_mesh()
	
	
for i=1 to arr.count do (
	setNumVerts m i
	setVert m i arr[i]
)

update m 

3 Replies

Rough look at the code you are changing the number of verts in your loop. Set it before the loop = arr.count.

-Eric

n = mesh numverts:arr.count
meshop.movevert n #all arr

but it doesn’t make too much sense to have a mesh with verts and without faces

1 Reply
(@juzwa)
Joined: 10 months ago

Posts: 0

I will try this one. But im not sure if it would work because Im working with growing arrays.

Yeah it doesnt make sense at all. Im just trying to play with my own mesher. But first I need all the verts I think. Then do some search radius of verts for making polygons? Really dunno just playing with mxs