deg = 3
pointsList = [...]
c = cmds.curve(d=deg, n='curve11', ep=pointsList)
cmds.rebuildCurve(c, d=deg, s=len(pointsList)-1, kr=2, kcp=True, rpo=True)
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b98e39f5-d5e2-4e94-80e7-98a8ae747d7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Thu, 3 Dec 2015 11:13 PM <s...@weacceptyou.com> wrote:
thanks Justin, this would be ok. its just the problem with the rebuild curve thing is the problem i had at the beginning, the points shift their position slightly when the curve is rebuilt.
I dont get it that there is a difference when drawing to calling with python. Its like there is a flag not included in curve cmd docs
Like I said though, when you use the ep curve tool Maya is still calling the curve command for you with CV points and knots. It isn't using the ep param with a hidden flag. Check out the script editor output when you do it via the tool.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0bd93f88-2b77-46b4-8661-67e3522d038b%40googlegroups.com.
hmm ok yeah i see.
this is so weird, so i plot out the edit points and then maya cleverly converts these points into cv points with knots, but places them correctly to match the position of the original edit points. But it can't do it straight away with python command. im a bit slow, is that correct?
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d1231c77-3f79-444f-84d6-3e384c2dbb29%40googlegroups.com.
import maya.OpenMaya as om
curveFn = om.MFnNurbsCurve()
arr = om.MPointArray()
arr.append(0,0,0)
arr.append(...)
obj = curveFn.createWithEditPoints(arr, 3, om.MFnNurbsCurve.kOpen, False, False, True)
ok thanks, i will try and solve this eventually
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ca73940d-1da7-4978-b1d4-388294dea634%40googlegroups.com.
Awesome. Glad it does what you needed.
The Maya API is just very C++ - like. So you are using it fine. It definitely has a lot deeper functionality, so the docs are more intense. The commands module is more like a super simple collection of high level functions that work with strings.
--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/575ee7d4-8605-48e3-bd6c-51c367fc969d%40googlegroups.com.