Skip to content

Instantly share code, notes, and snippets.

@juliomarcos
Created July 10, 2019 19:44
Show Gist options
  • Save juliomarcos/950f6954105389f22c5a03e230a31cd9 to your computer and use it in GitHub Desktop.
Save juliomarcos/950f6954105389f22c5a03e230a31cd9 to your computer and use it in GitHub Desktop.
Cheap trick to convert tris to quads in a pole circle
polyExtrudeVertex -constructionHistory 1 -width 0.5 -length 0 -divisions 1;
$allEdges = `polyListComponentConversion -fv -te`;
$allEdgesList = `ls -fl $allEdges`;
select -cl;
for($edge in $allEdgesList) {
string $tokens[];
tokenize $edge "[]" $tokens;
int $id = (int) $tokens[1];
if ($id % 2 == 0) {
$edgeName = $tokens[0] + "[" + $tokens[1] + "]";
select -add $edgeName;
};
};
doDelete;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment