or simply run
CreateCurveFromPoly
in a mel console.
after doing this you will also want to rebuild the curve, since it;s segments will be based on the amount of edges in the converted selection.
edit curves>rebuild curve
Hey Passerby, thanks. I should've explained it more thoroughly. Im using polygon edges to curves method but it doesn't allow me to create multiple curves in one go. For example, I want to turn a cube into curves, polygon edges to curves will only be able to do one curve at a time. Would I have to use Mel, with something like a for loop, to store the edges selected, and then query them for CreateCurveFromPoly?
So do you want each edge to be its own curve then? CreateCurveFromPoly will try to combine adjacent edges if the curve is possible and ignore the remainder. The following code will generate one curve per edge but will not attempt to combine adjacent edges:
The code Bartalon provides workes fine. Now i'm looking for a way to alter the code so it creates curves for all the edge loops , instead of making a lot of curves for all the intersecting parts.
Maybe by SelectEdgeLoopSp or by attachCurve ?
I want to use the curves to do a extrude face over each curve.
Same as ALDEG Did you get an answer Multiple edge loops to curve ?
try this python script, select a object, run script.
import maya.cmds as cmds
objList = cmds.ls(selection=1)edgeNum = cmds.polyEvaluate(edge=1)edgeList = []i=0while i<edgeNum: edgeList.append(i) i+=1 CurveList = []while edgeList: usedEdgeList=cmds.polySelect(objList[0],edgeLoop=edgeList[0]) tmpCurveList=cmds.polyToCurve(form=3,degree=1) cmds.matchTransform(tmpCurveList[0],objList[0],pivots=True) CurveList.append(tmpCurveList[0]) for j in usedEdgeList: if j in edgeList: edgeList.remove(j) for c in CurveList: if (c!=CurveList[0]): curveShapeList=cmds.pickWalk(c,direction="down",type="nodes") cmds.parent(curveShapeList[0],CurveList[0],relative=True,shape=True) cmds.delete(c)
Replies
or simply run
CreateCurveFromPoly
in a mel console.
after doing this you will also want to rebuild the curve, since it;s segments will be based on the amount of edges in the converted selection.
edit curves>rebuild curve
or
RebuildCurveOptions
in the mel console
The code Bartalon provides workes fine. Now i'm looking for a way to alter the code so it creates curves for all the edge loops , instead of making a lot of curves for all the intersecting parts.
Maybe by SelectEdgeLoopSp or by attachCurve ?
I want to use the curves to do a extrude face over each curve.
Hopefully somebody can help.
Greetings Alex