How to draw/modify a spline in COFFEE?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2007 at 04:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
Hello
I'm trying to modify an existing linear spline by its coffee tag. This is how far I got:main(doc,Kurve) { //Number of Spline points var Punkte = 10; // pointer to Container of Kurve var KC = Kurve->GetContainer(); // fill array with canned data var KPunkt = new (array,3,Punkte); var k,j; for (j=0; j<Punkte; j++){ for (k=0; k<3; k++){ KPunkt [k][j] = k + j + k*j; } } // put points into Container KC->SetData(116,Punkte); }
Now how can I get the KPunkt array to adding points to the actual spline, redefining and drawing it?
Thanks for any help,
Wind -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/05/2007 at 07:03, xxxxxxxx wrote:
A Spline is an object - a SplineObject derived from PointObject. To modify the points, you should get the vector point array from it and modify the array elements.
It gets even more fun if you need to change the number of points. This requires VariableChanged (see the COFFEE docs - with examples).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/05/2007 at 06:16, xxxxxxxx wrote:
Changing the structure of the geometry (pointcount,polygoncount) is not allowed in a COFFEE tag. To do stuff like this you have to use the C++ API.
To change the points positions you have to use the GetPoints and SetPoints member functions of the PointObject class. There is an example in the COFFEE docu.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/05/2007 at 10:27, xxxxxxxx wrote:
You're no fun...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/05/2007 at 16:37, xxxxxxxx wrote:
hi,
Windreaper did you already find the 'subspline' expression in the content browser?
This might give you a better idea how to go about it: by referencing.hth, frank