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

    MoSplines Crash w negative segment

    Scheduled Pinned Locked Moved Bugs
    1 Posts 0 Posters 394 Views
    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 Offline
      Helper
      last edited by

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

      On 04/05/2011 at 13:55, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12.043 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi.
      Calling a negative segment (-1 or less) for any mospline object
      (MoSpline, Tracer etc) makes Cinema crash.

      Regular splines handle this (by some internal clamp maybe)

      Crach code, change segment to -1:

      // R12.043 Negative segment (-1 or less) crash for any mospline object   
        
      if(!object() || !object()->GetRealSpline()) return;   
        
      var segment = 1; // <- change to -1for crash   
        
      var spline = object()->GetRealSpline();   
      var splineLD = new(SplineLengthData);   
                splineLD->Init(spline,segment);   
      var splinepos = spline->GetSplinePoint(0.5,segment);   
      println(splinepos);
      

      Cheers
      Lennart

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