Papigiulio
01-13-2011, 01:56 AM
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.
http://img140.imageshack.us/img140/6355/stitchuvw01.jpg
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()
)
)
)
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.
http://img140.imageshack.us/img140/6355/stitchuvw01.jpg
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()
)
)
)
