Notifications
Clear all

[Closed] Stitch elements / edges

HNY Everyone ^^.

I have a problem with textured .3ds models. Whenever I import the models, the textures are always broken into small pieces, 1 per poly. As you can see from the image below.

Now I would like to make a script to Stitch elements together automatically by running through the edge count and one by 1 stitch the polys together…

For Example. I have a .3ds model of a plant with hundreds of leaves. Of course this is a pain in the arse to stitch one by one.

Is there a way to do an (preferably) EDGECOUNT IN UwvUnwrap and loop through that number with the stitcher?

So edge 1 —> Stitch, Edge 2 —> Stitch. etc etc

Ive tried using getselectVerticesByNode.count but that doesn’t work

Here is a sample of my script of what I got thus far.

(	
		if $ == undefined  or selection.count>1 then
			(
				format "select 1 object"
				messagebox "Select 1 object" title:"Oops!"
			)
			else
				(	
				for o in selection do
					(
					max modify mode
					theMod = unwrap_uvw() 
					addmodifier o theMod
						(modPanel.getCurrentObject()).unwrap.edit(); 
					themod.setTVSubObjectMode 1
					max select all 
					vertcount = themod.getSelectedGeomVerts()
					for i = 1 to vertcount do
						(
						i.stitchverts
						)
-- 				themod.weldselected()
					)
				)
)
7 Replies

could you supply a test model? (the one in the picture for instance).
makes it much easier to help you on this one…

of course, no problem

find attached

the error you describe in first post is not in the model you posted,
it looks perfectly fine to me. is it correct model you supplied? (or was it already fixed?..)

Huh which error did I post about? I was just looking for a quick solution to stitch edges one at a time. :S

…anyone?

Why not just weld with a value of 0,01? Shouldn’t that work on your example mesh?

Ive tried that before and well that is the problem.

The uvws are on top of each other as you can see from the picture in the first post.

So when I weld the verts together, it will not only weld the one next to it, but also under.

So what im really looking for is a way to loop through all the edges 1 by 1 and then stitch em up 1 by 1…