THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/07/2007 at 12:24, xxxxxxxx wrote:
Cinema 4D Version: 9.102
Platform: Windows ;
Language(s) : XPRESSO ;
I am very new to COFFEE and have no C++ experence, though I have written some COFFEE code (derived from examples) that I use in XPresso tags.
My question is: can I use COFFEE to create a new Spline? I would like to create a number of new Splines from point data gotten from elsewhere, name them, divide them into Segments, have them Opened or Closed, set their type (Linear, Bezier, etc.) and place them in existing groups, if necessary.
If this is possible, could an example be posted here (or linked to from here).
I have searched for examples but have only found "SplineObject", which seems to refer to already existing Splines.
On 17/07/2007 at 13:14, xxxxxxxx wrote:
You are on the correct path. A SplineObject is exactly what you need to create.
// Allocate a SplineObject
var splObj = AllocObject(Ospline);
if (!splObj) return false;
You then need to set up the spline object. Since it is derived from a PointObject you can SetPoints() and then SetSegments(), SetTangents(). You'll also want to get the container and set the container values as noted in the COFFEE docs under SplineObject. Don't 'see dialog', see the Resource folder instead - look for Resource:res:description:Ospline.res.
Unfortunately, I have no COFFEE example code - only C++.
On 17/07/2007 at 14:32, xxxxxxxx wrote:
Thank you, Robert. If I get this to work I will post the code here for others.
On 17/07/2007 at 15:36, xxxxxxxx wrote:
just to add, also have a look at the VariableChanged and BackupTags Classes when working with PointObjects.