You could insert a knot halfway?

cmds.insertKnotCurve(p=0.5, rpo=True)       # assuming the curve is 0-1

On 15 October 2014 23:06:54 GMT+11:00, [email protected] wrote:
>hi, 
>
>im trying to create a linear curve, set using two coodinate points. And
>then after this line has been drawn i am using the rebuildCurve command
>to add the number of spans in the curve. However the number of spans i
>want is 2. but the minimum the rebuildCurve command seems to create is
>4.
>
>Does anyone know of a way simply to split a curve in half so i has two
>spans, within python?
>
>here is my current code:
>
>##########################################################
>import maya.cmds as cmds
>
>cmds.curve(n='samsCurve',d=1, p=[(0,0,0), (1,0,0)])
>cmds.rebuildCurve(d=1, rt=0, s=2)
>##########################################################
>
>thankyou all, 
>Sam
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "Python Programming for Autodesk Maya" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to [email protected].
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/python_inside_maya/241c8dc4-d8b9-4f09-b156-3c0533bfadeb%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/5805C39D-C99F-472E-9413-744BA388332D%40fastmail.fm.
For more options, visit https://groups.google.com/d/optout.

Reply via email to