Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Setting Spline Points

    SDK Help
    0
    2
    187
    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 04/01/2004 at 03:46, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.500 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi,
      i have Problem wie this Code, as Expression it works fine but in my Plugin only a empty Spline Object will be create but no points set, that makes me really wonder and  i dont find help with the forum search.
      thx a lot for help
      MfG Morph21
       
      MyDialog::CreateSpline()
      {
      var count = 3;
      var doc = GetActiveDocument();
      //set spline
      var spline=doc->FindObject("ruler_spline");
      if (!spline && !instanceof(doc,SplineObject))
      {
       var spline=new(SplineObject);
       spline->SetName("ruler_spline");
       doc->InsertObject(spline,NULL,NULL);
       spline->Message(MSG_UPDATE);
       return FALSE;
      }

      //update new obj/point count
      var vc=new(VariableChanged); if(!vc) return FALSE;
      vc->Init(0,count);
      spline->Message(MSG_POINTS_CHANGED,vc);
      var points=new(array,count);
      points[0]=vector(0.0,0.0,0.0);
      points[1]=vector(100.0,0.0,0.0);
      points[2]=vector(0.0,100.0,0.0);
      spline->SetPoints(points);
      spline->Message(MSG_POINTS_CHANGED,vc);
      return spline;

      }

      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 09/01/2004 at 13:39, xxxxxxxx wrote:

        A couple of things to check:
        1. What would spline->GetPoints() return, i.e. has it understood that the spline has three elements?
        2. Does calling spline->Message(MSG_UPDATE) help?

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