Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How to create a spline?

    SDK Help
    0
    4
    364
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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:

      User Information:
      Cinema 4D Version:   9.102 
      Platform:   Windows  ;   
      Language(s) :      XPRESSO  ;

      ---------
      Hi, everyone.
      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.
      Thank you,
      Lar

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        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++.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          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.
          Lar

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            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.

            frank

            1 Reply Last reply Reply Quote 0
            • First post
              Last post