Ilya Lindberg - 2007-05-11

Hi All!
I'm trying with cgkit get the image like in tutorial - torus with grass (RiCurves).
I write simple with calls in cycle RiCurves primitive and RiConcatTransfom(F). Its work, but i read this in renderman API: "Multiple disconnected individual curves may be specified using one call to RiCurves. The parameter ncurves is the number of individual curves specified by this command".
The syntax RiCurves( RtToken type, RtInt ncurves, RtInt nvertices[], RtToken wrap, parameterlist );
After execute i get: Curves "cubic" [6] "nonperiodic" "P" [0 0 -0.12783 0 0 0 0 0 0.12783 0 0 0.191745 0 0.067311 0.255661 0 0.134622 0.319576] "constantwidth" [0.005].
If I'm try to specified ncurves parameter before nvertices[] like in syntax, is not work. And error is:

  1...Traceback (most recent call last):
  File "C:\Python25\Scripts\", line 535, in <module>
    grow(objs=meshes, proc=proc, num=numpoints, resultdesc=desc)
  File "C:\Python25\Scripts\", line 428, in grow
    res = proc(P=P, N=N, F=F, s=s, t=t)
  File "", line 39, in curve_proc
    RiCurves(t, 10, [n], r, RI_P, [points], s, w, RI_NULL)
  File "C:\Python25\Lib\site-packages\cgkit\", line 870, in RiCurves
    _paramlist2string(paramlist, keyparams)+'\n')
  File "C:\Python25\Lib\site-packages\cgkit\", line 2070, in _seq2list
    f = _flatten(seq)
  File "C:\Python25\Lib\site-packages\cgkit\", line 2045, in _flatten
    for v in seq:
TypeError: 'int' object is not iterable

My question is - how to specified the ncurves parameter?
Thanks for any help :)
And sorry for my english, I'm from Russia :)