Created
August 29, 2015 11:18
-
-
Save SEVEZ/57ddf256be03930e559b to your computer and use it in GitHub Desktop.
Extract selected edges to curves
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymel.all import * | |
sel = ls( selected(), fl=1 ) | |
aCe = [] | |
while len( sel ): | |
ce = [] | |
for e in sel: | |
if ce == []: ce.append( e ) | |
else: | |
for e2 in ce: | |
if e.isConnectedTo( e2 ): ce.append( e ); break | |
for e in ce: sel.remove( e ) | |
aCe.append( ce ) | |
aC = [] | |
for e in aCe: select( e, r=1 ); aC.append( polyToCurve( f=2, dg=1 ) ) | |
grp = group( aC, n='extr_crv_grp') | |
setAttr( grp + '.overrideEnabled', 1 ) | |
setAttr( grp + '.overrideColor', 17 ) | |
select( grp, r=1 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment