Hi I have what I'm sure is a very basic question. I am trying to make a quick and dirty utility that can import nasty poser clothes and sort them out for maya.
most poser clothes are made of lots of bits and my code will pull these in and sort them out but sometimes poser clothes are one piece of geometry and because polyunite expects more than one piece it hangs the script.
I figure I need an if statement to determine if what I have just imported and selected is greater than 1. then run the appropriate code block?
it's my first try at mel so I'm not even sure if its the right approach.
here is what I have so far(just to give you an idea of what I'm trying to do as this script is not working)
thanks in advance
proc int onOpen(string $filename,string $type) {
print($filename+"\n");
print($type+"\n");
return true;
}
fileBrowser( "onOpen", "Open", "", 0 );
string $pos[];
$pos = `SelectAllGeometry`;
if ($pos > 1) {
polyUnite;
DeleteHistory;
selectType -controlVertex true;
polyMergeVertex -d 0.0003;
polySoftEdge -a 180;
FrameSelected;
fitPanel -selected;
DisplayShadedAndTextured;
DeleteHistory;
} else {
selectType -controlVertex true;
polyMergeVertex -d 0.0003;
polySoftEdge -a 180;
FrameSelected;
fitPanel -selected;
DisplayShadedAndTextured;
DeleteHistory;
}
