Skip to content

Instantly share code, notes, and snippets.

@SEVEZ
Last active July 13, 2019 02:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SEVEZ/7308da0a83f4cf7c13c36406fa80e0cf to your computer and use it in GitHub Desktop.
Save SEVEZ/7308da0a83f4cf7c13c36406fa80e0cf to your computer and use it in GitHub Desktop.
Extrude & Duplicate ala XSI #wip
//mel
// Extrude & Duplicate ala XSI
global proc xsiDuplicate(){
string $sel[] = `ls -sl`;
string $filterPoly[] = `filterExpand -sm 34 $sel`;
string $filterEdges[] = `filterExpand -sm 32 $sel`;
string $filterPoints[] = `filterExpand -sm 31 $sel`;
// Points :
if (size($filterPoints)>0){
polyExtrudeVertex -constructionHistory 1 -width 0.2 -length 0 -divisions 1;
}
// Polygons : Extrude
else if (size($filterPoly)>0){
polyExtrudeFacet;
}
// Edges : Bevel
else if (size($filterEdges)>0){
polyBevel -offset 0.1 -oaf 1 -af 1 -segments 2 -ws 0 -fillNgons 1 -mv 1 -mvt 0.000001 -sa 30 -ma 180 -at 180 -ch 1 $filterEdges;
}
// Obj : Duplicate
else{
Duplicate;
}
}
xsiDuplicate;
@ZixXer
Copy link

ZixXer commented Sep 9, 2017

Hi Sevez,

This code was the best one so far for editing face weights!
however I can not change the edges to soft or hard after i applyed your script... this means there is no comming back after applying it. is there a way you could change it so if i apply it and then tell a edge to be hard or soft that it changes it back to a none weighted vertex and just goes back to normal.

Thanks Sander

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment