Hi Marcus, It would be something like this (pseudo code):
data = MFnNurbsSurfaceData() > obj = data.create() > surffn = MFnNurbsSurface(obj) > surffn.create(...) > plug.set(obj) > On Fri, Jul 13, 2018 at 5:01 AM Marcus Ottosson <konstrukt...@gmail.com> wrote: > Hi all, > > I’m trying to achieve this.. > > createNode transform -n "myCurve"; > createNode nurbsCurve -n "myCurveShape" -p "myCurve"; > setAttr "myCurveShape.cached" -type "nurbsCurve" > 3 2 no no 3 > 7 -2 -1 0 1 2 3 4 > 5 > 1.0 0.0 0.0 > 1.0 0.0 1.0 > 0.0 0.0 1.0 > -1.0 0.0 1.0 > -1.0 0.0 -1.0 > ; > > ..using API (any version, Maya 2015+).. > > from maya.api import OpenMaya as om > > mfn = om.MFnDagNode() > parent = mfn.create("transform", "myCurve") > shape = mfn.create("nurbsCurve", "myCurveShape", parent=parent) > attr = mfn.findPlug("cached", False) > attr.set...(?) > > Does anyone know how to set this attribute? > > Best, > Marcus > > > -- > 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_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD_%2Bw7CEsc%2B2R7KQ%3D4%3D3Qt%2BzhyXiPo_atgDwqTCHa-HxA%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD_%2Bw7CEsc%2B2R7KQ%3D4%3D3Qt%2BzhyXiPo_atgDwqTCHa-HxA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > 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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPCVZ5O%2BuC3L%3D7N84U_nSy92P5qUE1%3DBB__ptvp9ZyzdAfj75A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.