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 check if a spline is a freehand spline?

    General Talk
    r19 python
    2
    3
    763
    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.
    • R
      rui_mac
      last edited by

      By "freehand" spline, I mean, not a primitive, like Star or Circle.
      So, any spline that is converted into an editable spline or imported from an EPS ou Illustrator file would be considered a "freehand" spline.
      My problem is that:

      is_spline = bool(info & c4d.OBJECT_ISSPLINE)

      will return True for ALL splines, wether they are parametric or editable splines.
      How can I differentiate between them?

      1 Reply Last reply Reply Quote 0
      • R
        rui_mac
        last edited by

        Ok, found a solution.
        I checked for:

        is_spline = spline.IsInstanceOf(c4d.Ospline)

        And, if False, it is a parametric primitive.

        1 Reply Last reply Reply Quote 0
        • S
          s_bach
          last edited by

          Hello,

          I just want to add that an example on how check a spline can be found in the BaseObject Manual.

          best wishes,
          Sebastian

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

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