I try to write curve data to the rib files with C++. The code is like this
RiCurves(RI_CUBIC, numberOfCurves, numberOfVertices, wrap, RI_P, (RtPointer)Ps, RI_WIDTH, &nwidths, RI_NULL);
I saved the points data in the array Ps, and the width data in the array nwidth. When I run the program, the error Bad scope for "RiCurves" occurs. I do not why.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to write curve data to the rib files with C++. The code is like this
RiCurves(RI_CUBIC, numberOfCurves, numberOfVertices, wrap, RI_P, (RtPointer)Ps, RI_WIDTH, &nwidths, RI_NULL);
I saved the points data in the array Ps, and the width data in the array nwidth. When I run the program, the error Bad scope for "RiCurves" occurs. I do not why.
Ensure it's inside WorldBegin / WorldEnd. An object can only have an occurrence there.