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
    • Register
    • Login

    Check if Object is Spline Type

    Cinema 4D SDK
    python
    2
    3
    863
    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
      HolgerBiebrach
      last edited by a_block

      Hello, I need to check if an Object is a Spline. By that I mean not only a SplineObject but also any kind of Spline Generator like TextSpline, Mospline, Circlespline etc.

      With this Code I usually Check if a Object is a Generator or Deformer (Modifier). But I did not find a way for checking for Splines.

      obj_info = obj.GetInfo()
          is_generator = obj_info & c4d.OBJECT_GENERATOR
      
      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @HolgerBiebrach, welcome back in this forum.
        First of all, I would like to point you, to our Q&A functionnality in order to use as best as we can the new features offered by the forum.
        I let you set up your first post as a question.

        Moreover please use the 3 single quote markdown in order to make code block ```your code```.

        With that's said, regarding your question you can simply check for c4d.OBJECT_ISSPLINE like so bool(op.GetInfo() & c4d.OBJECT_ISSPLINE).

        If you have any questions please let me know.
        Cheers,
        Maxime!

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • H
          HolgerBiebrach
          last edited by

          Hi Maxime. Thanks a lot. That helped me.

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