THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/07/2003 at 07:46, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.100
Platform:
Language(s) : C.O.F.F.E.E ;
---------
Hey!
Just a bunch of questions on COFFEE, if anyone is able to answer any one of them, just leave a message. Not all of the questions need to be solved in the same message. ANY help is greatly appreciated! THANK YOU ALL IN ADVANCE!
I was wondering if I had a cylinder in my scene, if I could determine its radius/diameter and length using COFFEE scripting. Something similar to GetPosition() to determine the position, but it would give me the value of the radius/diameter and length.
Also, if I had two different objects, with a COFFEE expression tag on each and I wanted to 'pass' the value of one variable to the other object,
would that be possible? For example, suppose there are two cubes and a sphere in the scene. Using one cube, I calculated the distance from the center to the center of the sphere. Then, using the other cube, I do the same. I would like to pass these variables to the sphere so it can decide which one is closer. (I know this would work better if I just calculated the distance using a COFFEE expression on the sphere, but it is just an example).
Further, is it possible to write data to a file such as a *.txt file. For example, if I got all the coordinates of an object at each frame, could I output that to a file and then get that data back at another time from that file?
Is there a method to call that can determine the closest point from a point on an object to a point on a spline? I knowthat Maya has a method called closestPointonCurve, but I have yet to find one on Cinema 4DXLR8.
Finally, is there any way that I can initialize variables and functions to only do something for the first frame, frame 0? For example, if I set up a series of conditions and rules for the first frame, the methods will no longer be called after the first frame?