phix314
10-21-2008, 12:23 AM
I find myself doing this a lot, and I'd like to exercise my MEL skills by making a procedure out of this. I don't have too much mel experience, so I think the main reason I'm struggling with this is because I don't know what the exact commands are that I need.
proc loopBevel(){
SelectEdgeLoop;
polySelectEdges edgeLoopOrBorder;
string $selection[] = `ls -sl -type "float3"`;
for($object in $selection){
string $objectType = `objectType $object`;
print ("Object Selected: " + $object + "\n");
//polyBevel Here
}
}
loopBevel();
This works fine on border edges, but on interior edge loops (such as a loop through the center of a cylinder), it bevels all crazy. Upon manual selection, it shows that the edges are pCylinder.e[105], pCylinder.e[107], pCylinder.e[109], pCylinder.e[111], etc... odd numbers instead of a simple .e[100:110].
Also, I'm sure theres a better way of seeing if the object selected is a poly component as opposed to checking if it's a "float3" (came to be by ls -showType).
proc loopBevel(){
SelectEdgeLoop;
polySelectEdges edgeLoopOrBorder;
string $selection[] = `ls -sl -type "float3"`;
for($object in $selection){
string $objectType = `objectType $object`;
print ("Object Selected: " + $object + "\n");
//polyBevel Here
}
}
loopBevel();
This works fine on border edges, but on interior edge loops (such as a loop through the center of a cylinder), it bevels all crazy. Upon manual selection, it shows that the edges are pCylinder.e[105], pCylinder.e[107], pCylinder.e[109], pCylinder.e[111], etc... odd numbers instead of a simple .e[100:110].
Also, I'm sure theres a better way of seeing if the object selected is a poly component as opposed to checking if it's a "float3" (came to be by ls -showType).
