Hi! I have been working on something alike to adapt my v6 scripts as well (not finished yet unfortunately)
When you iterate on the elements inside an existing splinewarp node, all shapes (bezier, bspline, cusp bezier)
are listed as _curveknob.Stroke instead of _curveknob.Shapes inside the splinewarp.
<_curveknob.Stroke object at 0x10d51e620> BezierCusped1
<_curveknob.Stroke object at 0x10d51e800> Stroke4
And when you insert strokes instead of shapes, the script works:
newshape = sw.Stroke(warpCurve, type="bspline")
newpoint = sw.AnimControlPoint(500,500)
newshape.append(newpoint)
warpRoot.append(newshape)
HiBefore Nuke7.0v1 ( with Nuke 6.3v6 ), we were using a script to generate B-Splines with the SplineWarp node ( same code is also working with the RotoPaint node ).Now we have upgraded to 7.0v1, the code is failing, but only with the SplineWarp node ( works well with the RotoPaint).This is the code :import _curveknob
warpNode = nuke.createNode('SplineWarp3')
warpCurve = warpNode['curves']
warpRoot = warpCurve.rootLayer
newshape = _curveknob.Shape(warpCurve, type="bspline")
newpoint = _curveknob.ShapeControlPoint(500,500)
newshape.append(newpoint)
warpRoot.append(newshape)I get this error :File "<string>", line 7, in <module>
SystemError: internal error - no curve group associated with this shapei have tried also to import nuke.splinewarp module instead of _curveknob, but not much sucess :import nuke.splinewarp as sw
warpNode = nuke.createNode('SplineWarp3')
warpCurve = warpNode['curves']
warpRoot = warpCurve.rootLayer
newshape = sw.Shape(warpCurve, type="bspline")
newpoint = sw.ShapeControlPoint(500,500)
newshape.append(newpoint)
warpRoot.append(newshape)maybe it is related with the curveType, but I can't find my answers with the docs, so i wanted to know if somebody had the same problem and found a solution about it.Thankyou !
--
Magno Borgo
www.boundaryvfx.com
www.borgo.tv
Brasil:Curitiba:GMT= -2 (dst)
www.boundaryvfx.com
www.borgo.tv
Brasil:Curitiba:GMT= -2 (dst)
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python